HP 40gs User Manual
HP 4 0gs gr aphing calc ulator user's guide Ed i t io n 1 P ar t Number F2 22 5AA -90001 hp40g .book Page i Friday, December 9, 2005 1:03 AM
Notice REG ISTER Y OUR PRODUCT A T: w ww .register . hp.com THI S MANUAL AND ANY EXAMPLES C ONT AINED HEREI N ARE PRO VI DED "AS I S" AND ARE SUBJECT TO CHANGE WITHOUT NO TICE. HEWLETT-P A CKARD COMP ANY MAKE S NO W AR- RANT Y O F ANY KIND WITH R EGARD T O THI S MANUAL , INCL UDING , BU T N O T LI MIT ED T O, TH E I MP LIE D W A RRAN T IES OF MERCHANT AB ILITY , NON -I NFRIN GEMENT AND FITNESS FOR A P ARTIC UL AR PUR POSE. HEWLET T-P ACKARD CO. SHALL NO T BE L IABLE FO R ANY ERRORS OR FOR INCI DENT AL OR CONSE QUENTIAL D AMAGES IN CONNECT ION WI TH TH E FUR NISHI NG, P ERF ORMANC E, OR USE OF THI S MANUAL OR THE EXAMPLES CONT AINED HEREIN. © Cop yr ight 19 9 4 -199 5, 19 9 9- 2000, 200 3, 2006 He w lett-P ack ar d Dev el- opment C ompan y , L. P . Repr oduction , adaptation , or tr anslation of this man ual is prohib ited w ithout pri or w ritten per missi on of Hew lett-P a ck ard Compan y , e x cept as allo wed under the cop yr ight law s. Hew lett- P ack ar d Compan y 499 5 M u rp hy Ca nyo n R d, Suite 3 01 San Dieg o, CA 9 212 3 Pr inting His to r y Ed i t io n 1 Ap r i l 2 0 05 title.fm Page i i Friday, February 1 7, 2006 9:48 AM
iii Contents Preface Manual conventions ................ ................ ................. ............. P-1 Notice ...... ................ ................ ................. ................ .......... P-2 1 Getting started On/off, cancel operatio ns ........... .................... ................ ....... 1-1 The display ...................... ................ ................ ................ .... 1-2 The keyboard ............................ ................. ................ .......... 1-3 Menus ............................. ................ ................ ............. ....... 1-8 Input forms ...... ................. ................ ................ ................ .... 1-9 Mode settings ............... ................. ................ ................ ..... 1-10 Setting a mode ................ ................ ................ ............... 1-11 Aplets (E-lessons) .. ................ ................ ................ ............... 1-12 Aplet library ......................... .................... ................ ..... 1-16 Aplet views .............. ................. ................ ................ ..... 1-16 Aplet view configuration ................ ................ ................ .. 1-18 Mathematical calculat ions .................. ................ ................ .. 1-19 Using fractions ........ ................ ................ ................. ........... 1 -25 Complex numbers ................ ................ ................ ............... 1-29 Catalogs and edito rs .. ................ ................. ................ ........ 1-3 0 2 Aplets and their views Aplet views ..... ................. ................ ................ ................ .... 2-1 About the Symbolic v iew .. ................ .................... ............. 2-1 Defining an expression (Symbo lic vie w) .......................... .... 2-1 Evaluating express ions ............... ................ ................ ....... 2-3 About the Plot view .......... ............. ................ ................ .... 2-5 Setting up the plot (Plot view setup) . ................... ................. 2-5 Exploring the graph ......... ................ ................ ................. 2-7 Other views for scaling and splitting the gr aph .................. 2-13 About the numeric view .... ................ ................ ............... 2 -16 Setting up the table (Nume ric view setup) ........... ............... 2 -16 Exploring the table of number s .............................. ........... 2 -17 Building your own table of numbers ...... .................... ........ 2-19 âBuild Your Ownâ menu k eys ............... ................. ........... 2 -20 Example: plotting a circ le .... ................ ................. ........... 2-20 3 Function aplet About the Function aple t .................... ................ ................ .... 3-1 Getting started with the Functi on aplet ....... ................ .......... 3-1 hp40g .book Page ii i Friday, December 9 , 2005 1:03 AM
iv Function aplet interactive a nalysis .............. ................ ............. 3-9 Plotting a piecewise -defined function ........ .................... .... 3-12 4 Parametric aplet About the Pa rametric aplet .......... ................ ................ .......... 4-1 Getting started with the Parame tric aplet ...... ................. ...... 4-1 5 Polar aplet Getting started with the Po lar aplet ..... ................. ................... 5-1 6 Sequence aplet About the Sequ ence aplet ..... ................. ................ ................ 6-1 Getting started with the Se quence aplet . ................... .......... 6-1 7 Solve aplet About the Solve aple t ..... ................... ................. ................ ... 7-1 Getting started with the So lve aplet ....... ................ ............. 7-2 Use an initial guess ........ ................... ................. ................ ... 7-5 Interpreting results ............ ................ ................. ................ ... 7-6 Plotting to find guesses ............. ................ ................ ............. 7-7 Using variables in e quations .............. ................. ................ . 7-10 8 Linear Solver aplet About the Linear S olver aplet ............. ................. ................ ... 8-1 Getting started with the Linear So lver aplet ............. ............. 8-1 9 Triangle Solve aplet About the Triangle Solver aplet ........................... ................ ... 9-1 Getting started with the Triangle So lver aplet .... ................... 9-1 10 Statistics aplet About the Statistics aplet .............. ................... ................. .... 10-1 Getting started with the Statistics aple t ................ .............. 1 0-1 Entering and editing statis tical data ........... ................ ........... 10-6 Defining a regression model . ................ ................ ......... 10-12 Computed statistics . ................. ................ ................ ......... 10-14 Plotting ........ ................. ................ ................ ................. .. 10-15 Plot types .... ................ ................ ................. ............... 10-16 Fitting a curve to 2VA R data ................ ................ ......... 10-17 Setting up the plot (Plo t setup view) .................... ............ 10 -18 Trouble-shoo ting a plot . ................ ................. ............. .. 10-19 Exploring the grap h ........ ................. ................ ............ 10 -19 Calculating predicted values ......... ................. ............... 10-20 11 Inference aplet hp40g .book Page iv Friday, December 9, 2005 1:03 AM
v About the Inference aplet ............................. ................ ........ 11-1 Getting started with the Infe rence aplet ........................... .. 11-1 Importing sample statistics from the S tatistics aplet ......... ..... 11-4 Hypothesis tests ...................... ................ ................. ........... 1 1-8 One-Sample Z-Test ........... ................ .................... ........... 1 1-8 Two-Sample Z-Test ........ ................ ................ ................ .. 11-9 One-Proportio n Z-Test ................. ............. ................ ...... 11-10 Two-Proportion Z-Test .......... ................ ................. ......... 11 -11 One-Sample T-Test ........... ................ ................ ............. 1 1-12 Two-Sample T-Test ..................... ................ ................ ... 11-14 Confidence intervals .......................... ................ ................ 11-15 One-Sample Z-Interval ......... ................ ................. ......... 11 -15 Two-Sample Z-Interval ... ................ ................ ................ 11-16 One-Proportio n Z-Interval ........ ................. ................ ...... 11-1 7 Two-Proportion Z-Interval ............ ................ ................ ... 11-17 One-Sample T-Interval ...... ................ .................... ......... 11 -18 Two-Sample T-Interval.... ................ ................ ................ 11-19 12 Using the Finance Solver Background ............ ................ ............. ................ ............... 12-1 Performing TVM calculations .............. ................ .................. 1 2-4 Calculating Amortizatio ns. ................ ................ ............... 1 2-7 13 Using mathematical functions Math functions ........... ................ ................. ................... ..... 13-1 The MATH menu ............................. ................ ............... 13-1 Math functions by category ......... ................. ................ ........ 13-2 Keyboard functions ... ................. ................ ................ ..... 13-3 Calculus functions ..... ................. ................ ................ ..... 13-6 Complex number function s............. ................ ................ .. 13-7 Constants ................ ................. ................ ................ ..... 13-8 Conversions .......... ................ ................. ................ ........ 13-8 Hyperbolic trigonomet ry ...... .................... ................ ........ 13-9 List functions ................ ................ ............. ................ ... 13-10 Loop functions .................... ................ ................. ......... 13-1 0 Matrix functions ....... ................. ................ ................ ... 13-11 Polynomial functions ..... ................... ................ ............. 13-11 Probability functions ......... ................ ................ ............. 1 3-12 Real-number functions ............................. ................ ...... 13-14 Two-variable statistics ............. ................. ................ ...... 13-17 Symbolic functions ........................... ................ ............. 1 3-17 Test functions .. ................ ................ ................ ............. 13-19 Trigonometry functions ..................... ................ ............. 1 3-20 hp40g .book Page v Friday, December 9, 2005 1:03 AM
vi Symbolic calculations ........ ................ ................. ............... 13-20 Finding derivatives .............. ................ ................ ......... 13-21 Program constants and physical constants ......................... .. 13-24 Program constants ........ ................ .................... ............ 13 -25 Physical constants ..................... ................ ................. .. 13-25 14 Computer Algebra System (CAS) What is a CAS? ............ ................ ................ ................. .... 14-1 Performing symbolic calculations ............... ................ ........... 14-1 An example ............................. ................ ................. .... 14-2 CAS variables ............ ................ ................ ................ ........ 14-4 The current variable ............................... ................ ........ 14-4 CAS modes . ................. ................ ................ ................. .... 14-5 Using CAS functio ns in HOME ............... ................ .............. 14-7 Online Help ............... ................ ................ ................ ........ 14-8 CAS functions in the Equation W riter ............ ................ ........ 14-9 ALGB menu .... ................ ................. ................ ............ 14-10 DIFF menu ... ................ ................ ................. ............... 14-16 REWRI menu .. ................ ................. ............. ............... 14-28 SOLV menu .............. ................ ................ ................. .. 14-33 TRIG menu ............... ................ ................ ................. .. 14-38 CAS Functions on the MATH menu ............ ................ ......... 14-45 Algebra menu ................ ................. ................ ............ 14 -45 Complex menu ......................... ............. ................ ...... 14-45 Constant menu ................... ................ ................ ......... 14-46 Diff & Int menu .. ................. ................ ................ ......... 14-46 Hyperb menu .............. ................ ................. ............... 14-46 Integer menu ............ ................ ................ ................. .. 14-46 Modular menu ....... ................ ................ ................ ...... 14-51 Polynomial menu ...................... ................ ................. .. 14-55 Real menu ......... ................. ................ ................ ......... 14-60 Rewrite menu ........... ................ ................ ................. .. 14-60 Solve menu . ................ ............. ................ ................. .. 14-60 Tests menu ..... ............. ................ ................. ............... 14-61 Trig menu ................... ................ ................. ............... 14-61 CAS Functions on the CMDS menu ..... ................. ............... 14-62 15 Equation Writer Using CAS in the Equation Write r ...................... ................ . 15-1 The Equation Writer me nu bar .............. ................ ........... 15-1 Configuration menu s ........... ................ ................... ........ 15-3 Entering expressions and s ubexpressions .............. ................ . 1 5-5 How to modify an expres sion . ................ ................ ...... 15-11 hp40g .book Page vi Friday, December 9, 2005 1:03 AM
vii Accessing CAS function s ............. ................. ................ ...... 15-12 Equation Writer variable s . ................ ................ ................ 1 5-16 Predefined CAS variables ................ ................ ............. 15 -16 The keyboard in the Eq uation Writer ........ ................ ...... 15-17 16 Step-by-Step Examples Introduction . ................ ................. ................ ................ ..... 16-1 17 Variables and memory management Introduction ..... ................. ................ ................ ................ .. 17-1 Storing and recalling variables ........................... .................. 17-2 The VARS menu ......... ................ .................... ................ ..... 17-4 Memory Manager ......... ................. ................... ................ .. 17-9 18 Matrices Introduction ..... ................. ................ ................ ................ .. 18-1 Creating and storing matrices ................ ................ ............... 18-2 Working with matrices ... ................. ................ ................... .. 18-4 Matrix arithmetic ........ ................ ................. ................ ........ 18-6 Solving systems o f linear equations . ................... ............... 1 8-8 Matrix functions and commands ................ .................... ...... 18-10 Argument conventions ...... ................ ................ ............. 1 8-10 Matrix functions ....... ................. ................ ................ ... 18-10 Examples ............ ................ ................ ................ ............. 1 8-13 19 Lists Displaying and editing lists.... ................ ................ ............... 1 9-4 Deleting lists ......................... ................. ................ ........ 19-6 Transmitting lists ................. ................ ................. ........... 19-6 List functions ........ ................ ................ ................ ............... 19-6 Finding statistical values for list elements ........ ................... ..... 19-9 20 Notes and sketches Introduction ..... ................. ................ ................ ................ .. 20-1 Aplet note view ................. ................ ................... ............... 20-1 Aplet sketch view .......... ................. ................... ................ .. 20-3 The notepad ........... ................ ................ .................... ........ 20-6 21 Programming Introduction ..... ................. ................ ................ ................ .. 21-1 Program catalog ...... ................. ................ ................ ..... 21-2 Creating and editing prog rams .............. .................... ........... 2 1-4 Using programs ... ................ ................ .................... ........... 2 1-7 Customizing an aplet ............... ................ ................. ........... 2 1-9 hp40g .book Page vi i Friday, December 9 , 2005 1:03 AM
viii Aplet naming convention ........ ................ ................ ...... 21-10 Example .................. ................ ................ ................. .. 21-10 Programming commands ................... ................. ............... 21-13 Aplet commands ............. ................. ................ ............ 21 -14 Branch commands ................. ................... ................. .. 21-17 Drawing commands ............... ................ ................ ...... 21-19 Graphic commands ......... ................. ................ ............ 21 -21 Loop commands ................. ................ ................ ......... 21-23 Matrix commands .. ................ ................ ................ ...... 21-24 Print commands . ................. ................ ................ ......... 21-25 Prompt commands........ ................ ................. ............... 21-26 Stat-One and Stat-Two commands ......... ................ ......... 21-29 Stat-Two commands ........ ................. ................ ............ 21 -30 Storing and retrieving variables in programs ............. ...... 21-31 Plot-view variable s .... ................ ................ ................. .. 21-31 Symbolic-view variab les ............. ................ ................. .. 21-38 Numeric-view variables ... ................. ................ ............ 21 -40 Note variables ............. ................ ................. ............... 21-43 Sketch variables .......... ................ ................. ............... 21-43 22 Extending aplets Creating new aplets based on exis ting aplets.... .................... . 22-1 Using a custom ized aplet .............. ................. ................ . 22-3 Resetting an aplet .................... ................ ................ ........... 22-3 Annotating an aplet with notes ............... ................ .............. 2 2-4 Annotating an aplet with ske tches ................. ................ ........ 22-4 Downloading e-less ons from the web ................... ................ . 22-4 Sending and receiving aplets .......... ................ .................... . 22-4 Sorting items in the aplet library menu list ... ................ ........... 22-6 Reference information Glossary ................ ................. ................ ................ ............. R-1 Resetting the HP 4 0gs .... ................ ................ ................. ...... R-3 To erase all memory and res et defaults ..... ................ .......... R-3 If the calculator does no t turn on . .................... ................ ... R-4 Operating details ................ ................. ................ ................ R-4 Batteries .................. ................ ................ ................. ...... R-4 Variables ......... ................ ................ ................. ................ ... R-6 Home variables ........................ ................ ................. ...... R-6 Function aplet variables ....... ................... ................ .......... R-7 Parametric aplet variables ............. ................. ................... R-8 Polar aplet variables ........... ................... ................ .......... R-9 Sequence aplet variables . ................. ................ .............. R-10 hp40g .book Page vi ii Friday, December 9, 2005 1:03 AM
ix Solve aplet variables ........... ................ ................. ........... R-11 Statistics aplet variables ............. ................... ................ .. R -12 MATH menu categ ories . ................. ................ ................ ..... R-13 Math functions ... ................ ................ ................. ........... R-13 Program constants . ................ ................. ................ ........ R-15 Physical Constants .............. ................ ................. ........... R-16 CAS functions .................... ................ ................. ........... R-17 Program commands ......... ................ ................ ............... R-19 Status messages ... ................ ................ ................ ............... R-2 0 Limited Warranty Service .... ............. ................ ................. ................ ........ W-3 Regulatory Notices .......... ................ ................ ............... W-5 Index hp40g .book Page ix Friday, December 9, 2005 1:03 AM
hp40g .book Page x Friday, December 9, 2005 1:03 AM
P-1 Preface The HP 40gs is a feature-rich graphing calculator. It is also a powerful mathematics learning tool, with a built-in computer algebra system (CAS). The HP 40gs is designed so that you can use it to explore mathematical functions and their properties. You can get more information on the HP 40gs from Hewlett-Packardâs Calcula tors web site. You can download customized aplets from the web site and load them onto your calculator. Customized aplets are special applications developed to perform certa in functions, and to demonstrate mathematical concepts. Hewlett Packardâs Calculators web site can be found at: http://www.hp.com/calcula tors Manual conventions The following conventions are used in this manual to represent the keys that you pres s and the menu options that you choose to perform the described operations. ⢠K e y pr esse s ar e repr esented a s follo w s: , , , etc . ⢠Shift k ey s, that is the ke y fu nctions that y ou acce ss b y pres sing the ke y first , are r epres ented as follo ws: CLEAR , MODES , ACOS , etc. ⢠Numbers and letters are r epr esented normally , as follo ws: 5, 7 , A, B, etc . ⢠Menu opti ons, that is , the functio ns that you s elect using the menu ke y s at the top of the k e ypad ar e repr esented as follo ws: , , . ⢠Input form fi elds an d choose list items are repr esented as fo llow s: Function , Polar , Parametric ⢠Y our entr ies as the y appear on the command line or w ithin input forms ar e repr esented as f ollo ws: 2*X 2 -3X 5 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
P-2 Notice This manual and any examples contained herein are provided as-is and are subject to change without notice. Except to the extent prohibit ed by law, Hewlett-Packard Company makes no express or implied warranty of any kind with regard to this manu al and specifically di sclaims the implied warranties and conditions of merchantability and fitness for a part icular purpose and Hewlett-Packard Company shall not be liable for any errors or for incidental or consequential damage in connection with the furnishing, performance or use of this manual and the examples herein. © Cop y r ight 199 4 -199 5, 19 9 9- 2000, 200 3, 2006 Hew lett-P ackar d Dev elopment C ompan y , L. P . The programs that control your HP 40gs a re copyrighted and all rights are reserved. Reproduction, adaptation, or translation of those programs without prior written permission from Hewlett-Packard Company is also prohib ited. Preface.fm Page 2 Friday, February 17, 2006 9:47 AM
Getting started 1-1 1 Get ting star ted On/off, cancel operations To turn on Press to turn on the calculator. To cancel When the calculator is on, the key cancels the current operation. To turn off Press OFF to turn the calculator off. To save power, the calculat or turns itself off after several minutes of inactivity. All stored and displayed information is saved. If you see the (( ⢠)) annunciator or the Low Bat message, then the calculator needs fresh batteries. HOME HOME is the calculatorâs home view and is common to all aplets. If you want to perform calculations, or you want to quit the current activity (such as an aplet, a program, or an editor), press . All mathematical functions are available in the HOME. The name of the current aplet is displayed in the title of the home view. Protective cover The calculator is provided with a slide cover to protect the display and keyboard. R emove the cover by grasping both sides of it and pulling down. You can revers e the slide cover and slide it onto the back of the calculator. this will help prevent you losing the cover while you are using the calculator. To prolong the life of the calculator, always place the cover over the display and k eyboard when you are not using the calculator. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
1-2 Getting started The display To adjust the contrast Simultaneously press and (or ) to increase (or decrease) the contrast. To clear the display ⢠Pres s CANCEL to clear the edit line . ⢠Pres s CLEAR to cle ar the edit line and the display history . Parts of the display Menu key or soft key labels. The la bels for the menu k ey s â cur r ent meanings . is the label f or the f irst menu k ey in this pi ctur e. âPr ess â means to press the fir st menu k ey , that is, the leftmost t op-ro w k ey on the calculator k e yboar d. Edit line. The line of current en try. History. The HOME display ( ) shows up to four lines of history: the most r ecent input and output. Older lines scroll off the top of the display but are retained i n memory. Title. The name of the current aplet is displayed at the top of the HOME view. RAD, GRD, DEG specify whether Radians, Grad s or Degrees a ngle mode i s set for HOME. The T and S symbols indicate whether there is more history in the HOME displa y. Press the and to scroll in the HOME display. Title Edit lin e History Menu k ey labels hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Getting started 1-3 Annunciators . Annunciators are sy mbo ls that appear above the title bar and give you important status information. The keyboard Annunciator Description Shift in effect for next keystroke. To cancel, press again. α Alpha in effect for next keystroke. To cancel, press again. (( ⢠)) Low battery power. Busy. Data is being transferred. HP 4 0 g s Gr a phing C alc ulator Menu Key Labels Menu Keys Cursor Aplet Control Alpha Key Shift Key Enter Keys Key Keys hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
1-4 Getting started Menu keys ⢠On the calculato r ke yboar d , the top ro w of k ey s ar e called menu k ey s. T heir meanings depend on the conte xtâthatâs w hy the y ar e blank. T he menu k e y s are so metimes called â soft k ey sâ . ⢠The bo ttom line of the displa y sho ws the labels f or the menu k ey s â cur rent meanings . Aplet control keys The aplet control keys are: Ke y Meaning Displays the Symbolic view for the current aplet. See âSymbolic viewâ on page 1-16. Displays the Plot view for the current aplet. See âPlot viewâ on page 1-16. Displays the Numeric view fo r the current aplet. See âNumeric viewâ on page 1-17. Displays the HOME view. See âHOMEâ on page 1-1. Displays the Aplet Library menu. See âAplet libraryâ on page 1-16. Displays the VIEWS menu. See âAplet viewsâ on page 1-16. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Getting started 1-5 Entry/Edit keys The entry and edit keys are: K ey Meaning ( CANCEL ) Cancels the current operation if the calculator is on by pressing . Pressing , then OFF turns the calculator off. Accesses the function printed in blue above a key. Returns to the HOME view, for performing calculations. Accesses the alphabetical characters printed in orange below a key. Hold down to enter a string of characters. Enters an input or executes an operation. In calculations, acts like â=â. When or is present as a menu key, acts the same as pressing or . Enters a negative number. To enter â25, press 25. Note: this is not the same operation that the subtract button performs () . Enters the independent var iable by inserting X , T, θ, or N into the edit line, depending on the current active aplet. Deletes the character under the cursor. Acts as a backspac e key if the cursor is at the end of the line. CLEAR Clears all data on the screen. On a settings screen, for example Plot Setup, CLEAR returns all settings to their default values. , , , Moves the cursor around the display. Press first to move to the beginning, end, top or bottom. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
1-6 Getting started Shifted keystr okes There are two shift keys that you use to access the operations and characters printed above the keys: and . CHARS Displays a menu of all available characters. To type one, use the arrow keys to highlight it, and press . To select multiple characters, select each and press , then press . Ke y Meaning (Continued) Key De s c r ip t i o n Press the key to access the operations printed in blue above the keys. Fo r instance, to access the Modes screen, press , then press . ( MODES is labeled in blue above the key). You do not need to hold down when you press HOME. This action is depicted in this manual as âpress MODES .â To cancel a shift, press again. The alphabetic keys are also shifted keystrokes. For instance, to type Z, press Z. (The letters are printed in orange to the lower right of each key.) To cancel Alpha, pres s again. For a lower case letter, press . For a string of letters, hold down while typing. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Getting started 1-7 HELPWITH The HP 40gs built-in help is available in HOME o nly. It provides syntax help for bu ilt-in math functions. Access the HELPWITH command by pressing SYNTAX and then the math key for which you require syntax help. Example Pres s SYNTAX Note: R emov e the left paren thesis fr om built-in functi ons suc h as sine, co sine, and ta ngent bef ore inv oking the HELPWI TH command . Note: In the CA S s ys tem, pr essing the S YNT AX w ill sho w the CAS help men u . Math keys HOME ( ) is the place to do non-symbolic calculations. (For symbolic ca lculations, use the computer algebra system, referred throug hout this manual as CAS). Keyboard keys. The most common operations ar e available from the keyboard, such as the arithmetic (like ) and trigonometric (lik e ) functions. Press to complete the operation: 256 displays 16. . MATH menu. Press to open the MATH menu. The MATH menu is a comprehensive list of math functions that do not appear on the keyboard. It also includes categories for all other functions and c onstants. The functions are grouped by category, ranging in alphabetical order from Calculus to Trigono metry. ⢠The ar r ow k e y s scr oll thr ough the list ( , ) and mov e fr om the category list in the left column to the item lis t in the righ t column ( , ). ⢠Pres s to insert the selected command onto the edit line . ⢠Pre ss to dismiss the MA TH menu w ithout selecting a co mmand. chapter-1.fm Page 7 Friday, Decembe r 16, 2005 2:20 PM
1-8 Getting started ⢠Pr essing display s the list of Pr ogr am Const ants. Y ou c an use thes e in progr ams that you d eve l op. ⢠Pr essing display s a menu of ph ys ical constants fr om the fields of c hemistry , physi cs, and quantum mechani cs. Y ou can use these constan ts in calculati ons . (pSee âPh y sical constants â on page 13- 25 f or mor e infor mation .) ⢠Pr essing takes y ou to the beginning of the MA TH menu . See âMath functions by categoryâ on page 13-2 for details of the math functions. HINT When using the MA TH menu , or an y menu on the HP 40gs , pressing an alpha ke y takes y ou straight to the fir st menu optio n beginning with that alpha ch arac ter . With this method, y ou do n ot need to pr ess fir st. Just pr ess the k ey that corr esponds t o the commandâs beginning alpha charac ter . Note that when the MATH menu is open, you can also access CAS commands. You do this by pressing . This enables you to use CAS commands on the HOME screen, without opening CAS. See Chapter 14 for details of CAS commands. Program commands Pressing CMDS displays the list of Program Commands. See âProgramming commandsâ on page 21-1 3. Inactive keys If you press a key that does not operate in the current context, a warning symbol like this appears. There is no beep. Menus A menu offers you a choice of items. Menus are displayed in one or two columns. ⢠Th e a rrow i n t h e display means mor e items belo w . ⢠Th e a rrow i n t h e display means mor e items abov e. ! hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Getting started 1-9 To search a menu ⢠Pres s or to scr oll through the list. If y ou pres s or , y ouâll go all the w ay to the end or the beginning of the list . Hi ghlight the item y ou want to s elect , then pres s (or ). ⢠If there ar e two columns , the left column shows gener al categor ies and the r ight column sho ws spec ifi c conte nts within a catego ry . Hi ghlight a gener al category in the left column , then highlight an item in the r ight column . The list in the r ight column change s when a diff eren t category is highligh ted. Pres s or w hen y ou hav e highlight ed your select ion. ⢠T o speed-sear ch a list , t ype the f irst lette r of the w ord . F or e xample , to f ind the Matri x category in , pr ess , the A lpha âMâ k ey . ⢠T o go up a page, yo u can press . T o go dow n a page , press . To cancel a menu Press (for CANCEL ) or . This cancels the current operation. Input forms An input form shows several fields of information for you to examine and specify. After highlighting the field to edit, you can enter or edit a number (or expression). You can also select options from a list ( ). Some input forms include items to check ( ). See below for examples input forms. Reset input form values To reset a field to its default values in an input form, move the cursor to that field and p ress . To reset all default field values in the input form, press CLEAR . hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
1-10 Getting started Mode settings You use the Modes input form to set the modes for HOME. HINT Although the numeric setting in Modes affects only HOME, the angle setting controls HOME and the current aplet. The angle setting selected in Modes is the angle setting used in both HOME and current aplet. To further configure an aplet, you use the SETUP keys ( and ) . Press MODES to access the HOME MODES input form. Setting Options Angle Measure Angle values are: Degrees . 360 degrees in a circle. Radians . 2 Ï radians in a circle. Grads . 400 grads in a circle. The angle mode you set is the angle setting used in both HOME and the current aplet. This is done to ensure that trigonometric calculations done in the current aplet and HOME give the same result. Number Format The number format mode you set is the number format used in both HOME and the current aplet. Standard . Full-precision display. Fixed . Displays results rounded to a number of decimal places. Example: 123.456789 becomes 123.46 in Fixed 2 format. Scient ific . Displays results with an exponent, one digit to the left of the decimal point, and the specified number of decimal places. Example: 123.456789 becomes 1.23E2 i n Scientific 2 format. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Getting started 1-11 Setting a mode This example demonstrates how to change the angle measure from the default mode, radians, to degrees for the current aplet. The procedure is the same for changing number format and decimal mark modes. 1. Pres s MODES t o o p e n t h e H O M E M O D E S i n p u t form. Engineering . Displays result with an exponent that is a multiple of 3, and the specified number of significant digits beyond the first one. Example: 123.456E7 becomes 1.23E9 in Engineering 2 format. Fraction . Displays results as fractions based on the spec ified number of decimal places. Examples: 123.456789 becomes 123 in Fraction 2 format, and .333 becomes 1/3 and 0.142857 beco mes 1/7. See âUsing fractionsâ on page 1-25. Mixed Fraction . Displays results as mixed fractions based on the specified number of decimal places. A mi xed fraction has an in teger part and a fractional part. Examples: 123.456789 becomes 123 16/ 35 in Fraction 2 format, and 7÷ 3 returns 2 1/3. See âUsing fractionsâ on page 1-25. Decimal Mark Dot or Comma . Displays a number as 12456.98 (Dot mode) or as 12456,98 (Comma mode). Dot mode uses commas to separate elements in lists and matrices, and to separate function arguments. Comma mode uses periods (dot) as separators in these contexts. Setting Options (Continued) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
1-12 Getting started The c ursor (hi ghlight) is in the firs t fie ld, Angle Measure . 2 . Pres s to display a lis t of choices. 3. Pre s s to select Degrees , and press . The angle measur e changes to degrees. 4. Pres s to return to HOME . HINT Whenever an input form has a list of choices for a field, you can press to cycle through them instead of using . Aplets (E-lessons) Aplets are the application environments where you explore different classes of mathematical operations. You select the aplet that you want to work with. Aplets come from a variety of sources: ⢠Built-in the HP 40gs (initial pur chas e) . ⢠Aplets cr eated by sa ving e x isting aplets, whi ch ha ve been modified , with spec if ic confi gurati ons. See âCreating ne w aplets based on e xisting aplets â on page 2 2-1. ⢠Do wnloaded f rom HPâs C alculat ors w eb site . ⢠Copi ed fr om another calc ulator . Aplets are stored in the Aplet library. See âAplet libraryâ on page 1-16 for further information. You can modify configuration settings for the graphical, tabular, and chapter-1.fm Page 1 2 Friday, Decemb er 9, 2005 1:26 AM
Getting started 1-13 symbolic views of the aplets in the following table. See âAplet view configurationâ on page 1-18 for further information. In addition to these aplets, wh ich can be used in a variety of applications, the HP 40 gs is supplied with two teaching aplets: Quad Explorer and Trig Explorer. You cannot modify configuration settings for these apl ets. A great many more teaching ap lets ca n be found at HPâs web site and other web sites created by educators, together with accompanying documentation, often with student work sheets. These ca n be downloaded free of Aplet name Use this aplet to explor e: Function Real-valued, rectangular functions y in terms of x . Example: . Inference Confidence intervals and Hypothesis tests based on the Normal and Students-t distributions. Parametric Parametric relations x and y in terms of t . Example: x = cos(t ) and y = sin(t ). Polar Polar functions r in terms of an angle θ . Example: . Sequence Sequence functions U in terms of n , or in terms of previous terms in the same or another sequence, such as and . Example: , and . Solve Equations in one or more real-valued variables. Example: . Finance Time Value of Money (TVM) calculations. Linear Solver Solutions to sets of two or three linear equations. Triangle Solver Unknown values for the lengths and angles of triangles. Statistics One-variable ( x ) or two-variable ( x and y ) statistical data. y 2 x 2 3 x 5 = r 24 θ () cos = U n 1 â U n 2 â U 1 0 = U 2 1 = U n U n 2 â U n 1 â = x 1 x 2 x â2 â = hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
1-14 Getting started charge and transferred to the HP 40gs using the provided Connectivity Kit. Quad Explorer aplet The Quad Explorer aplet is used to investigate the behaviour of as the values of a , h and v change, both by manipulati ng the equation and seeing the change in the graph, and by manipulating the graph and seeing the change in the equat ion. HINT More detailed documentation, and an accompanying student work sheet can be found at HPâs web site. Pres s , select Quad Explorer , and then press . The Quad Explore r aplet opens in mode, in which the arrow keys, the and keys, and the ke y are used to change the shape of the graph. This changing shape is reflected in the equation displayed at the top right corner of the screen, while the original graph is retained for compar ison. In this mode the graph controls the equation. It is also possible to have the equation control the graph. Pressing displays a sub-expression of your equation. Pressing the and key moves between sub- expressions, while pressing the and key changes their values. Pressing allows the use r to select whether all three sub-expressions will be explored at once or only one at a time. A button is provided to evaluate the studentâs knowledge. Pressing displays a target quadr atic graph. The student must manipulate the equationâs parameters to make the equation match the target graph. When a student feels that they have correctly chosen the parameters a button eval uates th e answer and provide feedb ack. An button is provided for those who give up! ya x h () 2 v = hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Getting started 1-15 Trig Explorer aplet The Trig Explorer aplet is used to investigate the behaviour of the graph of as the values of a , b , c and d change, both by manipulating the equation and seeing the change in the graph, or by manipulating the graph and seeing the change in the equation. Press , select Trig Explorer , and then press to display the screen shown right. In this mode, the graph controls the equation. Pressing the and keys transforms the graph, with these transformations reflected in the equation. The button labelled is a toggle between and . When is chosen, the âpoint of controlâ is at the origin (0,0) and the and keys control vertical and horizontal transformations. When is chosen the âpoint of controlâ is on the first extremum of th e graph (i.e. for the sine graph at . The arrow keys change the amplitude and frequency of the graph. This is most easily seen by experimenting. Pressing displays the equation at the top of the screen. The equat ion is controlled by the graph. Pressing the and keys moves from parameter to parameter. Pressing the or key changes the parameterâs values. The default angle setting for this aplet is radians. The angle setting can be changed to degrees by pressing . ya b x c () d sin = Origin Ï 21 , â () Extremum hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
1-16 Getting started Aplet library Aplets are stored in the Aplet library. To open an aplet Press to display the Aplet library menu. Select the aplet and press or . From within an aplet, you can return to HOME any time by pressing . Aplet views When you have configured an aplet to define the relation or data that you want to explore, you can display it in different v iews. Here a re illu strations of the three major aplet views (Symbolic, Plot, and Numeric), the six supporting aplet views (from the VIEWS menu), and the two user-defined views (Note and Sketch). Note : some apletsâsuch as the Linear Solver aplet and the Triangle Solver apletâonly have a single view, the Numeric view. Symbolic view Pr ess to display the apletâs Sy mbolic v iew . Y ou use this v ie w to define the functi on(s) or equati on(s) that yo u want to e xplore . See âAbout the Symbolic viewâ on page 2-1 for further information. Plot view Pres s to display the apletâs P lot vie w . In this v ie w , the functi ons that you ha ve def ined are display ed gr aphicall y . See âAbout the Plot viewâ on page 2-5 for further information. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Getting started 1-17 Numeric view Press to display the apletâs Numeric view. In this view, the functions that you have defined are displayed in tabular format. See âAbout the numeric viewâ on page 2-16 f or further information. Plot-Table view The VIEWS menu contains the Plot-Table view. Select Plot-Table Splits the screen into the plot and the data table. See âOther views for scaling and splitting the graphâ on page 2-13 for futher information. Plot-Detail view The VIEWS menu contains the Plot-Detail view. Select Plot-Detail Splits the screen into the plot and a close-up. See âOther views for scaling and splitting the graphâ on page 2-13 for further information. Overlay Plot view The VIEWS menu contains the Overlay Plot view. Select Overlay Plot Plots the current expression(s) without erasing any pre-existing plot(s). See âOther views for scaling and splitting the graphâ on page 2-13 for further information. hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
1-18 Getting started Note view Press NOTE to display the apletâs note view. This note is transferred with the aplet if it is sent to another calculator or to a PC. A note view contains text to supplement an aplet. See âNotes and sketchesâ on pa ge 20-1 for further information. Sketch view Press SKETCH to disp lay the ap letâs sket ch view. Displays pictures t o supplement an aplet. See âNotes and sketchesâ on page 20-1 for further information. Aplet view configuration You use the SETUP keys ( , an d ) to configure the aplet. For example, press SETUP - PLOT ( ) to display the input form for setting the apletâs plot settings. Angle measure is controlled using the MODES view. Plot Setup Press SETUP - PLOT . Sets parameters to plot a graph. Numeric Setup Press SETUP - NUM . Sets parameters for building a table of numeric values. Symbolic Setup This view is only available in the Statistics aplet in mode, where it plays an important role in choosing data models. Press SETUP - SYMB . hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Getting started 1-19 To change views Each view is a separate environment. To change a view, select a different view by pressing , , keys or select a view from the VIEWS menu. To change to HOME, press . You do not explicitly close the current view, you just ente r another oneâlike passing from one room into another in a house. Data that you enter is automatically saved as you enter it. To save aplet configuration You can save an aplet config uration that you have used, and transfer the aplet to other HP 40gs calculators. See âCreating new aplets based on existing apletsâ on page 22-1. Mathematical calculations The most commonly used math operations are available from the keyboard. Access to other math functions is via the MATH menu ( ). You can also CAS for symbolic calculations. See âComputer Algebra System (CAS)â on page 14-1 for further information. To access programming commands, press CMDS . See âProgramming commandsâ on page 21-13 for further information. Where to start The home base for the calculator is the HOME view ( ). You can do all non-sym bolic calculations here, and you can access all operations. (Symbolic calculations are done using CAS.) Entering expressions ⢠In the HOME view, you enter an e xpr essio n in the same left-to -right or der that y ou would w r ite the expr ession . This is called algebrai c entry . (In CAS you enter expressions using the Equation Writer, explained in detail in Chap ter 15, âEquation Writerâ.) ⢠T o enter functions, select the key or MA TH menu i tem for that f unction . Y ou can also enter a func tion b y using the Alpha k e ys t o spell out its name . ⢠Pres s to evaluate the expr ession y ou have in the edit line (w here the blinking c ursor is). An exp res s io n can contain numbers , functi ons, and varia bl es. hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
1-20 Getting started Example Calculate : Long results If the result is too long to fit on the display line, or if you want to see an expression in textbook format, press to highlight it and then press . Negative numbers Type to start a negative number or to insert a negative sign. To raise a negative number to a power, enclose it in parentheses. For example, (â5) 2 = 25, whereas â5 2 = â25. Scientific notation (powers of 10) A number like or is written in scientific notation , that is, in terms of powers of ten. This is simpler to work with than 50000 or 0.00000 0321. To enter numbers like these, use EEX . (This is easier than using 10 .) Example Calculate 4 EEX 13 6 EEX 23 3 EEX 5 Explicit and implicit multiplication Implied multiplication takes pl ace when two operands appear with no operator in between. If you enter AB , for example, the result is A*B . 23 2 14 8 â 3 â --------------------------- - 45 () ln 23 14 8 3 45 51 0 4 Ã 3.21 10 7 â Ã 41 0 13 â Ã () 61 0 23 Ã () 31 0 5 â Ã ---------------------------------------------------- hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Getting started 1-21 However, for clarity, it is better to include the multiplication sign where you expect multiplication in an expression. It is clearest to enter AB as A*B . HINT Implied multiplication will not always work as expected. For example, entering A(B 4) will not give A*(B 4) . Instead an error message is displayed: âInvalid User Functionâ. This is because the calculator interprets A(B 4) as meaning âevaluate function A at the value B 4 â, and fun ction A does not exist. When in doubt, insert the * sign manually. Parentheses You need to use parentheses to enclose arguments for functions, such as SIN(45). You can omit the final parenthesis at the end of an edit line. The calculator inserts it automatically. Parentheses are also important in specifying the order of operation. Without parentheses, the HP 40gs calculates according to the order of algebraic precedence (the next topic). Following are some examples using parentheses. Entering... Calculates... 45 Ï sin (45 Ï) 45 Ï sin (45) Ï 85 9 85 9 85 9 Ã 85 9 Ã hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
1-22 Getting started Algebraic precedence order of evaluation Functions within an expression are evaluated in the following order of precedence. Functions with the same precedence are evaluated in order from left to right. 1. Ex pressions within p arentheses. Neste d parenth eses are e valuated fr om inner to outer . 2 . Pr efi x func tions, suc h as SIN and L OG . 3 . P ostfi x func tions , such as ! 4. P ow er functi on , ^, NTHROO T . 5 . Negation , multiplicati on, and di v ision . 6 . Additi on and subtr acti on. 7. A N D a n d N O T . 8. OR and XOR . 9 . Le ft argument o f | (w here). 10. Eq uals, =. Largest and smallest numbers The smallest number the HP 40gs can represent is 1Ã1 0 â499 (1Eâ499). A smaller result i s displayed as zero. The largest number is 9.9 9999999999 à 10 499 (1E499). A greater result is displayed as this number. Clearing numbers ⢠clears the c harac ter under the c ursor . When the cur sor is positi oned after the last c haract er , deletes the c har acter to the le ft of the cur sor , that is, it performs the same as a backspace k ey . ⢠CANCEL ( ) clears the edit line . ⢠CLEAR clear s all input and outpu t in the display , including the di splay history . Using previous results The HOME display ( ) shows you four lines of input/output history. An un limited (except by memory) number of previous lines ca n be displayed by scrolli ng. You can retrieve and reuse any of these values or expressions. Output Last output Input Last input Edit line hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Getting started 1-23 When you highlight a previous input or result (by pressing ), the and menu labels appear. To copy a previous line Highlight the line (press ) and press . The number (or expression) is co pied into the ed it line. To reuse the last result Press ANS (last answer) to put the last result from the HOME display into an expression. ANS is a varia ble that is updated each time you press . To repeat a previous line To repeat the very last line, just press . Otherwise , highlight the line (press ) first, and then pres s . The highlighted expression or numbe r is re-entered. If the previous line is an expression containing the ANS , the calculation is re peated iteratively. Example See how ANS retrieves and reuses the last result (50), and updates ANS (from 50 to 75 to 100). 50 25 You can use the las t result as the first expression in the edit line without pressing ANS . Pressing , , , or , (or other operators th at require a preceding argument) automatically enters ANS before the operator. You can reuse any other ex pression or value in the HOME display by highlighting the expression (using the arrow keys), then pressing . See âUsing previous resultsâ on page 1-22 for more details. The variable ANS is different from the numbers in HOMEâs display history. A value in ANS is stored internally with the full precision of the calculated result, whereas the displayed numbers match the display mode. hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
1-24 Getting started HINT When you retrieve a number from ANS , you obtain the result to its full precision. When you retrieve a number from the HOMEâs display history, you obtain exactly what was displayed. Pressing evaluates (or re-evaluates) the last input, whereas pressing ANS copies the last result (as ANS ) into the edit line. Storing a value in a variable You can save an answer in a variable and use the variable in later calculation s. There are 27 variables available for storing real values. These are A to Z and θ . See Chapter 17, âVariables and memory managementâ for more information on variables. For example: 1. P erform a calculati on. 45 8 3 2 . Stor e the re sult in the A va ria bl e. A 3 . P erform ano ther calculatio n using the A var iable . 95 2 A hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Getting started 1-25 Accessing the display history Pressing enables the highlight bar in the display history. While the highlight bar is active, the following menu and keyboard keys are very useful: Clearing the display history Itâs a good habit to cl ear the display history ( CLEAR ) whenever you have finish ed working in HOME. It saves calculator memory to clear the display history. Remember that all your previous inputs and results are saved until you clear them. Using fractions To work with fractions in HOME, you set the number format to Fraction or Mixed Fraction , as follows: Setting Fraction mode 1. In HOME , open the HOME MODES input f orm . MODES Key Fu n c t i o n , Scrolls through the display history. Copies the highlighted expression to the position of the cursor in the edit line. Displays the current expression in standard mathematical form. Deletes the highlighted expression from the display history, unless there is a cursor in the edit line. CLEAR Clears all lines of display history and the edit line. hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
1-26 Getting started 2 . Select Number Format , press to display the options , and highlight Fraction or Mixed Fraction . 3 . Press to selec t the Number F ormat option, then mov e to the precisi on value field . 4. Enter the prec ision v alue that you w ant to use , and pre ss to set the pr ec ision . Pr ess to r etur n to HOME . See âSetting fr action pr ec ision â belo w for mor e infor mation . Setting fraction precision The fraction precision setting determines the prec ision in which the HP 40gs converts a decimal value to a fraction. The greater the precision value that is set, the closer the fraction is to the decim al value. By choosing a precision of 1 you are saying th at the fraction only has to match 0.234 to at least 1 decimal place (3/13 is 0.23076...). The fractions used are found using the technique of continued fractions. When converting recurring decimals this can be important. For example, at precision 6 the decimal 0.6666 becomes 3333/5000 (6666/10000) wherea s at precision 3, 0.6666 becomes 2/3, whi ch is probably what you would want. For example, when converting .234 to a fraction, the precision value has th e following effect: hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Getting started 1-27 ⢠Prec ision set to 1: ⢠Prec ision set to 2 : ⢠Prec ision set to 3: ⢠Prec ision set to 4 Fraction calculations When entering fractions: ⢠Y ou use the ke y to separate the numerator part and the denominator par t of the fr action . ⢠T o enter a mi xed f rac tion , fo r ex ample , 1 1 / 2 , you enter it in the for mat (1 1 / 2 ). For example, to perform the following calculation: 3(2 3 / 4 5 7 / 8 ) 1. Set the Number f ormat mode to Fraction or Mixed Fraction and spec ify a pr ec ision v alue of 4. In this example , we âll select Fraction as our form at. ) MODES Select Fraction 4 hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
1-28 Getting started 2. E n t e r t h e c a l c u l a t i o n . 32 3 45 7 8 Note: Ensur e y ou ar e in the HOME v ie w . 3 . Ev aluate the calc ulation. Note that if you had selected Mixed Fraction instead of Fraction as the Number format, the answer would have been expressed as 25 7/8. Converting decimals to fractions To convert a decimal value to a fraction: 1. Set the number format mode to Fraction or Mixed Fraction . 2 . E ither r etri ev e the value f r om the History , or ent er the value on the command line . 3 . Pr ess to con ve rt the number to a fr acti on. When converting a decimal to a fraction, keep the following points in mind: ⢠When con verting a rec urr ing dec imal to a frac tion , set the fr acti on pr ecisi on to about 6 , and ensur e that y ou include mor e than six dec imal places in the rec urring dec imal that y ou ente r . In this ex ample , the fr acti on prec ision is set to 6. The top calculati on r eturns the corr ect r esult . The bottom one does not . ⢠T o con vert an ex act dec imal to a fracti on, set the fr acti on prec ision t o at least two mor e than the number of dec imal places in the decimal . hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Getting started 1-29 In this ex ample , the fr action pr ec ision is set to 6. Complex numbers Complex results The HP 40gs can return a complex number as a result for some math functions. A comp lex number appears as an ordered pair ( x, y ), where x is the real part and y is the imaginary part. For example, entering returns (0,1). To enter complex numbers Enter the number in either of these forms, where x is th e real part, y is the imaginary part, and i is the im aginary constant, : ⢠( x, y ) or ⢠x iy . To enter i : ⢠pres s or ⢠pres s , or keys t o se l e ct Constant , to mov e to the r ight column of the menu , to select i , and . Storing comple x numbers There are 10 variables available for storing complex numbers: Z0 to Z9. To store a complex number in a variable: ⢠Enter the complex number , press , enter the var iable to s tor e the number in, and pr ess . 45 Z 0 1 â 1 â hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
1-30 Getting started Catalogs and editors The HP 40gs has several catalogs and editors. You use them to create and manipulate objects. They acc ess features and stored values (numbe rs or text or other items) that are independent of aplets. ⢠A catalog lists items, w hich y ou can delete or trans mit , for e xam ple an aplet . ⢠An editor lets you c reate or modify items and numbers, f or ex ample a not e or a matri x. Catalog/Editor Contents Aplet library () Aplets. Sketch editor ( SKETCH ) Sketches and diagrams, See Chapter 20, âNote s and sketchesâ. List ( LIST ) Lists. In HOME, lists are enclosed in {}. See Chapter 19, âListsâ. Matrix ( MATRIX ) One- and two-dimensional arrays. In HOME, arrays are enclosed in []. See Chapter 18, âMatricesâ. Notepad ( NOTEPAD ) Notes (short text entries). See Chapter 20, âNote s and sketchesâ. Program ( PROGRM ) Programs that you create, or associated with user-defined aplets. See Chapter 21, âProgrammingâ. Equation Writer () The editor used for creating expressions and equations in CAS. See Chapter 15, âEquation Writerâ. hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-1 2 Aplets and th eir vie ws Aplet views This section examines the options and functionality of the three main views for the Functio n, Polar, Parametric, and Sequence aplets: Symbolic, Plot, and Numeric views. About the Symbolic view The Symbolic view is the defining view for the Function, Parametric, Polar, and Seque nce aplets. The other views are derived from the symbolic expr ession. You can create up to 10 different definitions for each Function, Parametric, Polar, and Sequence aplet. You can graph any of the relations (in the same aplet) simultaneously by selecting them. Defining an expression (Symbolic view) Choose the aplet from the Aplet Library. Pres s or to select an aplet . The F unction, P arametr ic, P olar , and Sequence aplets start in the S ymboli c vi ew . If the highligh t is on an ex isting e xpr essio n, sc ro ll to an empty lin eâunless you don â t mind wr iting over the ex pre ssionâ or , clear one line ( ) or all lines ( CLEAR ). Expre ssions ar e selec ted (chec k mark ed) on entry . T o deselect an e xpres sion, pr ess . All selected expr essions ar e plotted. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
2-2 Aplets and their views â F or a Func tion definition , en ter an ex pre ssion t o def ine F(X) . The only independent variab le in th e exp re ss io n i s X. â For a P arametric definition , en ter a pair of expr essi ons to def ine X(T) and Y(T) . The onl y independent var iable in the e xpre ssions is T . â For a Pol a r definition , en ter an ex pre ssion t o def ine R ( θ ). T he only independent variab le in th e exp re ss io n i s θ . â For a S eq u e n ce definition , either enter the f irst te rm , or the fir st and second terms, for U (U1 , or ... U9 , or U0 ). Then define the n th term o f the sequence in ter ms of N or of the pri or ter ms, U(Nâ1) and/or U(Nâ2) . The expr essions should pr oduce real-valued sequences with in teger domains. Or def ine the n th term a s a non-rec ursi v e expr es sion in ter ms of n only . In this case, the calc ulator inserts the f irst two ter ms based on the e xpre ssion that y ou def ine . â Note : Y o u will hav e to enter the second term if the hp40gs is una ble to calculate it a utomaticall y . T ypi cally if U x(N) depends on U x(Nâ2) then yo u must enter Ux(2). hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-3 Evaluating expressions In aplets In the Symbolic view, a variable is a symbol only, and does not represent one specif ic value. To evaluate a function in Symbolic view, press . If a function calls another function, then resolves all references to other functions in terms of their independent variab le. 1. Choos e the F unction aplet. Select Function 2 . Enter the e xpressi ons in the F uncti on apletâs S ymboli c view . A B F1 F2 3 . Highli ght F3(X). 4. Pres s Note ho w the v alues for F1(X) and F2(X) ar e substitu ted into F3(X). hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
2-4 Aplets and their views In HOME You can also evaluate any expression in HOME by entering it into the edit line and pressing . For example, define F4 as below. In HOME, type F4(9) and press . This evaluates the expression, substituting 9 in place of X into F4 . SYMB view keys The following table details the menu keys that you use to work with the Symbolic view. Ke y Meaning Copies the highlighted expression to the edit line for editing. Press when done. Checks/unchecks the current expression (or set of expressions). Only checked expression(s) are evaluated in the Plot and Numeric views. Enters the independent variable in the Function aplet. Or, you can use the key on the keyboard. Enters the independent variable in the Parametric aplet. Or, you can use the key on the keyboard. Enters the independent variable in the Polar aplet. Or, you can use the key on the keyboard. Enters the independent variable in the Sequence aplet. Or, yo u can use the key on the keyboard. Displays the current expression in text book form. Resolves all references to other definitions in terms of variab les and evaluates all arithmetic expressions. Displays a menu for entering variable names or contents of variables. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-5 About the Plot view After entering and selecting (check marking) the expression in the Symbolic view, press . To adjust the appearance of the graph or the interval that is displayed, you can change the Plot view settings. You can plot up to ten expressions at the same time. Select the expressions you want to be plotted together. Setting up the plot (Plot view setup) Press SETUP - PLOT to define any of the settings shown in the next two tables. 1. Highli ght the fi eld to edit . â If ther e is a number to enter , type it in and pr ess or . â If ther e is an option to ch oose , pre ss , highligh t your c hoi ce, and pr ess or . As a shortcut to , jus t highlight the field to change and pr ess to cyc le thro ugh the options . â If there is an option to select or deselect , press to ch ec k o r u n che ck i t. 2 . Pr ess to vie w mor e settings. 3 . When done , pr ess to vie w the ne w plot. Displays the menu for enteri ng math operations. CHARS Displays special characters. To enter one, place the cursor on it and press . To remain in the CHARS menu and enter another special character, press . Deletes the highlighted expression or the current character in the edit line. CLEAR Deletes all expressions in the list or clears the edit line. K ey Meaning (Continued) hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
2-6 Aplets and their views Plot view settings The plot view settings are: Those items with space for a checkmark are settings you can turn on or off. Press to display the second page. Field Meaning XRNG, YRNG Specifies the minimum and maximum horizontal ( X ) and vertical ( Y ) values for the plotting window. RES For function plots: Resolution; âFasterâ plots in alternate pixel columns; âDetailâ plots in every pixel column. TRNG Parametric aplet: Specifies the t- values ( T ) for the graph. θ RNG Polar aplet: Specifies the angle (θ ) value range for the graph. NRNG Sequence aplet: Specifies the index ( N ) values for the graph. TSTEP For Parametric plots: the increment for the independent variable. θ STEP For Polar plots: the increment value for the independent variable. SEQPLOT For Sequence a plet: Stairstep or Cobweb types. XTICK Horizontal spacing for tickmarks. YTICK Vertical spacing for tickmarks. Field Meaning SIMULT If more than one relation is being plotted, plots them simultaneously (otherwise sequentially). INV. CROSS Cursor crosshairs invert the status of the pixels they cover. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-7 Reset plot settings To reset the default values for all plot settings, press CLEAR in the Plot Setup view. To reset the default value for a field, highlight the field, and press . Exploring the graph Pl ot v ie w gi v es yo u a s e le c ti on o f k e ys a nd me n u k e ys t o explore a graph further. The options vary from aplet to aplet. PLOT view keys The following table details the keys that you use to work with the graph. CONNECT Connect the plotted points. (The Sequence aplet always connects them.) LABELS Label the axes with XRNG and YRNG values. AXES Draw the axes. GRID Draw grid points using XTICK and YTICK spacing. Field Meaning (Continued) K ey Meaning CLEAR Erases the plot and axes. Offers additional pre-defined views for splitting the screen and for scaling (âzoomingâ) the axes. Moves cursor to far left or far right. Moves cursor between relations. or Interrupts plotting. Continues plotting if interrupted. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
2-8 Aplets and their views Trace a graph You can trace along a function using the or key which moves the cursor along the graph. The display also shows the current coordinate position ( x, y ) of the cursor. Trace mode and the coordinate disp lay are automatically set when a plot is drawn. Note: Tracing might not appe ar to exactly follow your plot if the resolution (in Plot Setup view) is set to Faster. This is because RES: FASTER plots in only every other column, whereas tracing al ways uses every column. In Function and Sequence Aplets: You c an also scroll (move the cursor) left or right beyond the edge of the display window in trace mode, giving you a view of more of the plot. To move between relations If there is more than one relation displayed, press or to move between relations. Turns menu-key labels on and off. When the labels are off, pressing turns them b ack on. ⢠Pres sing once displays the full r o w of labels. ⢠Pres sing a second time remo ves the r o w of labels to displa y only the gr aph. ⢠Pres sing a third time display s the coordinat e mode. Displays the ZOOM menu list. Turns trace mode on/off. A white box appears over the on . Opens an input form for you to enter an X (or T or N or θ ) value. Enter the value and press . The curs or jumps to the point on the graph that you entered. Function aplet only: turns on menu list for root-finding functions (see âAnalyse graph with FCN functionsâ on page 3-4). Displays the current, defining expression. Press to restore the menu. Ke y Meaning (Continued) hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-9 To jump directly to a value To jump straight to a value rather than using the Trace function, use the menu key. Press , then enter a value. Press to jump to the value. To turn trace on/off If the menu labels are no t displayed, press first. ⢠T urn off trace mode b y pres sing . ⢠T urn on trace mode by pr essing . ⢠T o turn the coordinate display off, pr ess . Zoom within a graph One of the menu key options is . Zooming redraws the plot on a larger or smaller sc ale. It is a shortcut for changing the Plot Setup. The Set Factors... option enables you to set the factors by which you zoom in or zoom out, and whether the zoom is centered about the cursor. ZOOM options Press , select an option, and press . (If is not displayed, press .) Not all options are available in all aplets. Option Meaning Center Re-centers the plot around the current position of the cursor without changing the scale. Box... Lets you draw a box to zoom in on. See âOther views for scaling and splitting the graphâ on page 2-13. In Divides horizontal and vertical scales by the X-factor and Y-fac tor. For instance, if zoom factors are 4, then zooming in results in 1/4 as many units depicted per pixel. (see Set Factors... ) Out Multiplies horizontal and vertical scales by the X-factor and Y-fac tor (see Set Factors... ). X-Zoom In Divides horizontal scale only, using X-factor. X-Zoom Out Multiplies horizontal scale, using X-factor. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
2-10 Aplets and their views Y-Zoom In Divides vertical scale only, using Y-factor. Y-Zoom Out Multiplies vertical scale only, using Y-factor. Square Changes the vertical scale to match the horizontal scale. (Use this after doing a Box Zoom, X-Zoo m, or Y-Zoom.) Set Factors... Sets the X-Zoom and Y-Zoom factors for zooming in or zooming out. Includes option to recenter the plot before zooming. Auto Scale Rescales the vertical axis so that the display shows a representative piece of the plot, for the supplied x axis settings. (For Sequence and Statistics aplets, autoscaling rescales both axes.) The autoscale process uses the first selected function only to determine the best scale to use. Decimal Rescales both axes so each pixel = 0.1 units. Re sets default v alues for XRNG (â6.5 to 6.5) and YRNG (â3.1 to 3.2). (Not in Sequence or Statistics aplets.) Integer Rescales horizontal axis only, making each pixel =1 unit. (Not available in Sequence or Statistics aplets.) Trig Rescales horizontal axis so 1 pixel = Ï /24 radians, 7.58, or 8 1 / 3 grads; rescales vertical axis so 1 pixel = 0.1 unit . (Not in Sequence or Statistics aplets.) Option M eaning (Continued) hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-11 ZOOM examples The following screens show the effects of zooming options on a plot of . Plot of Zoom In : In Un-zoom : Un-zoom Note: Press to move to the bottom of the Zoom list. Zoom Out : Out Now un- zoom. X-Zoom In : X-Zoom In Now un- zoom. X-Zoom Out : X-Zoom Out Now un- zoom. Un-zoom Ret urns the display to the previous zoom, or if there has been only one zoom, un-zoom displays the graph with the original plot settings. Option Meaning (Continued) 3 x sin 3 x sin hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
2-12 Aplets and their views Y-Zoom In: Y-Zoom In Now un-zoom. Y-Zoom Out: Y-Zoom Out Zoom Square: Square To box zoom The Box Zoom option lets you draw a box around the area you want to zoom in on by selecting the endpoints of one diagonal of the zoom rectangle. 1. If necessary , press to turn on the menu-k ey labels . 2. P r e s s a n d s e l e c t Box... 3 . P osition the c ursor on one corner of the r ectangle . Pres s . 4. Use the cursor k ey s ( , etc.) to drag to the opposi te corner . 5 . Pres s to z oom in on the box ed area . hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-13 To set zoom factors 1. In the P lot vi ew , pres s . 2. P r e s s . 3. Se l e c t Set Factors... and pr ess . 4. Enter the z oom fac tors . Ther e is one z oom facto r for the horiz onta l scal e ( XZOOM ) and one for the v ertical scal e ( YZOOM ). Z ooming out m ultiplies the scale b y the fa ctor , so that a greater s cale distance appears on the scr een. Z ooming in di vi des the s cale by the f actor , so that a shorter s cale distance appear s on the scr een. Other views for scaling and splitting the graph The preset viewing options menu ( ) contains options for drawing the plot using certain pre-defined configurations. This is a shortcut for changing Plot view settings. For instance, if you have defined a trigonometric function, then you could select Trig to plot your function on a trigonometric scale. It also contains split-screen options. In certain aplets, for example those that y ou download from the world wide web, the preset viewing options menu can also contain options that relate to the aplet. VIEWS menu options Press , select an option, and press . Option Meaning Plot- Detail Splits the screen into the plot and a close-up. Plot-Table Splits the screen into the plot and the data table. Overlay Plot Plots the current expression(s) without erasing any pre-existing plot(s). hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
2-14 Aplets and their views Split the screen The Plot-Detail view can give you two simultaneous views of the plot. 1. Pres s . Select Plot-Detai l and press . The gr aph is plotted t wi ce. Y ou can now z oom in on the ri ght side . 2. P r e s s , select the z oom method and press or . This z ooms the ri ght side . Her e is an ex ample o f split scr een w ith Zoom In . â T he Plot men u ke y s are a vailable as for the f ull plot (for tr acing, coor dinate displa y , equation displa y , and so on) . Auto Scale Rescales the vertical axis so that the display shows a representative piece of the plot, for the supplied x axis settings. (For Sequence and Statistics aplets, autoscaling rescales both axes.) The autoscale process uses the first selected function only to determine the best scale to use. Decimal Rescales both axes so each pixel = 0.1 unit. Resets default values for XRNG (â6.5 to 6.5) and YRNG (â3.1 to 3.2). (Not in Sequence or Statistics aplets.) Integer Rescales horizontal axis only, making each pixel = 1 unit. (Not available in Sequence or Statistics aplets.) Trig Rescales horizontal axis so 1 pixel = Ï /24 radian, 7. 58, or 8 1 / 3 grads; rescales vertical axis so 1 pixel = 0.1 unit. (Not in Sequence or Statistics aplets.) Option M eaning (Continued) hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-15 â mov es the leftmost cur sor to the scr eenâs le ft edge and mov es the ri ghtmost c urs or to the scr eenâs r ight edge . â T he menu k e y copie s the ri ght plot to the le ft plot . 3 . T o un -split the sc reen , pr ess . The left si de tak es ov er the whole scr een. The Plot-Table view gives you two simultaneous views of the plot . 1. Pres s . Select Plot-Table and pres s . The scr een displays the plot on th e left side and a table of numbers on the right side. 2 . T o mov e up and do w n the table , us e the and cur sor k ey s. T hese k ey s mo ve the tr a.ce point le ft or ri ght along the plot , and in the table, the corr espo nding value s are hi ghlighted . 3 . T o move betw een functi ons, us e the and cur sor k ey s to mo ve the c urso r fr om one gr aph to another . 4. T o return t o a full Numer ic (or P lot) v ie w , pr ess (or ). Overlay plots I f you want to plot over an ex isting plo t without erasing that plot, then use Overlay Plot instead of . Note that tracing follows only the current functions from the current aplet. Decimal scaling Decimal scaling is the default scaling. If you have changed the scaling to Trig or Integer, you can change it back with Decimal. Integer scaling Integer scaling compresses the axes so that each pixel is and the origin is near the screen center. Trigonometric scaling Use trigonometric scaling whenever you are plotting an expression that includes trigonometric functions. Trigonometric plots are more likely to intersect the axis at points factored by Ï . 11 Ã hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
2-16 Aplets and their views About the numeric view After entering and selecting (check marking) the expression or expressions that you want to explore in the Symbolic view, press to view a table of data values for the independent variable ( X , T, θ , or N ) and dependent variables. Setting up the table (Numeric view setup) Press NUM to define any of the table settings. Use the Numeric Setup input form to configure the table. 1. Highli ght the fi eld to edit. Us e the arr o w ke y s to mov e from fiel d to fie ld. â If ther e is a number to ent er , type it in and pre ss or . T o modi fy an ex isting number , press . â If ther e is an option to c hoose , pr ess , highligh t your c hoi ce , and pre ss or . â Shortcut : Pr ess the ke y to cop y values from the P lot Setup into NUMSTART and NUMSTEP . Effecti vel y , the menu k e y allo ws yo u to make the table match the p ix el columns in the graph v ie w . 2 . When done , press to vi ew the table o f numbers. Numeric view settings The following table details the fields on the Numeric Setup input form. Field Meaning NUMSTART The independent variableâs starting value. NUMSTEP The size of the increment from one independent variable value to the next. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-17 Reset numeric settings To reset the default values for all table settings, press CLEAR . Exploring the table of numbers NUM view menu keys The following table details the menu keys that you use to work with the table of numbers. NUMTYPE Type of numeric table: Automatic or Build Your Own. To build your own table, you must type each independent value into the table yourself. NUMZOOM Allows you to zoom in or out on a selected value of the independent variable. Field Meaning (Continued) K ey Meaning Displays ZOOM menu list. Toggles between two character sizes. Displays the defining function expression for the highlighted column. To cancel this display, press . hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
2-18 Aplets and their views Zoom within a table Zooming redraws the table of numbers in greater or lesser detail. ZOOM options The following table lists the zoom options: The display on the right is a Zoom In of the display on the left. The ZOOM factor is 4. HINT To jump to an independent va riable value in the table, use the arrow keys to place the cursor in the independent variable column, then enter the value to jump to. Option Meaning In Decreases the intervals for the independent variable so a narrower range is shown. U ses the NUMZOOM factor in Numeric Setup. Out Increases the intervals for the independent variable so that a wider range is shown. Uses the NUMZOOM factor in Numeric Setup. Decimal Changes intervals for the independent variable to 0.1 units. Starts at zero. (Shortcut to changing NUMSTART and NUMSTEP .) Integer Changes intervals for the independent variable to 1 unit. Starts at zero. (Shortcut to changing NUMSTEP .) Trig Changes intervals for independent variable to Ï /24 radian or 7.5 degrees or 8 1 / 3 grads. Starts at zero. Un-zoom Retu rns the display to the previous zoom. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-19 Automatic recalculation You can enter any new value in the X column. When you press , the values for the dependent variables are recalculated, and the entire table is regenerated with the same interval between X values. Building your own table of numbers The default NUMTYPE is âAutomaticâ, which fills the table with data for regular intervals of the independent ( X , T , θ , or N ) variable. With the NUMTYPE option set to âBuild Your Ownâ, you fill the table yourself by typing in the independent-variable values you want. Th e dependent values are then calculated and displayed. Build a table 1. S tart with an expr essi on defined (in S ymboli c vie w) in the apl et of your choice. Note: Func tion , P olar , P arametri c, and Sequence aplets onl y . 2 . In the Numer ic Setu p ( NUM ) , choose NUMTYPE: Build Your Own . 3 . Open the Numeric v ie w ( ) . 4. Clear e xis ting data in the table ( CLEAR ). 5 . Enter the independent v alues in the left-hand column. T ype in a number and pr ess . Y ou do not hav e to enter them in or der , because the functi on can rearr ange them. T o insert a number between two others , use . Clear data Press CLEAR , to erase the data from a table. F1 and F2 entries are generated automatically You enter numbers into the X column hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
2-20 Aplets and their views âBuild Your Ownâ menu keys Example: plotting a circle Plot the circle, x 2 y 2 = 9 . First rearrange it to read . To plot both the positive and negative y values, you need to define two equations as follows: and 1. In the F unctio n aplet, s pecify the f uncti ons. Ke y Meaning Puts the highlighted independent value ( X , T , θ , or N ) into the edit line. Pressing replaces this variable with its current value. Inserts a zero value at the position of the highlight. Replace a zero by typing the number you want and pressing . Sorts the independent variable values into ascending or descending order. Press and select the ascending or descending option from the menu, and press . Toggles between two character sizes. Displays the defining function expression for the highlighted column. Deletes the highlighted row. CLEAR Clears all data from the table. y 9 x 2 â ± = y 9 x 2 â = y 9 x 2 â â = hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-21 Select Function 9 9 2 . R eset the gr aph se tup to the def ault settings . SETUP - PLOT CLEAR 3 . P lot the two func tions and hide the menu so that yo u can see all the ci rcl e. 4. Re set the numer ic setu p to the default s ettings. SETUP - NUM CLEAR 5 . Display the functi ons in numer ic for m. hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Function aplet 3-1 3 Function aplet About the Function aplet The Function aplet enables you to explore up to 10 real-valued, rectangular functions y in terms of x . For example . Once you have defined a function you can: ⢠cr eate gr aphs to find r oots, in ter cepts, slope , signed area , and extr ema ⢠cr eate tables to ev aluate functi ons at par tic ular val u es. This chapter demonstrates the basic tools of the Function aplet by stepping you through an example. See âAplet viewsâ on page 2-1 for further information about the functionality of the Symbolic, Numeric, an d Plot views. Getting started with the Function aplet The following example involves two functions: a linear function and a quadratic equation . Open the Function aplet 1. Open the Function aplet . Select Function The F unction aplet st arts in the S ymbo lic v ie w . The Symbolic view is the defining view for Function, Parametric, Polar, and Seq uence aplets. The other views are derived from the symbolic expression. y 2 x 3 = y 1 x â = yx 3 () 2 2 â = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
3-2 Function aplet Define the expressions 2 . T here ar e 10 func tion de finition f ields o n the F unction apletâs S ymbolic v ie w scr een . The y ar e labeled F1(X) to F0(X). Highlight the f unction de finiti on fi eld yo u wan t to us e , and ente r an ex pre ssio n. ( Y ou can pr ess to delete an ex isting line , or CLEAR to clear all lines.) 1 3 2 Set up the plot You can change the scales of the x and y axes, grap h resolution, and the spacing of the axis ticks. 3 . Displa y plot settings. SETUP - PLOT Note: F or our e xam ple, y ou can lea ve the plot settings at their default values since we will be using the Auto Scale f eature to c hoose an appropr iate y axis f or our x ax is settings. If y our settings do not matc h this ex ample , pr ess CLEAR to re store the defau lt va lu es. 4. Spec if y a grid for the gr aph . Plot the functions 5 . P lot the functi ons. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Function aplet 3-3 Change the scale 6. Y ou ca n change the sc ale to see more or less of your gra phs. In this e xample , choose Auto Scale . (See âVIEW S menu options â on page 2-13 f or a descrip tio n of Auto Sc al e) . Select Auto Scale Trace a graph 7 . T race the linear f unctio n. 6 times Note: B y def ault, the trace r is activ e . 8. Jump f rom the linear functi on to the quadr atic functi on. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
3-4 Function aplet Analyse graph with FCN functions 9. Display the Plot view menu. From the Plot view menu, you can use the functions on the FCN menu to find roots, intersections, slopes, and areas for a function defined in the Function aplet (and any Function-based ap lets). The FCN functions act on the currently selected graph. See âFCN functi ons â on page 3-10 for f urther informati on. To find a root of the quadratic function 10. Mov e the cu rsor to the gr aph of the q uadrati c equation b y pr essing the or k ey . Then mo ve the cur sor so that it is near by pre ssing the or key . Select Root The r oot value is display ed at the bottom of the sc reen . Note: If ther e is more than one root (as i n our exam p le ) , th e coor dinates of the r oot c losest t o the cur re nt cur sor position ar e displayed . To find the intersection of the two functions 11. F ind the intersec tion of the tw o func tions. x 1 â = hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Function aplet 3-5 12 . Choose the linear f unctio n whos e inter secti on w ith the quadr atic func tion y ou w ish to find . The coo rdinate s of the intersec tion po int are display ed at the bottom of the screen . Note: If ther e is mor e than one inters ection (as in our e xam ple), the coordinates o f the inters ection po int clo sest to the cur ren t cur sor positi on are dis play ed. To find the slope of the quadratic functio n 13 . Find the slope o f the quadrati c functi on at the intersec tion po int. Select Slope The slope value is display ed at the bottom of the screen. To find the signed area of the two functio ns 14. To find the area between the two functions in the range â2 ⤠x ⤠â1, first mo ve the cur sor to and select the si gned area opti on. Select Signed area 15 . Mov e the c ursor to x = â2 by pr essing the or key . F 1 x () 1 x â = hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
3-6 Function aplet 16. Pr ess to accept using F2(x) = (x 3) 2 â 2 as the other boundar y for the integr al. 17 . Choos e the end v alue for x . 1 The cu rso r jum ps to x = â 1 on the linear functi on. 18. Display the numerical value of the integral. Note: See âShading ar eaâ o n page 3-11 for another method of calculating ar ea. To find the extremum of the quadratic 19 . Mov e the c ursor t o the quadra tic equati on and find the extr emum of the quadrati c. Select Extremum The coordina tes of th e ext re mu m are display ed at the bottom of the scr een. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Function aplet 3-7 HINT The Root and Extremum functions return one value only even if the fun ction has more than one root or extremum. The function finds the value closest to the position of the cursor. You need to re-locate the cursor to find other roots or extrema that may exist. Display the numeric view 20. Display the numer ic v iew . Set up the table 21. Display the numer ic setup . SETUP - NUM See âSetting up the tabl e (Numeric v iew s etup)â on page 2 -16 fo r more inf ormation . 2 2 . Match the table s ettings to the pi xe l columns in the gra ph vi ew . Explore the table 2 3. Display the table of value s. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
3-8 Function aplet To navigate around a table 2 4. Move t o X = â5.9 . 6 times To go directly to a value 2 5 . Move dir ectl y to X = 10. 1 0 To access the zoom options 2 6. Zoom in on X = 10 b y a factor of 4. Note: NUMZOOM has a setting of 4 . In To change font size 2 7 . Display table n umbers in lar ge fo nt. To display the symbolic definition of a column 2 8. Display the s y mbolic def inition f or the F1 column . The symbolic definition of F1 is displayed a t the bottom of the screen. hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Function aplet 3-9 Function aplet interactive analysis From the Plot view ( ), you can use the functions on the FCN menu to find roots, intersections, slopes, and areas for a function defined in the Function aplet (and any Function-based aplets). See âFCN functionsâ on page 3- 10. The FCN operations act on the currently selected graph. The results of the FCN function s are saved in the following variables: ⢠Area ⢠Extrem um ⢠Isec t ⢠Root ⢠Slope For example, if you use the Root function to find the root of a plot, you can use the result in calculations in HOME. Access FCN variables The FCN variables are cont ained on the VARS menu. To access FCN variables in HOME: Select Plot FCN or to choose a vari ab le To access FCN variable in th e Function apletâs Symbolic view: Select Plot FCN or to choose a v ariable hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
3-10 Function aplet FCN functions The FCN functions are: Function Description Root Se lect Root to find the root of the current function nearest the cursor. If no root is fo und, but only an extremum, then the result is labeled EXTR: instead of ROOT: . (The root-finder is also used in the Solve aplet. See also âInterpreting resultsâ on page 7-6.) The cursor is moved to the root value on the x-axis and the resulting x -value is saved in a variable named ROOT. Extremum Select Extremum to find the maximum or minimum of the current function nearest the cursor. This displays the coordinate values and moves the cursor to the extremum. The resulting value is saved in a variable named EXTREMUM. Slope Select Slope to find the numeric derivative at the current position of the cursor. The result is saved in a variable named SLOPE. Signed area Se lect Signed area to find the numeric integral. (If there are two or more expressions checkmarked, then you will be asked to choose the second expression from a list that includes the x -axis.) Select a starting point, then move the cursor to selection ending point. The result is saved in a variable named AREA. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Function aplet 3-11 Shading area You can shade a selected area between functions. This process also gives yo u an approximate measurement o f the area shaded. 1. Open the Function aplet . The F unction aplet opens in the S ymboli c vi ew . 2 . Se lect the ex pre ssio ns who se c urves y ou w ant to study . 3 . Pre ss to plot the functi ons. 4. Pr ess or to position the c urs or at the starting point of the ar ea y ou want to shade . 5. P re s s . 6. Press , then select Signed area and press . 7 . Press , choose the f unction that w i ll act as the boundary of the shaded ar ea , and pr ess . 8. Pres s the or ke y to shade in the area . 9 . Pr ess to calculate the ar ea. The ar ea measur ement is display ed near the bottom of the screen. To remove the shading, press to re-draw the plot. Intersection Select Intersection to find the intersection of two graphs neare st the cursor. (You need to have at least two selected expressions in Symbolic view.) Display s the coordinate values and moves the cursor to the intersection. (Uses Solve function.) The resulting x - value is saved in a variable named ISECT. Function Description (Continued) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
3-12 Function aplet Plotting a piecewise-defined function Suppose you wanted to plot the following piecewise- defined function. 1. Open the F unctio n aplet. Select Function 2 . Highli ght the line y ou wan t to use , and enter the expr ession . (Y ou can press to d elete an ex isting line , or CLEAR to clear all line s.) 2 CHARS ⤠1 CHARS > 1 AND CHARS ⤠1 4 CHARS > 1 Note: Y ou can use the menu k ey to as sist in the entry of equations . It has the same effec t as pressing . fx () x 2 x 1 â ⤠; x 2 1 â x 1 ⤠< ; 4 xx 1 ⥠; â ⩠⪠⨠⪠⧠= hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Parametric aplet 4-1 4 Pa r a m e t r i c a p l e t About the Parametric aplet The Parametric aplet allows you to explore parametric equations. These are equations in which both x and y are defined as functions of t . They take the forms and . Getting started with the Parametric aplet The following example uses the parametric equations Note: This example wi ll produce a circle. For this example to work, the angle measure must be set to degrees. Open the Parametric aplet 1. Open the P arametr ic aplet. Select Parametric Define the expressions 2 . Def ine the expr essions . 3 3 xf t () = yg t () = xt () 3 t yt () 3 t cos = sin = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
4-2 Parametric aplet Set angle measure 3 . Set the ang le measure to degrees. MODES Select Degrees Set up the plot 4. Display the graphing options. PLOT The P lot Se tup input f orm has tw o fi elds not inc luded in the Functi on aplet, TRNG and TSTEP . TRNG spec if ies the r ange of t val u es . TSTEP specifi es the step value between t values. 5 . Set the TRNG and TSTEP so that t steps from 0 ° to 360 ° in 5 ° steps. 360 5 Plot the expression 6. Plot the expr ession . 7 . T o see all the c ir cle , pr ess twice . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Parametric aplet 4-3 Overlay plot 8. Plot a triangle graph over the existing circle graph. PLOT 120 Select Overlay Plot A triangle is dis play ed ra ther than a cir cle (w ithout ch anging the equation) because the c hanged value of TSTEP ensur es that points being plotted are 120 ° apart ins tead of near ly continuous . Y ou ar e able to explor e the graph u sing trace , z oom, split sc ree n, and sc aling functi onality available in the F unction aple t. S ee âExploring the gr aph â on page 2 - 7 fo r f ur t he r in form a tio n. Display the numbers 9 . Display the ta ble of values . Y ou can highli ght a t -value, type in a replacement value , and see the table j ump to that value . Y ou can also z oom in or z oom out on any t -val ue in the ta ble . You are able to explore the table using , , build your own table, and split screen functionality available in the Function aplet. See âExploring the table of numbersâ on page 2-17 for further information. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Polar aplet 5-1 5 Po l a r a p l e t Getting started with the Polar aplet Open the Polar aplet 1. Open the P olar aplet. Se lect Polar Li ke the F uncti on aplet , the P olar aplet opens in the S ymbo lic v ie w . Define the expression 2 . Def ine the polar equati on . 2 Ï 2 Specify plot settings 3 . Spec ify the plot settings . In this exam ple, w e w ill use the defa ult settings, e xcept f or the θ RNG fie ld s. SETUP - PLOT CLEAR 4 Ï Plot the expression 4. P lot the expr ession . r 2 Ïθ 2 â () θ () 2 cos cos = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
5-2 Polar aplet Explore the graph 5 . Displa y the Plot v ie w menu k e y labels. Th e Pl o t view o p t io n s av ailable ar e the same as those fo und in the F unction aplet . See âExplor ing the gr aph â on page 2 - 7 for f urther information . Display the numbers 6. Displa y the table o f values f or θ and R1. The N u me ric view options a vaila ble ar e the same as those found in the F unction aplet . See âExplor ing the table of nu mbers â on pa g e 2-17 fo r fu r t he r i n form a tio n. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Sequence aplet 6-1 6 Sequence aplet About the Sequence aplet The Sequence aplet allows you to explore s equences. You can define a sequence named, for example, U1: ⢠in terms of n ⢠in terms of U1( nâ1) â¢i n ter ms of U1 ( nâ2) ⢠in terms o f another sequence , for e xample , U2 ( n) ⢠in an y combination of the a bov e . The Sequence aplet allows you to create two types of graphs: â A Stairsteps gr aph pl ots n on the hor i z ontal axis and U n on the vertical ax i s. â A Cob web gr aph plots U nâ 1 on the hor iz ontal axis and U n on the ve rtical axis . Getting started with the Sequence aplet The following example defines and then plots an expression in the Sequence aplet. The sequ ence illustrated is the well-known Fibonacci sequence where each term, from the third term on, is the sum of the preceding two terms. In this example, we specify three sequence fields: the first term, the second term and a rule for generating all subsequent terms. However, you can also define a sequence by specifying just the first term and the rule for generating all subsequent terms. Y ou w ill, tho ugh,hav e to ente r the second ter m if the hp40gs is unable to calc ulate it automatically . T ypi cally if the n th term in the seq uence depends on n â 2 , then you must enter the second term. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
6-2 Sequence aplet Open the Sequence aplet 1. Open the Sequence apl et. Select Sequence The Sequence apl et starts in the S ymboli c view . Define the expression 2 . Define the F ibonacc i sequence, in w hich eac h term (after the fir st two) is the sum of the pr eceding two terms: , , for . In the S ymboli c v ie w of the Sequ ence aplet, highlight the U 1 (1) field and begin def ining y our sequence . 1 1 Note: Y ou can use the , , , , and menu k ey s to assist in the entry of equations . Specify plot settings 3. In Plo t Setup , fir st set the SEQPLOT opti on to Stairstep . Re set the defa ult plot settings b y clear ing the P lot Setup v ie w . SETUP - PLOT CLEAR 8 8 U 1 1 = U 2 1 = U n U n 1 â U n 2 â = n 3 > hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Sequence aplet 6-3 Plot the sequence 4. Plot the F ibonacci seque nce. 5. In Plot Setup, set the SEQPLOT option to Cobweb. SETUP - PLOT Select Cobweb Display the table 6. Di splay the table of va lues for this ex ample. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Solve aplet 7-1 7 Solve aplet About the Solve aplet The Solve aplet solves an equation or an expression for its unknown variable . You define an equation or expression in the symbolic view, then supply values for all the variables except one in the numeric view. Solve works only with real numbers. Note the differences between an equation and an expression: ⢠An equation contains an eq uals sign . Its solutio n is a value f or the unkno wn v ari able that mak es both sides hav e the same value . ⢠An ex pre ss io n does not contain an eq uals sign. Its soluti on is a r oot , a value f or the unkno wn v ar iable that make s the expr ession ha ve a v alue of z er o . You can use the Solve aplet to solve an equation for any one of its variables. When the Solve aplet is started, it opens in the Solve Symbolic view. ⢠In S ymboli c vie w , y ou spec ify the expre ssion or equation to solve . Y ou can d efine up to ten equat ions (or e xpre ssions), named E0 to E9 . Eac h equation can contain up to 2 7 real var ia bles, named A to Z and θ. ⢠In Numeric v ie w , you spec ify t he values of the know n var iable s, highli ght the var iable that y ou w ant to solv e fo r , and press . You can solv e the equa tion as many times as you want, using new values for the knowns and highlighting a different unknown. Note: It is not possible to solv e for more than one variable at once. Simultaneous linear equations, for example, should be solved using the Li near Solver aplet,matrices or graphs in the Function aplet. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
7-2 Solve apl et Getting started with the Solve aplet Suppose you want to find th e acceleration needed to increase the speed of a car from 1 6.67 m/sec (60 kph) to 27.78 m/sec (100 kph) in a distance of 100 m. The equation to solve is: Open the Solve aplet 1. Open the Solve aplet . Select Solve The S olv e aplet starts in the s ymboli c vie w . Define the equation 2. Define the equat ion. V U 2 A D Note: Y ou can use the menu k ey to as sist in the entry of equati ons. Enter known variables 3 . Display the Solve numer ic vie w scr een. V 2 U 2 2 A D = hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Solve aplet 7-3 4. Enter the value s for the kno wn v ari ables . 2 7 7 8 1 6 6 7 1 0 0 HINT If the Decimal Mark setting in the Modes input form ( MODES ) is set to Comma, use instead of . Solve the unknown variable 5. Solv e for the unkno wn var iable ( A ). Ther efor e, the accele rati on needed to incr ease the speed of a car fr om 16.6 7 m/sec (60 kph) to 2 7 .7 8 m/sec (100 kph) in a distance of 100 m is appro ximatel y 2 .4 7 m/s 2 . Because the var iable A in the equati on is linear we kno w that we need no t look for an y other so lutions . Plot the equation The P lot vie w sho w s one graph f or each si de of the selected equation. Y ou can choose an y of the var iab les to be the independent v ari able . The c urr ent eq uation is . One of these is , w ith , that is, . This gr aph w ill be a hor i z ontal line . The other gr aph w ill be , w ith and , that is, . This gr aph is also a line. T he desir ed soluti on is the value o f A wher e these two lines intersect. V 2 U 2 2 A D = YV 2 = V 27.78 = Y 771.7284 = Y U 2 2 A D = U 16.67 = D 100 = Y 200 A 277.8889 = hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
7-4 Solve apl et 6. Plo t the equation f or var iable A . Sele ct Auto Scale 7 . T race along the graph repr ese nting the left side o f the equation until the c ursor near s the inters ectio n. 20 times Note the v alue of A displa yed near the bottom left corner of the scr een. The P lot vi ew pr ovi des a conv enient w ay t o find an appr ox imatio n to a solutio n instead of u sing the Numeri c vi ew S olv e option . See âP lotting to find guess esâ on pa ge 7 - 7 for more in format ion. Solve apletâs NUM view keys The Solve apletâs NUM view keys are: Key M e a n i n g Copies the highlighted value to the edit line for editing. Press when done. Displays a message about the solution (see âInterpreting resultsâ on page 7-6). Displays other pages of variables, if any. Displays the symbolic definition of the current expression. Press when done. Finds a solution for the highlighted variable, based on the values of the other varia bles. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Solve aplet 7-5 Use an initial guess You can usually obtain a fa ster and more accurate solution if you supply an estimated value for the unknown variable before pressing . Solve starts looking for a solution at the initial guess. Bef ore plo tting, mak e sure the unknow n var iable is highligh ted in the numer ic v ie w . Plo t the equation t o help y ou selec t an initial guess when y ou don ât know the r ange in whi ch to look f or the solution . See âP lotting to find guesses â on page 7 - 7 for further information . HINT An initial guess is especially important in the case of a curve that could have more than one solution. In this case, only the solution closest to the initial guess is returned. Number format You can change the number fo rmat for the Solve aplet in the Numeric Setup view. The options are the same as in HOME MODES: Standard, Fixed, Scientific, Engineering, Fraction and Mi xed Fraction. Fo r all except Standard, you also specify ho w many digits of accuracy you want. See âMode setting sâ on page 1-10 for more information. You might find it handy to set a different number format for the Solve aplet if, for example, you define equations to solve for the value of money. A number format of Fixed 2 would be appropriate in this ca se. Clears highlighted variable to zero or deletes current character in edit line, if edit line is active. CLEAR Resets all variable values to zero or clears the edit line, if cursor is i n edit line. K e y Meaning (Continued) hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
7-6 Solve apl et Interpreting results After Solve has returned a solution, press in the Numeric view for more information. You will see one of the following three messages. Press to clear the message. Messag e Condition Zero The Solve aplet found a point where both sides of the equation were equal, o r wher e the expression was zero (a root), within the calculator's 12-digit accuracy. Sign Reversal Solve found two points where the difference between the two sides of the equation has opposite signs, but it cannot find a point in between where the value is zero. Similarly, for an expression, where the value of the expression has different si gns but is not precisely zero. This might be because either the two points are neighbours (they differ by one in the twelfth digit), or the equation is not real-valued between the two points. Solve returns the point where the value or difference is closer to zero. If the equation or expression is continuously real, this point is Solveâs best approximation of an actual solution. Extremum Solve found a point where the value of the expression approximates a local minimum (for positive values) or maximum (for negative values). This point may or may not be a solution. Or: Solve st opped searchin g at 9.99999999999E499, the largest number the calculator can represent. Note that the value returned is probably not valid. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Solve aplet 7-7 If Solve could not find a solution, you will see one of the following two messages. HINT It is important to check the information relating to the solve process. For example, the solution that the Solve aplet finds is not a solution, but the closest that the function gets to zero. Only by checking the i nformation will you know that this is the case. The Root-Finder at work You can watch the process of the root-finder c alculating and searching for a root. Immediately after pressing to start the root-finder, press any key except . You will see two intermediate guesses and, to the left, the sign of the expression evaluated at each guess. For example: 2 2.219330555745 â 1 21.31111111149 You can watch as the root-finder either finds a sign reversal or converges on a local extrema or does not converge at all. If there is no convergence in process, you might want to cancel the operation (press ) and start over with a different initial guess. Plotting to find guesses The main reason for plotting in the Solve aplet is to help you find initial guesses and so lutions for those equations that have difficult-to-find or multiple solutions. Consider the equation of motion for an accelerating body: Message Condition Bad Guess(es) The initial guess lies outside the domain of the equation. Therefore, the solution was not a real number or it caused an error. Constant? The value of the equation is the same at every point sampled. 2 2 0 AT T V X = hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
7-8 Solve apl et where X is distance, V 0 is initial velocity, T is time, and A is acceleration. This is actually two equations, Y = X and Y = V 0 T (AT 2 ) / 2 . Since this equation is quadratic for T , there can be both a positive and a negative solution. However, we are concerned only with positive so lutions, since only positive distance makes sense. 1. Select the S olv e aplet and enter the eq uation . Select Solve X V T A T 2 2. Find the solution for T (time) when X = 30, V =2 , and A =4 . Enter the values for X , V , and A ; then highlight the independent variable, T . 30 2 4 to highlight T 3. Use the Plot view to find an initial guess for T . First set appropriate X and Y ranges in the Plot Setup. With equation X = V x T A x T 2 /2 , the plot will produce two graphs: one for and one for X = V x T A x T 2 /2 . Since we have set in this example, one of the graphs will be . Therefore, make the YRNG â 5 to 35. Keep the XRNG default of â 6.5 to 6.5. SETUP- PLOT 5 35 4. P lot the gra ph. YX = X 30 = Y 30 = hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Solve aplet 7-9 5. Move the cursor near the positive (right-side) intersection. This cursor value will be an initial guess for T . Pres s until the cur sor is at the intersec tion. The t wo po in ts o f inters ection sh ow that ther e are tw o solutio ns for this equati on. Ho w ev er , on ly p os i tive va lu es fo r X m ake s ense , so we w ant to find the so lution f or the inte rsecti on on the r ight side of the y -ax is. 6. Re turn to the Numer ic view . Note: the T -value is f illed in with the po sition of the cursor fr om the Plot view . 7. Ensure that the T v alue is highli ghted , and solv e the equati on. Use this equation to solve fo r another variable, such as velocity. How fast must a bodyâs initial velocity be in order for it to travel 50 m within 3 seconds ? Assume the same acceleration, 4 m/s 2 . Leave the last value of V as the initial guess. 3 50 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
7-10 Solve apl et Using variables in equations You can use any of the real variable names, A to Z and θ . Do not use variable nam es defined for other types, such as M 1 (a matrix variable). Home variables All home variables (othe r than those for aplet settings, like Xmin and Ytick ) are global , which means they are shared throughout the different aplets of the calculator . A value that is assigned to a home variable anywhere remains with that variable wh erever its name is used. Therefore, if you have defined a value for T (as in the above example) in another aplet or even another Solve equation, that value shows up in the Numeric view for this Solve equation. When you th en redefine the value for T in this Solve equation, that value is applied to T in all other contexts (until it is changed agai n). This sharing allows you to work on the same problem in different places (such a s HOME and the Solve aplet) without having to update the value whenever it is recalculated. HINT As the Solve aplet uses existing variable values, be sure to check for existing variable values that may affect the solve process. (You can use CLEAR to reset all values to zero in the Solve apletâs Numeric view if you wish.) Aplet variables Functions defined in other aplets can also be referenced in the Solve aplet. For example, if, in the Function aplet, you define F1(X)=X 2 10 , you can enter F1(X)=50 in the Solve aplet to solve the equation X 2 10=50 . hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Linear Solver ap let 8-1 8 Li n e a r S ol ve r a p l e t About the Linear Solver aplet The Linear Solver aplet allows you to solve a set of linear equations. The set can contain two or three linear equations. In a two-equation set, each equation must be in the form . In a three-equation set , each equation must be in the form . You provide values for a , b , and k (and c in three- equation sets) for each equation, and the Linear Solver aplet will attempt to solve for x and y (and z in three- equation sets). The hp40gs will alert you if no solution can be found, or if there is an infinite number of solutions. Note that the Linear Solver aplet only has a numeric view. Getting started with th e Linear Solver aplet The following example defines a set of three equations and then solves for the unkno wn variables. Open the Linear Solver aplet 1. Open the Linear Sequence ap let. Select Linear Solver The L inear E quati on Solv er opens. Choose the equation set 2 . If the last ti me you used the Linear S olv er aplet you s o lve d f or t wo equatio ns, the tw o - equatio n input f orm is display ed (as in the ax by k = ax by cz k = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
8-2 Linear Solver aplet ex ample in the pr ev io us step). T o sol ve a thr ee - equation s et, pr ess . No w the input for m displa ys thr ee eq uations . If the three-equation input fo rm is displayed and you want to solve a two-equation set, press . In this example, we are going to solve the following equation set: Hence we need the three-equation input form. Define and solve the equations 3 . Y ou def ine the equati ons y ou w ant to sol ve b y enter ing the co-effic ients of eac h var iable in eac h equation and the constant te rm. No tice that the c ursor is immediately positioned at the co-effic ient of x in the fir st equati on. Ente r that co -effi ci ent and pr ess or . 4. The c ursor mo ve s to the next co-effic ient . Enter that co - eff ic ient , pr ess or , and continue do ing lik ew ise until y ou have de fined all the equati ons. Note : y ou can enter the name of a var iable f or any co -effi ci ent or constant . Pr ess and begin enter ing the name. T he menu ke y appears. Pres s that ke y to lock alphabetic entry mode. Pr ess it again to cancel the lock . Once yo u hav e entere d enough values for the solv er to be able to gener ate soluti ons, those solutions appear on the display . In the ex ample at the r ight , the sol ver was a ble to f ind soluti ons f or x , y , and z as soon as the f irst co-effic ie nt of the last equati on wa s entered . 6 x 9 y 6 z 5 = 7 x 10 y 8 z 1 0 = 6 x 4 y 6 = hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Linear Solver ap let 8-3 As you enter each of the re maining know n value s, the soluti on change s. T he e x ample at the ri ght sho ws the final so lution once all the co -e fficients an d constants ar e enter e d for the s et of equati ons we se t out to solve. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Triangle S olve aplet 9-1 9 T riangle Solv e aplet About the Triangle Solver aplet The Triangle Solver aplet a llows you to determine the length of a side of a triangle, or the angle at the vertex of a triangle, from information you supply about the other lengths and/or other angles. You need to specify at leas t three of the six possible valuesâthe lengths of the three sides and the size of the three angle sâbefore the solver can ca lculate the other values. Moreover, at least one value you specify must be a length. For example, you could specify the lengths of two sides and one of the angl es; or you could specify two angles and one length; or all three lengths. In each case, the solver will calculate the remaining lengths or angles. The HP 40gs will alert you if no solution can be found, or if you have provided insufficient data. If you are determining the properties of a right-angled triangle, a simpler input form is available by pressin g the menu key. Note that the Triangle Solver aplet only has a numeric view. Getting started with th e Triangle Solver aplet The following example solves for the unknow n length of the side of a triangle whose two known sidesâof lengths 4 and 6âmeet at an angle of 30 degrees. Before you begin : You should make sure that your angle measure mode is appropriate. If the angle inf ormation you have is in degrees (as in this example) and your current angle measure mode is radians or grad s, change the mode to degrees before ru nning the solver. (See âMode settingsâ on page 1-10 for instructions.) Because the angle measure mode is associated with the aplet, you should start the aplet first and then change the setting. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
9-2 Triangle So lve aplet Open the Triangle Solver aplet 1. Open the T riangle Sol ver a plet. Select Triangle Solver The T riangle Solver aplet o pens. Note : if y ou hav e alr eady u sed the T r iangle Sol ver , the entries and results from the pre v ious use will still be displayed . T o start the T riangle Sol ver afr esh, c lear the pre v ious entr ies and results b y pr essing CLEAR . Choose the triangle type 2 . If the last time y ou u sed the T riangle Sol ver aplet you used the ri ght-angled triangle input f orm , that input form i s d i sp la yed again (as in the ex ample at the r ight). If the tri angle you ar e inv esti gating is not a ri ght-angled triangle , or y ou ar e not sur e what type it is, y ou should use the gener al input f orm (illus trate d in the pre v ious s tep). T o sw itc h to the gener al input f orm , pre ss . If the general input f orm is displa yed and y ou are inv esti gating a righ t-angled triangle , pr ess to displa y the simpler input f or m. Specify the known values 3 . Using the arr ow k e ys , mov e to a f ield w hose v alue you kno w , enter the value and press or . Repeat f or each kno wn v alue . Note that the lengths o f the sides ar e labeled A , B , and C , and the angles are labeled α , β , and δ . It is important that y ou ent er the kno wn value s in the appr opriate f ields. In our e x ample, w e kno w the length of tw o sides and the angle at w hich th ose sides mee t. He nce if we s pec ify the lengths of side s A and B, w e must enter the angle as δ (since δ is the angle wher e A and B meet) . If instead w e entered the hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Triangle S olve aplet 9-3 lengths as B and C, w e wo uld need to spec ify the angle as α . The illus trati on on the displa y will help yo u determine where to enter the known values . Note: if you need to c hange the angle neasure mode , pres s MODES , change the mode , and then pres s to r eturn to t he aplet. 4. Pres s . The solver calculat es the v alues of the unkno w n var ia bles and display s. As the illustr ation at the r ight sho ws , the length of the unkno wn side in our e xam ple is 3.2 29 6. (T he other two angles ha ve als o been calculated .) Note: if two side s and an adjacent ac ute angle are enter ed and ther e are tw o soluti ons, onl y one will be display ed initiall y . In this case , an menu k ey is displa yed (as in this ex ample). Yo u p r e s s t o display the second soluti on, and again to r eturn to the fir st soluti on. Errors No solution with given data If you are using the general input form and you enter more than 3 values, the values might not be consistent, that is, no triangle could possibly ha ve all the values you specified. In these cases, No sol with given data appears on the screen. The situation is similar if you are using the simpler input form (for a right-angled tria ngle) and you enter more than two values. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
Not enough data If you are using the general input form, you need to specify at least three values for the Triangle Solver to be able to calculate the remaining attributes of the triangle. If you specify less than three, Not enough data appears on the screen. If you are using the simplified input form (for a right- angled triangle), you must specify at least two values. In addition, you cannot specify only angles and no lengths. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-1 10 Statist ic s apl et About the Statistics aplet The Statistics aplet can store up to ten data sets at one time. It can perform one- variable or two-vari able statistical analysis of one or more sets of data. The Statistics aplet starts with the Numeric view which is used to enter data. The Symbol ic view is used to specify which columns contain data and which column contai ns frequencies. You can also compute statistics valu es in HOME and recall the values of specif ic statistics variables. The values computed in the Statistics aple t are saved in variables, and many of these variables are listed by the function accessible from the Statistics apletâs Numeric view screen. Getting started with the Statistics aplet The following example asks you to enter and a nalyze the advertising and sales data (i n the table below), compute statistics, fit a curve to the data, and predict the effect of more advertising on sales. Advert ising min utes (independent, x) Resulting Sales ($) (dependent, y) 21 4 0 0 1 9 2 0 31 1 0 0 52 2 6 5 52 8 9 0 42 2 0 0 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
10-2 Statistics aplet Open the Statistics aplet 1. Open the St atistics a plet and clear e x isting data b y pres sing . Select Statistics The St at i st ic s ap le t starts in the Numer ical view . At an y time the Statisti cs aplet is conf igur ed for onl y one of t wo types of stat istical explorations: on e - var iable ( ) or t wo- var iable ( ) . The 5th menu k e y label in the Numeric v ie w toggles betw een these tw o options and sho ws the c urr ent option . 2 . Select . Y ou need to selec t becaus e in this ex ample we ar e analyzing a dataset compr ising two var ia bles: adv ertising minu tes and r esulting sales . Enter data 3 . Enter the data into the columns . 2 1 3 5 5 4 to mo ve to the next column 1400 9 20 1100 2 2 65 2 8 90 2 200 1VAR/2VAR menu k ey la bel hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-3 Choose fit and data columns 4. Select a f it in the S ymboli c setup vi ew . SETUP - SYMB Select Linear Y o u c an cre a t e u p t o f ive exp l o rat i on s of t wo - va ria b le data, named S1 to S5 . I n t h is exa m pl e, we wil l cre a te just on e : S1 . 5 . Spec ify the columns that hold the data y ou w ant to analyz e . Yo u c o u l d h a v e e n t e r e d y our data into columns other than C1 and C2 . Explore statistics 6 . Find the mean ad vertising time ( MEANX ) and the mean sales ( MEANY ). MEANX is 3 .3 min utes and MEANY is abou t $17 96 . 7 . Scr oll do wn to dis play the v alue for the corr elation coeffi ci ent ( CORR ). T he CORR value indicates how we ll the linear model fits the data . 9 times The v alue is .8 99 5. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
10-4 Statistics aplet Setup plot 8. Change the plotting range to ensur e all the data points ar e plotted (and select a differ ent point mark , if yo u wi s h ) . SETUP - PLOT 7 100 400 0 Plot the graph 9 . P lot the gr aph. Draw the regression curve 10. Dra w the r egre ssion c urve (a c urve to f it the data points). This dr aw s the regr ession line f or the best linear f it. Display the equation for best linear fit 11. Retur n to the S ymbo lic v ie w . 12 . Display the equati on for the be st linear fit . to mov e to the FIT1 fie l d The f ull FIT1 expr ession is sho wn . The slope ( m ) i s 425.87 5. T h e y -intercept ( b ) is 37 6. 25. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-5 Predict values 13 . T o find the pr edic ted sales f igur e if ad vertising w er e to go up to 6 minute s: S ( to highlight Stat-Two ) (to highli ght PREDY ) 6 14. Retur n to the P lot vie w . 15 . Jump to the indi cated point on the r egr essi on line. 6 Observe the pr edic ted y -value in the left bottom corner of the screen. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
10-6 Statistics aplet Entering and editing statistical data The Numeric view ( ) is used to enter data into the Statistics aplet. Each column represents a variable named C0 to C9 . After entering the data, you must define the data set in the Symbolic view ( ). HINT A data column must have at least four data points to provide valid two-vari able statistics, or two data points for one-variab le statist ics. You can also store statistical data values by copying lists from HOME into Statistics data columns. For example, i n HOME, L1 C1 stores a copy of the list L1 into the data-column variab le C1 . Statistics apletâ s NUM view keys The Statistics apletâs Numeric view keys are: Key M e a n i n g Copies the highlighted item into the edit line. Inserts a zero value above the highlighted cell. Sorts the specified independent data column in ascending or descending order, and rearranges a specified dependent (or frequency) data column accordingly. Switches between larger and smaller font sizes. A toggle switch to select one- variable or two-variable statistics. This setting affects the statistical calculations and plots. T he label indicates which setting is current. Computes descriptive statistics for each data set specified in Symbolic view. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-7 Example You are measurin g the height of students in a classroom to find the mean height. The first five students have the following measurements 160cm, 165cm, 170cm, 175cm, 180cm. 1. Open the Statistics apl et. Select Statistics 2 . Enter the measurement data. 160 16 5 17 0 17 5 180 Deletes the currently highlighted value. CLEAR Clears the current column or all columns of data. Pregss CLEAR to display a menu list, then select the current column or all columns option, and press . cursor key Moves to the first or last row, or first or last column. K e y Meani ng (Continued) hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
10-8 Statistics aplet 3 . F ind the mean of the sample. Ensur e the / menu ke y label reads . Pr ess to see the statistic s calculated fr om the sample data in C1 . Note that the title o f the column of st atist ics is H1 . Ther e are 5 data set de finitions av ailable for one- var iable stat ist ics: H1âH5 . If data is entered in C1 , H1 i s automatically set to use C1 for dat a, and the fr equency of each data point is set to 1. Y ou can select other columns of data f rom the Statis tics S ymboli c setup v ie w . 4. Pre ss to c lose the statistic s windo w and pre ss k ey t o see the data set definitions . The f irst column indicates the assoc iated column of data fo r each data set def inition , and the second column indicates the constant f requenc y , or the column that holds the frequ encies. The k ey s y ou can use f r om this windo w are: Key M e a n i n g Copies the column variable (or variable expression) to the edit line for editing. Press when done. Checks/unchecks the current data set. Only the checkmarked data set(s) are computed and plotted. or Ty ping aid for the column variables ( ) or for the Fit expressions ( ). hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-9 To continue our example, supp ose that the heights of the rest of the students in the class are measured, but each one is rounded to the nearest of the five values first recorded. Instead of entering all the new data in C1 , we shall simply add another column, C2 , that holds the frequencies of our five data points in C1 . Displays the current variable expression in standard mathematical form. Press when done. Evaluates the variables in the highlighted column (C1, etc.) expression. Displays the menu for entering variable names or contents of variables. Displays the menu for entering math operations. Deletes the highlighted variable or the current character in the edit line. CLEAR Resets default specifications for the data sets or clears the edit line (if it was acti ve). Note: If CLEAR is used the data sets will need to be selected again before re-use. K e y Meani ng (Continued) Height (cm) Freq uen cy 160 5 165 3 170 8 175 2 180 1 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
10-10 Statistics aplet 5 . Mov e the highli ght bar into the ri ght column of the H1 definiti on and replace the frequency value o f 1 w ith the name C2 . 2 6. Re turn to the numer ic v ie w . 7 . Enter the fr equency data show n in the abo ve t able . 5 3 8 2 1 8. Displa y the computed stat ist ics. The mean height is approximately 167.63cm. 9 . Setup a histogr am plot for the data . SETUP - PLOT Enter se t up infor mation appropriate to your data. 10. Plo t a histogra m of the data. Save data The data that you enter is automatically saved. Wh en you are finished entering data values, you can press a key for another Statistics view (like ), or you can switch to another aplet or HOME. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-11 Edit a data set In the Numeric view of the Statistics aplet, highlight the data value to change. Type a new va lue and press , or press to copy the value to the edit line for modification. Press after modifying the value on the edit line. Delete data ⢠T o delete a single data item, highli ght it and pres s . The v alues belo w the deleted cell wi ll scr oll up one row . ⢠T o delete a column of data , highlight an entry in that column and press CLEAR . Select the co lumn name. ⢠T o delete all columns of data , pr ess CLEAR . Select All columns . Insert data Highlight the entry following the point of insertion. Press , then enter a number. It will write over the zero that was inserted. Sort data values 1. In Numeri c vi ew , highli ght the column you w ant to sort, and pre ss . 2 . Spec ify the Sort Order . Y ou can choose either Ascending or Descending . 3 . Spec if y the INDEPENDENT and DEPENDENT data columns. So rting is b y the independent column. F or instance, if A ge is C1 and Income is C2 and yo u want to so rt by Income, then y ou mak e C2 the independent column f or the sorting and C1 the dependent column. â T o sort just one column , choo se None for the dependent column. â F or one-vari able statisti cs with tw o data columns, spec ify the fr eque ncy column as the depe ndent column. 4. Pres s . hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
10-12 Statistics aplet Defining a regression model The Symbolic view includes an expression (Fit1 through Fit5) that defines the regression model, or âfitâ, to use for the regression analysis of each two-variable data set. There are three ways to select a regression model: ⢠Accept the default option to fit the d ata to a straight line. ⢠Select one of the av ailable fi t options in S ymbo lic Setup vi ew . ⢠Enter y our o wn mathematical e xpres sion in S ymbolic vi ew . This expr ession w ill be plotted, but it w ill not be fitted t o the data points . Angle Setting You can ignor e the angle measurement mode unless your Fit definition (in Symbolic v iew) involves a trigonometric function. In this case, you should specify in the mode screen whether the trigonometric units are to be interpreted in degrees, radians, or grads. To choose the fit 1. In Numer ic v iew , make sur e is set . 2. P r e s s SETUP - SYMB to display the Sy mbolic Setup vi ew . Highlight the F it number ( S1FIT to S5FIT ) yo u want to de fine . 3 . Pre ss and select f r om the list . Pres s when done . The r egre ssion f orm ula for the fit is display ed in S ymbo lic v ie w . Fit models Ten fit models are available: Fit model Meaning Linear (Default.) Fits the data to a straight line, y = mx b . Uses a least-squares fit. Logarithmic Fits to a logarithmic curve, y = m ln x b . Exponential Fits to an exponential curve, y = be mx . Power Fits to a power curve, y = bx m . hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-13 To define your own fit 1. In Numeri c vi ew , mak e sur e is set. 2 . Display the S ymbolic v iew . 3 . Highli ght the F it e xpres sion ( Fit1 , etc .) for the desired data set . 4. T ype in an e xpr ess ion and pr ess . The independent variable must be X , and the expr ession mus t not contain any unkn ow n var iables . Example: . This automatically changes the Fit type ( S1FIT , etc.) in the Symbolic Setup view to User Defined. Quadratic Fits to a quadratic curve, y = ax 2 bx c . Needs at least three points. Cubic Fits to a cubic curve, y = ax 3 bx 2 cx d . Needs at least four points. Logistic Fits to a logistic curve, , where L is the saturation value for growth. You can store a positive real value in L , orâif L = 0âlet L be computed automatically. Exponent Fits to an exponent curve, . Trigonometric Fits to a trigonometric curve, . Needs at least three points. User Defined Define your own expr ession (in Symbolic view.) Fit model Meaning (Co ntinued) y L 1 ae bx â () ------------------------- - = ya b x = ya b x c () sin â d = 1.5 x cos à 0.3 x sin à hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
10-14 Statistics aplet Computed statistics One-variable When the data set contains an odd number of values, the data setâs median value is no t used when calculating Q1 and Q3 in the table abo ve. For example, for the following data set: { 3,5,7,8,15,16,17} only the first three items, 3, 5, and 7 are used to calculate Q1, and only the last three terms, 15, 16, and 17 are used to calculate Q3. Statistic Definition N Σ Number of data points. TOT Σ Sum of data values (with their frequencies). MEAN Σ Mean value of data set. PVAR Σ Population variance of data set. SVAR Σ Sample varianc e of data set. PSDEV Populati on standard deviation of data set. SSDEV Sample stan dard deviation of data set. MIN Σ Minimum data value in data set. Q1 First quartile: median of values to left of median. MEDIAN Median value of data set. Q3 Third quartile: media n of values to right of median. MAX Σ Maximum data value i n data set. hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-15 Two-variable Plotting You can plot: ⢠histogr ams ( ) ⢠box -a nd-whisk er plots ( ) ⢠scat ter p lots ( ). Once you have entere d your data ( ), defined your data set ( ), and defined your Fit mod el for two- variable statistics ( SETUP - SYMB ), you can plot your data. You can plot up to five scatter or box-and-whisker plots at a time. You can plot only one histogram at a time. Statistic Definition MEANX Mean of x - (independent) values. Σ X Sum of x -values. Σ X2 Sum of x 2 -values. MEANY Mean of y - (dependent) values. Σ Y Sum of y -values. Σ Y2 Sum of y 2 -values. Σ XY Sum of each xy . SCOV Sample covariance of independent and dependent data columns. PCOV Population covariance of independent and dependent data columns CORR Correlation coeffici ent of the independent and dependent data columns for a linear fit only (regardless of the Fit chosen). Returns a value from 0 to 1, where 1 is the best fit. RELERR The relative error for the selec ted fit. Provides a measure of accuracy for the fit. hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
10-16 Statistics aplet To plot statistical data 1. In S ymbo lic v ie w ( ) , select ( ) the data sets y ou w ant to plot . 2 . F or one-vari able data ( ) , select the plo t type in Plot Setup ( SETUP - PLOT ) . Highli ght ST A TPLOT , pres s , select either Histogram or BoxWhisker , and pr ess . 3 . F or any plot , but espec iall y for a histogr am, adj ust the plottin g scale and range in the Plot Setup vie w . If you find histogr am bars too fat or too thin, y ou can adjus t them by adj usting the HWIDTH settin g. 4. Pr ess . If you ha v e not adjus ted the P lot Setup y ourself , you can try sel ect Auto Scale . Auto Scale can be relied upon to give a good starting scale which can then be adjusted in the Plot Setup view. Plot types Histogram One-variable statistics . The numbers below the plot mean that the current bar (where the cursor is) starts at 0 and ends at 2 (not including 2), and the frequency for this column, (that is, the number of data elements that fall between 0 and 2) is 1. You can see information about the next bar by pressing the k ey. Box and Whisker Plot One-variable statistics . The left whisker marks the minimum data value. The box marks the first quartile, the median (where the cursor is), and the third quartile. The right whisker marks the maximum data value. The numbers below the plot mean that this column has a median of 13. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-17 Scatter Plot Tw o-variable statistics . The numbers below the plot indicate that the cursor is at the first data point for S2, at (1, 6). Press to move to the next data point and display information about it. To connect the data points as they are plotted, checkmark CONNECT in the second page of the Plot Setup. This is not a regression curve. Fitting a curve to 2VAR data In the Plot view, press . This draws a curve to fit the checked two-variable data set(s). See âT o choose the fitâ on page 10-12. The e xpre ssion in Fit2 sho ws that the slope = 1.98 08 21917 81 and the y - i n t e r c e p t = 2. 2657 . Correlation coefficient The correlation coeffici ent is stored in the CORR variable. It is a measure of fit to a linear curve only. Regardless of the Fit model you have chosen, CORR relates to the linear model. hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
10-18 Statistics aplet Relative Er ror The relative error is a measure of the error between predicted values and actual va lues based on the specified Fit. A smaller number means a better fit. The relative error is stored in a variable named RELERR . The relative error provides a measure o f fit accuracy for all fits, and it does depend on the Fit model you have chosen. HINT In order to access the CORR and RE LERR variables after you plot a set of statistics, you must press to access the numeric view and then to display the correlation values. The values are store d in the variables when you access the Symbolic view. Setting up the plot (Plot setup view) The Plot Setup view ( SETUP - PLOT ) sets most of the same plotting parameters as it does for the other built-in aplets. See âSetting up the plot (Plot view setup)â on page 2-5. Settings unique to the Statistics aplet are as follows: Plot type (1VAR) STATPLOT enables you to specify either a histogram or a box-and-whisker plot for one-variable statistics (when is set). Press to change the highlighted setting Histogram width HWIDTH enables you to specify the width of a histog ram bar. This determines how many bars will fit in the display, as well as how the data is di stributed (how many values each bar represents). Histogram range HRNG enables you to specify th e range of values for a set of histogram bars. The range runs from the left edge of the leftmost bar to the right edge of the rightmost bar. You can limit the range to exclude any values you suspect are outliers. Plotting mark (2VAR) S1MARK through S5MARK enables you to specify one of five symbols to use to plot each data set. Press to change the highlighted setting. Connected points (2VAR) CONNECT (on the second page), when checkmarked, connects the data points as they are plotted. The re sulting line is not the regression curve. The order of plotting i s according to the ascending order of independent values. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-19 For instance, the data set (1,1 ), (3,9), (4,16), (2,4) would be plotted and traced in the order (1,1), (2,4), (3,9), (4,16). Trouble-shooting a plot If you have problems plotting, check that you have the following: ⢠The co rr ect or menu label o n (Numeri c view ) . ⢠The cor rec t fit (r egre ssion model), if the data set is tw o -var iable . ⢠Only the data sets to compute or plot are chec kmark ed (S ymbolic vie w). ⢠The cor re ct plotting r ange. T ry using Aut o Scale (instead of ), or adjust the plotting paramet ers (in P lot Setup) fo r the ranges of the ax es and the w idth of histogr am bars ( HWIDTH ). In mode, ensure that both paired columns contain data, and that they are the same length. In mode, ensure that a paired colu mn of frequency values is the same length as th e data column that it refers to. Exploring the graph The Plot view has menu keys for zooming, tracing, and coordinate display. There are also scaling options under . These options are desc ribed inâExploring the graphâ on page 2 -7. Statistics apletâs PLOT view keys K ey Meaning CLEAR Erases the plot. Offers additional pre-defined views for splitting the screen, overlaying plots, and autoscaling the axes. Moves cursor to far left or far right. hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
10-20 Statistics aplet Calculating predicted values The functions PREDX and PREDY estimate (predict ) values for X or Y given a hypothetical value for the other . The estimation is made based on the curve that has been calculated to fit the data a ccording to the specified fit. Find predicted values 1. In P lot vi ew , draw the r egr ession c ur ve f or the data set. 2 . Pr ess to mov e to the r egr essi on cu rve . 3 . Pr ess and en ter the va lue of X . The c ursor jumps to the specifi ed point on the curve and th e coor dinate displa y sho ws X and the pr edicted v alue of Y . In HOME: ⢠Enter PREDX ( y-value ) to find the predi cted value f or the independent v ari able gi ven a hy potheti cal dependent v alue . Displays ZOOM menu. Turns trace mode on/off. The white box appears next to the option when Trace mode is active. Turns fit mode on or off. Turning on draws a curve to fit the data points according to the current regression model. (2var statistics only) Enables you to specify a value on the line of best fit to jump to or a data point number to jump to. Displays the equation of the regression curve. Hides and displays the menu key labels. When the la bels are hidden, any menu key displays the (x,y) coordinates. Pressing redisplays the menu labels. Ke y Meaning (Continued) hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-21 ⢠Enter P RED Y( x-value ) to find the pr edic ted value o f the dependent var iable gi ven a h ypothetical independent vari ab le. You can type PREDX and PREDY into the edit line, or you can copy these function names from the MATH menu under the Stat-Two category. HINT In cases where more than one fit curve is displayed, the PRED Y function uses the most recently calculated curve. In order to avoid errors with th is function, uncheck all fits except the one that you want to work with, or use the Plot View method. hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Inference aplet 11-1 11 Inference aplet About the Inference aplet The Inference capabilities include calculation of confidence intervals and hy pothesis tests based on the Normal Z-distribution or Studentâs t-distribution. Based on the statistics from one or two samples, y ou can test hypotheses and find confidence intervals for the following quantities: ⢠mean ⢠proporti on ⢠difference between two means ⢠differenc e between two proportions Example data When you first access an input form for an Inference test, by default, the input form contains ex ample data. This example data is designed to return me aningful results that relate to the test. It is useful for gaining an understanding of what the test does, and for demonstrating the test. The calculatorâs on-line help provides a description of what the example data represents. Getting started with the Inference aplet This example describes the Inference apletâs options and functionality by stepping you through an example using the exampl e data for th e Z-Test o n 1 mean. Open the Inference aplet 1. Open the Inference aplet. Select Inference . The Inference aplet opens in the Symbolic view. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
11-2 Inference apl et Inference apletâs SYMB view keys The table below summarizes the options available in Symbolic view. If you choose one of the hypoth esis tests, you can choose the alternative hypothesis to test against the null hypothesis. For each test, th ere are three possible choices for an alternative hypothesis based on a quantitative comparison of two quantiti es. The null hy pothesis is always that the two quantities are equal.Thus, the alternative hypotheses cover th e various cases for the two quantities being unequal: <, >, and â . In this section, we will u se th e example data for the Z-Test on 1 mean to illustrate how the aplet works and what features the various views present. Hypothesis Tests Confidence Intervals Z: 1 μ , the Z-Te st on 1 mean Z-Int: 1 μ , the confidence interval for 1 mean, based on the Normal distribution Z: μ 1 â μ 2 , the Z-Test on the difference of two means Z-Int: μ 1 â μ 2 , the confidence interval for the difference of two means, based on the Normal distribution Z: 1 Ï , the Z-Test on 1 proportion Z-Int: 1 Ï , the confidence interval for 1 proportion, based on the Normal distribution Z: Ï 1 â Ï 2, the Z-Test on the difference in two proportions Z-Int: Ï 1 â Ï 2, the confi dence interval for the difference of two proportions, based on the Normal distribution T: 1 μ , the T-Test on 1 mean T-Int: 1 μ , the confidence interval for 1 mean, based on the Studentâs t-distribution T: μ 1 â μ 2 , the T- Test on the difference of two means T-Int: μ 1 â μ 2 , the confidence interval for the difference of two means, based on the Studentâs t-distribution hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Inference aplet 11-3 Select the inferential method 2. Select the Hypothesis Test inferential method. Select HYPOTH TEST 3. Define the type of test. ZâTest: 1 μ 4. Select an alternative hypothesis. μ< μ0 Enter data 5. Enter the sample statistics and population parameters. setup-NUM The table below lists the fields in this view for our current Z-Test: 1 μ example. Field name Definition μ 0 Assumed population mean Ï Population standard dev iation Sample mean n Sample size α Alpha level for the test x hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
11-4 Inference apl et By default, each field already contains a value. These values constitute the example database and are explained in the feature of this aplet. Display on-line help 6. To display the on-line help, press 7. To close the on-line help, press . Display test results in numeric format 8. Display the test results in numeric format. The test distri bution value and its associated probability are displayed, along with the critical value(s) of the test and the associated critical value(s) of the statistic. Note: You can access the on-line help in Numeric view. Plot test results 9. Display a graphic view of the test results. Horizontal axes are presented for both the distribution variable and the test statistic. A generic bell curve repre sents the probability distribution function. Vertical lines mark the critical value(s) of the test, as well as the value of the test statistic. The rejection region is marked and the test numeric results are displayed between the horizontal axes. Importing sample statistics from the Statistics aplet The Inference aplet supports th e calculation of confidence intervals and the testing of hypotheses based on data in the Statistics aplet. Computed statistics for a sample of data in a column in any St atistics-based aplet can be imported for use in the Infe rence aplet. The following example illustrates the process. R hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Inference aplet 11-5 A calculator produces the following 6 random numbers: 0.529, 0.295, 0.952, 0.2 59, 0.925, and 0.592 Open the Statistics aplet 1. Open the Statistics aplet and reset the current settings. Select Statistics The Statistics aplet opens in the Numeric view. Enter data 2. In the C1 column, enter the random numbers produced by the calculator. 529 295 952 259 925 592 HINT If the Decimal Mark setting in the Modes input form ( modes ) is set to Comma, use instead of . 3. If necessary, select 1-vari able statistics. Do thi s by pressing the fifth menu key until is displayed as its menu label. Calculate statistics 4. Calculate statistics. The mean of 0.592 seems a little large compared to the expected value of 0.5. To see if the difference is statistically significant, we will use the statistics computed here to construct a confidence interval for the true mean of the population of random numbers and see whether or not this interval contains 0.5. 5. Press to close the computed statistics window. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
11-6 Inference apl et Open Inference aplet 6. Open the Infere nce aplet and cle ar current settings . Select Inference Select inference method and type 7. Select an inference method. Select CONF INTERVAL 8. Select a distribution statistic type. Select T-Int: 1 μ Set up the interval calculation 9. Set up the interval calculation. Note: The default values are derived from sample data from the on-line help example. Setup-NUM hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Inference aplet 11-7 Import the data 10. Import the data from the Statistics aplet. Note: The data from C1 is displayed by default. Note: Press to see the statistics before importing them into the Numeric Setup view. Also, if there is more than one aplet base d on the Statistics aplet, you are prompted to choose one. 11. Specify a 90% confidence interval in the C: field. to move to the C: field 0.9 Display Numeric view 12. Display the confidence interval in the Numer ic view. Note: The interval setting is 0.5. Display Plot view 13. Display the confidence interval in the Plot view. You can see, from the second text row, that the mean is contained within the 90% confidence interval (CI) of 0.3469814 to 0 .8370186. Note: The graph is a simple, generic bell-curve. It is not meant to accurately represent the t-distribution with 5 degrees of freedom. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
11-8 Inference apl et Hypothesis tests You use hypothesis tests to test the validity of hypotheses that relate to the statistical parameters of one or two populations. The tests are base d on statistics of samples of the populations. The HP 40gs hypothesis tests use the Normal Z-distribution or Studentâs t-distribution to calculate probabilities. One-Sample Z-Test Menu name Z-Test: 1 μ On the basis of statistics from a single sample, the One-Sample Z-Test measures th e strength of the evidence for a selected hypothesis against the nu ll hypothesis. The null hypothesis is that the population mean equals a specified value Î 0 : μ = μ 0 . You select one of the following alternative hypotheses against which to test the null hypothesis: Inputs The inputs are: H 1 : μ 1 μ 2 < H 1 : μ 1 μ 2 > H 1 : μ 1 μ 2 â Field name Definition Sample mean. n Sample size . μ 0 Hypothetical population mean. Ï Population standard deviation. α Significance level. x hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Inference aplet 11-9 Results The resu lts are: Two-Sample Z-Test Menu name Z-Test: μ 1â μ 2 On the basis of two samples, each from a separate population, this test measures t he strength of the evidence for a selected hypothesis against the null hypothesis. The null hypothesis is that the mean of the two populations are equal (H 0 : μ 1= μ 2). You select one of the following alternative hypotheses against which to test the null hypothesis: Inputs The inputs are: Result Description Test Z Z-test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary values of Z associated with the α level that you supplied. Critical Boundary values of required by the α value that you supplied. x x H 1 : μ 1 μ 2 < H 1 : μ 1 μ 2 > H 1 : μ 1 μ 2 â Field name Definition Sample 1 mean. Sample 2 mean. n1 Sample 1 size. n2 Sample 2 size. Ï 1 Population 1 standard deviation. x 1 x 2 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
11-10 Inference apl et Results The results are: One-Proportion Z-Test Menu name Z-Test: 1Ï On the basis of statistics from a single sample, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis. The null hypothesis is that the proportion of su ccesses in the two populations is equal: H 0 : Ï = Ï 0 You select one of the following alternative hypotheses against which to test the null hypothesis: Ï 2 Population 2 standard deviation. α Significance level. Field name Definition Result Description Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary value of Z associated with the α level that you supplied. H 1 : ÏÏ 0 < H 1 : ÏÏ 0 > H 1 : ÏÏ 0 â hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Inference aplet 11-11 Inputs The inputs are: Results The resu lts are: Two-Proportion Z-Test Menu name Z-Test: Ï 1 â Ï 2 On the basis of statistics from two samples, each from a different population, the Two-Proportion Z-Test measures the strength of the evide nce for a selected hypothesis against the null hypothesis. The null hypothesis is that the proportion of successes in th e two populations is equal H0: Ï 1 = Ï 2 . You select one of the following alternative hypotheses against which to test the null hypothesis: Field name Definition x Number of successes in the sample. n Sample size. Ï 0 Population proportion of successes. α Si gnificance level. Result Description Test P Proportion of successes in the sample. Test Z Z-Test st atistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary value of Z associated with the level you supplie d. H 1 : Ï 1 Ï 2 < H 1 : Ï 1 Ï 2 > H 1 : Ï 1 Ï 2 â hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
11-12 Inference apl et Inputs The inputs are: Results The results are: One-Sample T-Test Menu name T-Test: 1 μ The One-sample T-Test is used when the population standard deviation is not know n. On the basis of statistics from a single sample, this test measures the strength of the evidence for a se lected hypothesis against the null hypothesis. The null hypothesis is that the sample mean has some assumed value, Î 0 :μ = μ 0 You select one of the following alternative hypotheses against which to test the null hypothesis: Field name Definition X1 Sample 1 mean. X2 Sample 2 mean. n1 Sample 1 size. n2 Sample 2 size. α Significance level. Result Description Test Ï 1â Ï 2 Difference between the proportions of successes in the two samples. Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary values of Z associated with the α level that you supplied. H 1 : μμ 0 < H 1 : μμ 0 > H 1 : μμ 0 â hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Inference aplet 11-13 Inputs The inputs are: Results The resu lts are: Field name Definition Sample mean. Sx Sample standard deviat ion. n Sample size. μ0 Hypothetical population mean. α Significance level. x Result Description Test T T-Test statistic. Prob Probability associated with the T-Test statistic. Critical T Boundary value of T associated with the α level that you supplied. Critical Boundary value of required by the α value that you supplied. x x hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
11-14 Inference apl et Two-Sample T-Test Menu name T-Test: μ 1 â μ 2 The Two-sample T-Test is used when the population standard deviation is not know n. On the basis of statistics from two samples, each sample from a different population, this test measures the strength of the evidence for a selected hypothesis against the nu ll hypothesis. The null hypothesis is that the two populations means are equal H 0 : μ 1 = μ 2 . You select one of the following alternative hypotheses against which to test the null hypothesis Inputs The inputs are: H 1 : μ 1 μ 2 < H 1 : μ 1 μ 2 > H 1 : μ 1 μ 2 â Field name Definition Sample 1 mean. Sample 2 mean. S1 Sample 1 standard deviation. S2 Sample 2 standard deviation. n1 Sample 1 size . n2 Sample 2 size . α Sign ificance level. _Pooled? Check this option to pool samples based on their standard deviati ons. x1 x2 hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Inference aplet 11-15 Results The resu lts are: Confidence intervals The confidence interval calc ulations that the HP 40gs can perform are based on the Normal Z-distribution or Studentâs t-distribution. One-Sample Z-Interval Menu name Z-INT: μ 1 This option uses the Normal Z-distribution to calculate a confidence interval for m, the true mean of a population, when the true population standard deviation, s, is known. Inputs The inputs are: Result Description Test T T-Test statistic. Prob Probability associated with the T-Test statistic. Critical T Boundary values of T associated with the α level that you supplied. Field name Definition Sample mean. Ï Population standard deviation . n Sample size. C Confidence level. x hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
11-16 Inference apl et Results The results are: Two-Sample Z-Interval Menu name Z-INT: μ1 â μ2 This option uses the Normal Z- distribution to calculate a confidence interval for the difference between the means of two populations, μ 1 â μ 2 , when the population standard deviations, Ï 1 and Ï 2 , are known. Inputs The inputs are: Results The results are: Result Description Critical Z Critical value for Z. μ min Lower bound for μ . μ max Upper bound for μ . Field name Definition Sample 1 mean. Sample 2 mean. n1 Sample 1 size . n2 Sample 2 size . Ï 1 Population 1 standard devi ation. Ï 2 Population 2 standard devi ation. C Confidence level. x1 x2 Result Description Critical Z Critical value for Z. μ Min Lower bound for μ 1 â μ 2 . μ Max Upper bound for μ 1 â μ 2 . Î Î hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Inference aplet 11-17 One-Proportion Z-Interval Menu name Z-INT: 1 Ï This option uses the Normal Z-distribution to calculate a confidence interval for the proportion of successes in a population for the case in which a sample of size, n , has a number of successes, x . Inputs The inputs are: Results The resu lts are: Two-Proportion Z-Interval Menu name Z-INT : Ï 1 â Ï 2 This option uses the Normal Z-distribution to calculate a confidence interval for the difference between the proportions of successes in two populations. Inputs The inputs are: Field name Definition x Sample success count. n Sample size. C Confidence level. Result Description Critical Z Critical value for Z. Ï Min Lower bound for Ï . Ï Max Upper bound for Ï . Field name Definition Sample 1 success count. Sample 2 success count. x 1 x2 hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
11-18 Inference apl et Results The results are: One-Sample T-Interval Menu name T-INT: 1 μ This option uses the Studentâs t-distribution to calculate a confidence interval for m, the true mean o f a population, for the case in which the true population standard deviation, s, is unknown. Inputs The inputs are: n1 Sample 1 size . n2 Sample 2 size . C Confidence level. Field name Definition (Continued) Result Description Critical Z Critical value for Z. Ï Min Lower bound for the difference between the proportions of successes. Ï Max Upper bound for the difference between the proportions of successes. Î Î Field name Definition Sample mean. Sx Sample standard deviation. n Sample size. C Confidence level. x 1 hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Inference aplet 11-19 Results The resu lts are: Two-Sample T-Interval Menu name T-INT: μ 1 â μ 2 This option uses the Studentâs t-distribution to calculate a confidence interval for the difference between the means of two populations, μ 1 â μ 2, when the population standard deviations, s1and s2, are unk nown. Inputs The inputs are: Result Description Critical T Critic al value for T. μ Min Lower bound for μ . μ Max Upper bound for μ . Field name Definition Sample 1 mean. Sample 2 mean. s1 Sample 1 standard deviation. s2 Sample 2 standard deviation. n1 Sample 1 size. n2 Sample 2 size. C Confidence level. _Pooled Whether or not to pool the samples based on their standard devi ations. x1 x2 hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
11-20 Inference apl et Results The results are: Result Description Critical T Critical value for T. μ Min Lower bound for μ 1 â μ 2 . μ Max Upper bound for μ 1 â μ 2 . Î Î hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-1 12 Using the Finance Solver The Finance Solver, or Finance a plet , is available by using the APLET key in your calculator. Use the up and down arrow keys to select the Finance aplet. Your screen should look as follows: Press the key or the soft menu key to activate the aplet. The result ing screen shows the diff erent elements involved in the solution of fi nancial problems with your HP 40gs calculator. Background information on and applications of financial calculations are provided next. Background The Finance Solver application provides you with the ability of solving time-value-of-money (TVM) and amortization problems. Th ese problems can be used for calculations involving compound interest applic ations as well as amortization tables. Compound interest is the process by which earned interest on a given principal amount is ad ded to the principal at specified compounding periods, and then the hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
12-2 Using the Finance Solv er combined amount earns interest at a certain rate. Financial calculations involving compound interest include savings accounts, mo rtgages, pension funds, leases, and annuities. Time Value of Money (TVM) calculations, as the name implies, make use of the notion that a dollar today will be worth more than a dollar sometime in the future. A dollar today can be invested at a c ertain interest rate and generate a return that the same dollar in the future cannot. This TVM princip le underlies the notion of interest rates , compound interest and rates of return. TVM transactions can be represented by using cash flow diagrams . A cash flow diagram is a time line divid ed into equal segments representing the compounding periods. Arrows represent the cash flow s, which could be positive (upward arrows) or negati ve (downward arrows), depending on the poin t of vi ew of the lender or borrower . The following cash flow diagram shows a loan from a borrower's point of view: On the other hand, the following cash flow diagram shows a load from the lender's point of view: In addition, cash flow diagrams specify when payments occur relative to the compounding periods: at the beginning of each period or at th e end . The Finance Solver application provides both of these payment modes: Begin mode and End mode. The follo wing cash Present value (PV) (Loan) Money recei ved is a positi ve number Money paid out is a negativ e number Equal periods 1 23 4 5 (P MT) Futur e value (FV) Equal payments Pay m e n t (P MT) Pay m e n t (P MT) Pay m e n t (P MT) Pay m e n t (P MT) } } } } } FV Equal payments 1 23 4 5 } } } } PM T } PM T PM T PM T PM T Equal periods PV Loan } hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-3 flow diagram shows lease payments at the beginning of each period. The following cash flow diagram shows deposits into an account at the end of each period. As these cash-flow diagrams imply, there are five TVM variables: PV 1 23 4 5 FV Capitalized value o f lease } PM T PMT PM T PM T PM T PV 1 23 4 5 FV PM T PMT PM T PMT PM T N The total number of compoundi ng periods or payments. I%YR The nominal annual interest rate (or investment rate). This rate is divided by the number of paymen ts per year (P/YR) to compute the nominal interest rate per compounding period -- which is the interest rate actually used in TVM calculations. PV The present value of the initial cash flow. To a lender or borrower, PV is the amount of the loan; to an investor, PV is the in itial investment. PV always occurs at the beginning of the first period. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
12-4 Using the Finance Solv er Performing TVM calculations 1. Launc h the F inanc ial Sol ver as indi cated at the beginning of this secti on. 2 . Use the arr o w ke y s to highligh t the differ ent f ields and enter the kno wn v aria bles in the T VM calculati ons, pres sing the soft-menu ke y after enter ing each kno wn va lue. Be sur e that v alues are ente red f or at least f our of the fi v e T VM var iable s (namely , N, I%YR , PV , PMT , and FV). 3 . If necessar y , enter a di ffer ent value for P/YR (default value is 12 , i.e ., monthly pa yments). 4. Pr ess the k e y t o change the P ay ment mode (Beg or End) as requir ed. 5 . Use the arr ow k ey s to highli ght the TVM vari able you w ish to solv e for and pr ess the soft -menu k ey . PMT The periodic payment amount. The payments are the same amount each period and the TVM calcu lation assumes that no payments are skipped. P ayments can occur at the beginning or the end of each compounding period -- an option you control by setting the Payment mode to Beg or End. FV The future value of the transaction: the amount of the final cash flow or the compounded value of the series of previous cash flows. For a loan, this is the size of the final balloon payment (beyond any regular payment due). For an investment this is the cash value of an investment at the end of the investment period. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-5 Example 1 - Loan calculations Suppose you finance the purcha se of a car with a 5-year loan at 5.5% annual intere st, compounded monthly. The purchase price of the car is $19,500 , and the down payment is $3,000. What are the required month ly payments? What is the largest loan you can afford if your maximum monthly payment is $300? Assume that the payments start at the end of the first period. Solution. The fo llowing cash fl ow diagram illu strates th e loan calculations: Start the Finance Solver, selecting P/YR = 12 and End payment option. ⢠Enter the kno wn TVM var iables a s show n in the diagram abo ve . Y our input form should look as follo ws: ⢠Highli ghting the P MT field , pr ess the soft menu k ey to obta in a paymen t of -315.17 (i .e ., P MT = -$315.17). ⢠T o determine the maxim um loan possible if the monthly pa ymen ts are onl y $300, type the value â300 in the P MT field , highli ght the PV field , and pre ss the soft menu k ey . The r esulting v alue is PV = $15, 7 05 .8 5 . PV = $1 6,500 1 2 59 60 FV = 0 l%YR = 5 .5 N = 5 x 12 = 60 P/YR = 12 ; End mode PMT = ? hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
12-6 Using the Finance Solv er Example 2 - Mortgage with balloon payment Suppose you have taken out a 30-year, $150, 000 house mortgage at 6.5% annual interest. You expect to sell the house in 10 years, repay ing the loan in a balloon payment. Find the size of the balloon payment, the value of the mortgage after 10 years of payment. Solution. The following cash flow diagram illustrates the case of the mortgage with balloon payment: ⢠Start the F inance Sol ver , selecting P/YR = 12 and End pay ment option . ⢠Enter the kno wn TVM var iables as sho w n in the diagr am abov e . Y our input f orm , for calc ulating monthly pa yme nts for the 3 0 -yr mortgage , should look as follo ws: ⢠Highlighting the PMT fi eld, pre ss the soft menu k ey to obt ain a pay ment of -9 48.10 (i .e ., P MT = -$9 48.10) ⢠T o determine the balloon pa yme nt or fu ture v alue (FV) for the mortgage after 10 years, u se N = 120, highlight the FV f ield , and pr ess the soft menu ke y . Th e resulting v alue is FV = -$12 7 ,164.19 . The negative v alue indicates a p ay ment from the homeo wne r . Check that the r equir ed balloon pay ments at the end of 20 years (N=2 40) and 2 5 year s (N = 300) are -$8 3,4 9 7 .9 2 and -$48 , 4 5 6.2 4, r especti vel y . PV = $15 0,000 1 2 59 60 l%YR = 6 .5 N = 30 x 12 = 360 (for PMT) N = 10 x 12 = 120 (f or balloon pa yment) P/YR = 12 ; End mode PMT = ? Balloon pay ment, FV = ? hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-7 Calculating Amortizations Amortization calculations, which also use the TVM variables, determine the amounts applied towards principal and interest in a payment or series of payments. To calculate amortizations: 1. Start the F inance Solv er as indicated at the beginning of t his sec tion. 2 . Set the f ollo wing TVM var iables: a Number of pay ments per y ear (P/YR) b P ay ment at beginning or end of peri ods 3 . Stor e values for the TVM var iables I%YR, PV , P MT , and FV , whi ch define the pay ment sc hedule. 4. Pres s the soft menu k e y and enter the number of pa yme nts to amortiz e in this batch. 5 . Pres s the soft menu ke y to amortiz e a batch of pay ments. The calculator w ill prov ide fo r you the amount applied to inter est, to pr inc ipal, and the re maining balance after this set of pay ments hav e been amortiz ed. Example 3 - Amortization for home mortgage For the data of Example 2 abov e, find the amortization of the loan after the first 10 years (12x10 = 120 payments). Pressing the soft menu key produces the screen to the left. Enter 120 in the PAYMENTS field, and press the soft menu key to produce the results shown to the right. To continue amortizing the loan: 1. Pres s the sof t menu ke y to stor e the n ew balance after the pr ev io us amorti z ation as PV . 2 . Enter the n umber of pa ymen ts to amortiz e in the new batch. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
12-8 Using the Finance Solv er 3 . Pre ss the soft menu k ey to amorti z e the ne w batch of pa yments . Repeat step s 1 through 3 as often as needed. Example 4 - Amortization for home mortgage For the results of Example 3, show the amortization of the next 10 years of the mortgage loan. First, press the soft menu key. Then, keeping 120 in the PAYMENTS field, press the soft menu key to produce the results shown below. To amortize a series of future payments starting at payment p: 1. Calc ulate the balance of the loan at pa ymen t p-1 . 2 . St ore the ne w balance in PV using the soft menu k ey . 3 . Amorti z e the ser ies of pa yme nts starting at the new PV . The amortization operation reads the values from the TVM variables, rounds the nu mbers it gets from PV and PMT to the current display mode, then calculates the amortization rounded to the same setting. The or iginal variables are not changed, except for PV, which is updated after each amortization. hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-1 13 Using mathematical func tions Math functions The HP 40gs contains many math functions. The function s are grouped in categories. For example, the Matrix category contains functions for manipulating matrices. The Probability category (shown as Prob. on the MATH menu) contains functions for working with pro bability. To use a math function in HOME view, you enter the function onto the command line, and include the arguments in parentheses after the function. You can also select a math function from the MATH menu. Note that this chapter covers only the use of mathematical functions in HOME view. The use of mathematical functions in CAS is described in Chapter14, âComputer Algebra System (CAS)â. The MATH menu The MATH menu provides access to math functions, physical constants, and programming constants. You can also access CAS commands. The MATH menu is organized by category . For each category of functions on the left, there is a list of function names on the right. The hi ghlighted category is the current category . ⢠When y ou press , you see the menu list o f Math categori es in the left column and the corr espo nding functi ons of the highli ghted category in the ri ght column. T he menu k e y indicates that the MA TH FUNCTIONS menu lis t is activ e . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
13-2 Using mathematical functio ns To select a function 1. Pr ess to displa y the MA TH menu. T he categorie s appear in alph abetical or der . 2 . Pr ess or to sc ro ll thro ugh the categori es. T o jump dir ectly to a category , pr ess the f irst letter o f the categoryâs name. No te: Y ou do not need to pr ess fi rst . 3 . The lis t of func tions (on the r ight) appli es to the cur r ently hi ghlighted catego ry (on the left) . Use and to sw itch between the category list an d the functi on list . 4. Highli ght the name of the func tion y ou wan t and pres s . This copi es the functi on name (and an initial parenthesis , if appropr iate) to the edit line. NOTE If you press while the MATH menu is open, CAS functions and commands are displayed. You can select a CAS function or command in the same way that you select a function from the MATH menu (by pressing the arrow keys and then ). The function or comman d selected appears on the edit line in HOME (and with an initial parenthesis, if appropriate). Function categories (MATH menu) Math functions by category Syntax Each functionâ s definition incl udes its syntax, that is, the exact order and spelling of a functionâs name, its delimiters (punctuation), and its arguments. Note that the syntax for a function does not require spaces. ⢠Cal culus ⢠Comp lex numb ers ⢠Constant ⢠Conver t ⢠Hyperbo lic trigonometr y (Hy perb .) ⢠Lis t s ⢠Lo o p ⢠Matri x ⢠Po l y n o m i a l ⢠Probabili ty ⢠Real number s (Real) ⢠Tw o - v a r i a b l e stati stics (Stat-T wo) ⢠Sym b o l ic ⢠Te s t s ⢠T rigonometry (T rig) hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-3 Functions common to keyboard and menus These functions are common to the keyboard and MATH menu. Keyboard functions The most frequently used functions are available directly from the keyboard. Many of the keyboard functions also accept complex numbers as arguments. Ï F or a descr iption , see â p â on page 13-8. ARG F or a descr iption , see â ARGâ on page 13- 7. F or a descr iption , see â â on page 11- 7 . AND F or a descr iption , see â ANDâ on page 13-19. ! F or a descr iption , see âCOMB(5,2) r eturns 10. T hat is, ther e are te n differ ent w ay s that fi ve things can be combined tw o at a time.!â on page 13-12. â F or a descr iption , see âSâ on page 13-11. EEX F or a descr iption , see âSci entific notation (po wers of 10)â on page 1- 20. F or a descr iption , see â â on page 11- 7 . The multiplicative inverse function finds the inverse of a square matrix, and the multiplicative inve rse of a real or complex number. Also works on a list containing only these object types. â â« â« x 1 â hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
13-4 Using mathematical functio ns ,, , Add, Subtract, Multiply, Di vide. Also accepts complex numbers, lists and matrices. val u e1 va lu e 2 , etc. e x Natural exponential. Also accepts complex numbers. e^ val u e Example e^5 ret u rn s 148.413159103 Natural logarithm. Also accepts complex numbers. LN ( val ue ) Example LN(1) re t u rn s 0 10 x Exponential (antilogarithm). Also accepts complex numbers. 10^ val u e Example 10^3 re turns 1000 Common logarithm. Also accepts complex numbers. LOG ( val ue ) Example LOG(100) r eturns 2 ,, Sine, cosine, tangent. Inputs and outputs depend on the current angle format (Degrees, Radians, or Grads). SIN ( val ue ) COS ( val ue ) TAN ( val ue ) Example TAN(45) r eturns 1 (Degr ees mode) . ASIN Arc sine: sin â1 x. Output range is from â90° to 90°, â Ï /2 to Ï /2, or â100 to 100 grads. Inputs and outputs depend on the current angle format. Also accepts complex numbers. ASIN ( val ue ) hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-5 Example ASIN(1) r eturns 90 (Degr ees mode) . ACOS Arc cosine: cos â1 x . Output range is from 0° to 180°, 0 to Ï , or 0 to 200 grads. Inputs and outputs depend on the current angle format. Also accepts complex numbers. Output will be complex for values outside the normal COS domain of . ACOS ( valu e) Example ACOS(1) ret u rn s 0 (Degrees mode) . ATAN Arc tangent: tan â1 x . Output range is from â90° to 90°, 2 Ï /2 to Ï /2, or â100 to 100 grad s. Inputs and outputs depend on the current an gle format. Al so accepts complex numbers. ATAN ( valu e) Example ATAN(1) ret u rn s 45 (Degrees mode). Square. Also accept s complex numbers. val u e 2 Example 18 2 r eturns 324 Square root. Also accepts complex numbers. valu e Example re turns 18 Negation. Also accepts complex numbers. â val u e Example -(1,2) r eturns (-1,-2) Power ( x raised to y ). Also accepts complex numbers. val u e ^ pow er 1 â x 1 â¤â¤ 324 hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
13-6 Using mathematical functio ns Example 2^8 r eturns 256 ABS Absolute value. For a co mplex number, this is . ABS ( val ue ) ABS (( x ,y)) Example ABS(â1 ) r eturns 1 ABS((1,2)) r eturns 2.2360679775 Takes the n th root of x . roo t NTHROOT valu e Example 3 NTHROOT 8 r eturns 2 Calculus functions The symbols for differentiation and integration are available directly form the keyboardâ and S respectivelyâas well as from the MATH menu. Differentiates expres sion with respect to the variable of differentiation. Fr om the command line, use a formal name (S1, etc.) for a non-numeric result. See âFinding derivativesâ on page 13- 21. vari ab l e ( ex p res s ion ) Example s1(s1 2 3*s1) re t u rn s 2*s1 3 Integrates expression from lower to upper limits with respect to the variable of integration. To find the definite integral, both limits must ha ve numeric values (that is, be numbers or real variables). To find the indefinite integral, one of the limits must be a formal variable (s1, etc). ( l o w e r, u p p e r, e x p r e s s i o n , v a r i a b l e ) See âUsing f ormal v aria bles â on page 13- 20 for fur th er de tai ls. x 2 y 2 n â â â â« â« hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-7 Example (0,s1,2*X 3,X) finds the inde finite r esult 3*s1 2* (s1^2/2) See âT o find the indef inite integral u sing for mal var iables â on page 13- 2 3 for more inf ormation o n finding indef inite integr als. TAYLOR Calculates the n th order Taylor polynomial of expression at the point where the given variable = 0. TAYLOR ( expr essi on, v ariable , n ) Example TAYLOR(1 sin(s1) 2 ,s1,5) w ith Radians angle measur e and Fr action number f ormat (set in MODE S) r etur ns 1 s1^2 -(1/3)*s1^4 . Complex number functions These functions are for complex n umbers only. You can also use complex numbers with all trigonometric and hyperbolic functions, and with some real-number and keyboard functions. Enter co mplex numbers in the form ( x,y ), where x is the real part and y is the imaginary part. ARG Argument. Finds the angle de fined by a complex number. Inputs and outputs use the current angle format set in Modes. ARG (( x, y)) Example ARG((3,3)) r eturns 45 (Degr ees mode) CONJ Complex conjugate. Conjugation is the negation (sign reversal) of the imaginary part of a complex number. CONJ (( x, y)) Example CONJ((3,4)) r eturns (3,-4) IM Imaginary part, y, of a complex number, ( x, y ). IM (( x, y)) â« hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
13-8 Using mathematical functio ns Example IM((3,4)) r eturns 4 RE Real part x , of a complex number, ( x, y ). RE (( x, y)) Example RE((3,4)) r eturns 3 Constants The constants available from the MATH FUNCTIONS menu are mathematical constants. These are describe d in this section. The HP 40gs has two other menus of constants: program constant s and physical constants. These are described in âProgram constants and physical constantsâ on page 13-24. e Natural logarithm base. Internally represented as 2.71828182846. e i Imaginary value for , the complex number (0,1). i MAXREAL Maximum real number. Internally represented as 9.99999999999 x 10 499 . MAXREAL MINREAL Minimum real number. In ternally represented as 1 x 10 -499 . MINREAL Ï Internally represented as 3.14159265359. Ï Conversions The conversion functions are found on the Convert menu. They enable you to make the following conversions. 1 â hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-9 â C Convert from Fahrenheit to Celcius. Example â C(212) r eturns 100 â F Convert from Celcius to Fahrenheit. Example â F(0) r eturns 32 â CM Convert from inches to centimeters. â IN Convert from centimeters to inches. â L Convert from US gallons to liters. â LGAL Convert from liters to US gallons. â KG Convert from pounds to kilograms. â LBS Convert from kilograms to pounds. â KM Convert from miles to kilometers. â MILE Convert from kilometers to miles. â DEG Convert from radians to degrees. â RAD Convert from degrees to radians. Hyperbolic trigonometry The hyperbolic trigonometry functions can also take complex numbers as arguments. ACOSH Inverse hyperbolic cosine : cosh â1 x . ACOSH ( value ) ASINH Inverse hyperbolic sine : sinh â1 x . ASINH ( value ) ATANH Inverse hyperbolic tangent : tanh â1 x . ATANH ( value ) hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
13-10 Using mathematical fun ctions COSH Hyperboli c cosine COSH ( val ue ) SINH Hyperbolic sine. SINH ( val ue ) TANH Hyperbolic tangent. TANH ( val ue ) ALOG Antilogarithm (exponential). Th is is more accurate than 10^x due to limitations of the power function. ALOG ( val ue ) EXP Natural exponential. This is more accurate than due to limitations of the power function. EXP ( val ue ) EXPM1 Exponent minus 1 : . This is more accurate than EXP when x is close to zero. EXPM1 ( valu e ) LNP1 Natural log plus 1 : ln( x 1 ). This is mo re accurate than the natural logarithm function when x is close to zero. LNP1 ( val ue ) List functions These functions work on list da ta. See âList functionsâ on page 19-6. Loop functions The loop functions display a result after evaluating an expression a given number of times. ITERATE Repeatedly for #times evaluates an expression in terms of variable . The value for variable is updated each time, starting with initialvalue. ITERATE( expr ession , vari ab le , initialv alue , #times ) Example ITERATE(X 2 ,X,2,3) r eturns 256 e x e x 1 â hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-11 RECURSE Prov ides a method of defining a sequence without using the Symbolic view of the Sequ ence aplet. If used with | (âwhereâ), RECURSE will step through the evaluation. RECURSE( sequencename , term n , term 1 , term 2 ) Example RECURSE(U,U(N-1)*N,1,2) U1(N) Stor es a factori al-calculating f unction named U1. When y ou enter U1(5) , for e xam ple, the f unction calculate s 5! ( 120 ). Σ Summation. Finds the sum of expression with respect to variable from initialvalue to finalvalue. Σ ( v ariable = initia lvalue , fi n alva l ue, expressio n ) Example Σ (C=1,5,C 2 ) re turns 5 5. Matrix functions These functions are for matr ix data stored in matrix variables. See âMatrix func tions and commandsâ on page 18-10. Polynomial functions Polynomials are products of constants ( coefficients ) and variables raised to powers ( terms ). POLYCOEF Polynomial coefficients. Returns the coefficients of the polynomial with the specified roots . POLYCOEF ([ roo t s ]) Example T o find the poly nomial w ith r oots 2 , â3, 4, â5: POLYCOEF([2,-3,4,-5]) r eturn s [1,2,-25, -26,120] , r epresenting x 4 2x 3 â25x 2 â26x 120 . POLYEVAL Polynomial evaluation. Evaluates a polynomial with the specified coefficients for the value of x . POLYEVAL([ coeff ic ients ] , val u e ) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
13-12 Using mathematical fun ctions Example For x 4 2x 3 â25x 2 â26x 120 : POLYEVAL([1,2,-25,-26,120],8) ret u r n s 3432 . POLYFORM Polynomi al form. Creates a polynomial in var iable1 from expression. POLYFORM ( expr ession , vari ab le 1 ) Example POLYFORM((X 1)^2 1,X) ret u r n s X^2 2*X 2 . POLYROOT Polynomial roots. Returns the roots for the n th-order polynomial with the specified n 1 coefficients . POLYROOT ([ coeff ic ients ]) Example For x 4 2x 3 â25x 2 â26x 120 : POLYROOT([1,2,-25,-26,120]) r etur ns [2,-3,4,-5] . HINT The results of POLYROOT will often not be easily seen in HOME due to the number of decimal plac es, especially if they are complex numbers. It is be tter to store the results of POLYROOT to a matrix. For example, POLYROOT([1,0,0,-8] M1 will store the three complex cube roots of 8 to matrix M1 as a complex vector. Then you can see them easily by going to the Matrix Catalog. and access them individually in calculations by referring to M1(1), M1(2) etc. Probability functions COMB Number of combinations (wi thout regard to order) of n things taken r at a time: n!/(r!(n-r)) . COMB (n, r) Example COMB(5,2) r eturns 10 . T hat is, ther e are ten differ ent wa ys that f i ve things can be combined tw o at a time .! hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-13 Factorial of a positive integer. For non-integers, ! = Î (x 1) . This calculates the gamma function. value! PERM Number of permutations (with regard to order) of n things taken r at a time: n!/(r!(n-r)! PERM ( n, r ) Example PERM(5,2) r eturns 20 . T hat is, there are 20 differ ent perm utations of f i ve things tak en two at a time . RANDOM Random number (between zero and 1). Produced by a pseudo-random number sequence. The algorithm used in the RANDOM function uses a seed number to begin its sequence. To ensure that two calculators must produce different results for the RANDOM function, use the RANDSEED function to seed different starting values before using RANDOM to produce the numbers. RANDOM HINT The setting of Time will be different for each calculator, so using RANDSEED(Time) is guar anteed to produce a set of numbers which are as close to random as possible. You can set the seed using the command RANDSEED. UTPC Upper-Tail Chi-Squared Probability given degrees of freedom, evaluated at value . Returns the probability that a Ï 2 random variable is greater than value. UTPC ( degr ees , va lu e ) UTPF Upper-Tail Snedecorâs F Probability given numerator degrees of freedom and denominator degrees of fre edom (of the F distribution), evaluated at value . Returns the probability that a Snedecor 's F random variable is greater than value. UTPF ( numerator , denominat or , val ue ) UTPN Upper-Tail Normal Probability gi ven mean and variance , evaluated at value. Returns the probability that a normal random variable is greater than value for a normal distribution. Note: The variance is the square of the standard deviation . UTPN ( mean, varia nc e, valu e) hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
13-14 Using mathematical fun ctions UTPT Upper-Tail Studentâs t-Probability given degrees of freedom, evaluated at value. Returns the probability that the Student's t- random variable is greater than va lue. UTPT ( degr ees , valu e ) Real-number functions Some real-number functions can also take complex arguments. CEILING Smallest integer greater than or equal to value . CEILING ( valu e) Examples CEILING(3.2) r eturns 4 CEILING(-3.2) r eturns -3 DEG â RAD Degrees to radians. Converts value from Degrees angle format to Radians angle format. DEG â RAD ( val ue ) Example DEG âRAD( 180) r eturns 3. 14159265359 , the val u e o f Ï . FLOOR Greatest integer less than or equal to value . FLOOR ( valu e ) Example FLOOR(-3.2) r eturns -4 FNROOT Function root-finder (like the Solve aplet). Finds the value for the given variable at which expression most nearly evaluates to zero. Uses guess as initial estimate. FNROOT ( e xpressi on, v ari able , guess ) Example FNROOT(M*9.8/600-1,M,1) r eturn s 61.2244897959 . FRAC Fractional part. FRAC ( val ue ) Example FRAC (23.2) r eturns .2 hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-15 HMS â Hou rs-minutes-seconds to deci mal. Converts a number or expression in H.MMSSs format (time or angle that can include fractions of a second) to x.x format (number of hours or degrees with a decimal fraction). HMS â ( H.MMSSs) Example HMS â (8.30) r eturns 8. 5 â HMS Decimal to hours-minutes-seconds. Converts a number or expression in x.x format (number of hours or degrees with a decimal fraction) to H.MMSSs format (time or angle up to fractions of a second). â HMS ( x.x) Example â HMS(8.5) r eturns 8. 3 INT Integer part. INT ( valu e ) Example INT(23.2) r eturns 23 MANT Mantissa (significant digits) of value . MANT ( valu e) Example MANT(21.2E34) r etur ns 2.12 MAX Maximum. The greater of two values. MAX ( valu e 1 , val ue 2) Example MAX(210,25) r eturns 210 MIN Minimum. The lesser of two values. MIN ( valu e 1 , val ue 2) Example MIN(210,25) ret u rn s 25 MOD Modulo. The remainder of value1 / value2. val u e1 MOD va lu e 2 hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
13-16 Using mathematical fun ctions Example 9 MOD 4 retur ns 1 % x percent of y ; that is, x /100*y . % ( x , y) Example % (20,50) r eturns 10 %CHANGE Percent change from x to y , th at is, 100( yâx )/ x . % CHANGE( x , y) Example % CHANGE(20,50) r eturns 150 %TOTAL Percent total : (100) y/ x . What percentage of x , is y . % TOTAL( x , y) Example % TOTAL(20,50) r eturns 250 RAD â DEG Radians to degrees. Converts va lue from radians to degrees. RAD â DEG ( val ue ) Example RAD âDEG( Ï) r eturns 180 ROUND Rounds value to decimal places . Accepts complex numbers. ROUND ( valu e , places) Round can also round to a number of significant digits as showed in example 2. Examples ROUND(7.8676,2) r eturns 7.87 ROUND (0.0036757,-3) r eturns 0.00368 SIGN Sign of value . If positive, the result is 1. If negative, â1. If zero, result is zero. For a c omplex number, this is the unit vector in the direction of the number. SIGN ( val ue ) SIGN (( x, y)) hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-17 Examples SIGN (â2) ret u rn s â1 SIGN((3,4)) r eturns (.6,.8) TRUNCATE Truncates value to decimal places . Accepts complex numbers. TRUNCATE ( valu e , places) Example TRUNCATE(2.3678,2) r eturns 2.36 XPON Exponent of value . XPON ( valu e) Example XPON(123.4) r eturns 2 Two-variable statistics These are functions for use with two-variable statistics. See âTwo-variableâ on page 10-15 . Symbolic functions The symbolic functions are used for symbolic manipulations of expression s. The variables can be formal or numeric, but the re sult is usually in symbolic form (not a number). You will find the symbo ls for the symbolic functions = and | ( where ) in the CHARS menu ( CHARS ) as well as the MATH menu. = ( equals ) Sets an equality for an equation. Th is is not a logical operator and does not store values. (See âTest functionsâ on page 13-19.) exp res s io n1 = expressi on2 ISOLATE Isola tes the firs t occurrence of variable in expression= 0 and returns a new expression, where variable=newexpression. The result is a general solution that represents multiple solutions by including the (formal) variables S1 to represent any sign a nd n1 to represent any integer. ISOLATE( expression , var iable ) hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
13-18 Using mathematical fun ctions Examples ISOLATE(2*X 8,X) r eturns -4 ISOLATE(A B*X/C,X) r eturns -(A* C/B) LINEAR? Tests whet her expression is linear for the specified variable . Returns 0 (false) or 1 (true). LINEAR?( expr ession , vari ab le ) Example LINEAR?((X^2-1)/(X 1),X) r etur ns 0 QUAD Solves quadratic expression= 0 for variable and returns a new expression, where variable = newexpression. The result is a general solution th at represents both positive and negative solutions by in cluding the formal variable S1 to represent any sign: or â . QUAD( exp re ss io n , variab le ) Example QUAD((X -1) 2 -7,X) r eturns (2 s1*(2* â 7))/2 QUOTE Encloses an expression that should not be evaluated numerically. QUOTE( exp res s io n ) Examples QUOTE(SIN(45)) F1(X) store s the expr ession S IN(4 5) rather than th e value of SIN( 45 ). Another method is to enc lose the e xpre ssion in single quotes. For exa m p l e, X^3 2*X F1(X) puts the expr ession X^3 2*X into F1( X) in the F unction aplet. | ( where ) Evaluates expression where each given variable is set to the given value . Defines numeric evaluation of a symbolic expression. expr ession |( variable1=v alue1, var iable2=v alue2 ,... ) Example 3*(X 1)|(X=3) r eturns 12 . hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-19 Test functions The test functions are logical operators that always return either a 1 ( true ) or a 0 ( false ). < Less than. Returns 1 if true, 0 if false. val u e1 < va lu e 2 ⤠Less than or equal to. Returns 1 if true, 0 if false. val u e1 ⤠va lu e 2 = = Equals (logical test). Returns 1 if true, 0 if false. val u e1 ==va lu e 2 â Not equal to. Returns 1 if true, 0 if false. val u e1 â va lu e 2 > Greater than. Returns 1 if true, 0 if false. val u e1 > val u e2 ⥠Greater than or equal to. Returns 1 if true, 0 if false. val u e1 ⥠va lu e 2 AND Compares value1 and value2 . Returns 1 if they are both non-zero, otherwise returns 0. val u e1 AND val u e2 IFTE If expression is true, do the trueclause ; if not, do the falseclause. IFTE( expr ession , truec laus e , f alsec lause ) Example IFTE(X>0,X 2 ,X 3 ) NOT Returns 1 if value is zero, otherwise return s 0. NOT valu e OR Returns 1 if either value1 or value2 is non-zero, o therwise returns 0. val u e1 OR val u e2 hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
13-20 Using mathematical fun ctions XOR Exclusive OR. Returns 1 if either value1 or value2 âbut not both of themâis non-zero, otherwise returns 0. val u e1 XOR val ue2 Trigonometry functions The trigonometry functions can also take complex numbers as arguments. For SIN, COS, TAN, ASIN, ACOS, and ATAN, see the Keyboard category. ACOT Arc cotangent. ACOT ( val ue ) ACSC Arc cosecant. ACSC ( val ue ) ASEC Arc secant. ASEC ( val ue ) COT Cotangent: cos x /sinx . COT ( val ue ) CSC Cosecant: 1/sin x CSC ( val ue ) SEC Secant: 1/cos x . SEC ( val ue ) Symbolic calculations Although CAS provides the richest environment for performing symbolic calculations, you can perform some symbolic calculations in HOME and with the Function aplet. CAS functions that yo u can perform in HOME (such as DERVX and INTVX) are discussed in âUsing CAS functions in HOMEâ on page 14-7. In HOME When you perform calculations that contain normal variables, t he calcula tor substitutes values for any variables. For e xample, if you e nter A B on the command line and press , the calculator retrieves the values for A and B from memory and substitutes them in the calculation. Using formal variables To perform symbolic calculations, for example symbo lic differentiations and integrations, you need to use formal hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-21 names. The HP 40gs has six formal names available for use in symbolic calculations. These are S1 to S5. When you perform a calculation that contains a formal name, the HP 40gs does not carry out any substitutions. You can mix formal names and real variables. Evaluating (A B S1) 2 will evaluate A B , but not S1 . If you need to evaluate an expression that contains formal names numerically, you use the | ( where ) command, listed in the Math menu un der the Symbolic category. For example to evaluate (S1*S2) 2 when S1=2 and S2=4 , you would enter the calculation as follows: (The | symbol is in the CHARS menu: press CHARS . The = sign is listed in the MATH menu under Symbolic functions.) Symbolic calculations in the Function aplet You can perform symbolic operations in the Functi on apletâs Symbolic view. For example, to find the derivative of a function in the Functi on apletâs Symbolic view, you define two functions and define the second function as a derivative of the first function. You then evaluate the second function. See âTo find derivatives in the Function apletâs Symbolic viewâ on page 13- 22 for an example. Finding derivatives The HP 40gs can perform symbolic differentiation on some functions. There are two ways of using the HP 40gs to find derivatives. ⢠Y ou can perfor m differ entiations in HO ME by using the fo rmal v aria bles, S1 t o S5 . ⢠Y ou can perfor m differ entiati ons of functi ons of X in the F unction aplet . To find derivatives in HOME To find the derivative of the function in HOME, use a formal variable in place of X. If you use X, the hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
13-22 Using mathematical fun ctions differentiation function substi tutes the value that X holds, and returns a numeric result. For example, consider the function: 1. Enter the differ entiati on functi on onto the command line , substituting S1 in place of X . S1 S1 2 S1 2 . Ev aluate the func tion. 3 . Sho w the re sult . To find derivatives in the Function apletâs Symbolic view To find the derivative of the fu nction in the Function apletâs Symbolic view, you define two functions and define the second function as a derivati ve of the first function. For example, to differentiate : 1. Access the F uncti on apletâs S ymbolic v ie w and define F1. 2 2. D e f i n e F 2 ( X ) as the deri vativ e of F(1). dx x ( 2 ) sin ( 2 x () ) cos x 2 () sin 2 x cos hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-23 F1 3. Se l e c t F 2 ( X ) and eval u a te i t. 4. Pres s to display the re sult . Note: Use the arr o w ke y s to vi ew the entir e functi on . | Y ou could a lso ju st def ine . To find the indefinite integral using formal variables F or ex ample, to find the indefinite integral of use: 1. Enter the f unction . 0 S1 3 X 5 X 2 . Sho w the r esult f ormat . 3 . Press to c lose the sho w w indo w . F 1 x () xx 2 () 2 x () co s sin () d = 3 x 2 5 â x d â« ( ) â« â X X S , 5 3 , 1 , 0 2 hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
13-24 Using mathematical fun ctions 4. Cop y the r esult and eva lu a te. Thu s, sub stituting X for S1, it can be seen that: This result is derived from substituting X =S 1 and X =0 into the original expression found in step 1. However, substituting X =0 will not always evaluate to zero and may result in an unwanted constant. To see this, consider: The âextraâ constant of 32/5 results from the substitution of into ( x â2 ) 5 /5 , and should be disregarded if an indefinite integral is required. Program constants and physical constants When y ou press , thr ee menus of f unctions and constants become av ailable: ⢠the math functi ons menu (w hic h appears b y def ault) ⢠the progr am constants men u, and ⢠the phy sical constants menu . The math functions menu is described extensively earlier in this chapter. 3 x 2 5 â x 5 x â3 x 3 3 ---- - X â â X () -------------- - ââ ââ ââ ââ ââ = d â« x 2 â () 4 x x ( 2 ) 5 â 5 ------------------- = d â« x 0 = hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-25 Program constants The program constants are numbers that have been assigned to various calculat or settings to enable you to test for or specify such a setting in a program. For example, the various displa y formats are assigned the following numbers: 1 Standar d 2 F ix ed 3 Scient ific 4 Engineering 5 Fraction 6 Mixed fraction In a program, you could store the co nstant number of a particular format into a var iable and then subsequently test for that particular format. To access the menu of program constants: 1. Pres s . 2. P r e s s . 3 . Use the ar r ow k e ys t o nav igate thr ough the options . 4. Click and then to di splay the number assigned to th e option you selected in the pre vi ous step. The use of program constants is illustr ated in more detail in âProgrammingâ on page 21-1 Physical constants There are 29 physical cons tantsâfrom the fields of chemistry, physics and quantum mechanicsâthat you can use in calculations. A list of all these constants can be found in âPhysical Co nstantsâ on page R- 16. To access the menu of physical constants: 1. Pres s . 2. P r e s s . hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
13-26 Using mathematical fun ctions 3 . Use the ar r ow k e y s to nav igate thr ough the opti ons. 4. T o see the sy mbol and v alue of a selec ted constant , pre ss . (Cli ck to c lose the inf ormati on w indow that appears .) The f ollo wing e xample sho ws the inf ormati on av ailabl e about the speed of light ( one of the phy sics constants). 5 . T o use the selected constant in a calculation, pr ess . The cons tant appears at the po sition of the cursor on the edit line. Example Suppose you want to know the potential energy of a mass of 5 units according to the equation . 1. Enter 5 2 . Pres s and then p r ess . E mc 2 = hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-27 3. Se l e c t light s... fr om the Ph ysi cs menu . 4. Pr ess . T he menu clo ses and the v alue of the select ed constant is copied t o the edit line. 5 . Co mplete the equati on as y ou w ould nor mally and pre ss to get the r esult . hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-1 14 Computer Algebra S y stem (CAS) What is a CAS? A computer al gebra system ( hereafter C AS) enables y ou to perform symbolic calculations. With a CAS you manipulate mathematical equations and expressions in symbolic form, rather than manipulating approximations of the numerical quantities re presented by those symbols. In other words, a CAS works in exact mode , givi ng you infinite precision. On the other hand, non-CAS calculations, such as those performed in HOME view or by an aplet, are numerical calculations and are limited b y the precis ion of the ca lculator (to 10 â12 in the case of the HP 40gs) . For example, with Standard as your numerical format, 1/2 1/6 returns 0.666666666 6667 if you are working in the HOME screen; however , 1/2 1/6 returns 2/3 if you are working with CAS. HOME calculations are restricted to approximate (or numeric ) mode, while CAS calculations always work in exact mode (unless you specifica lly change the default CAS modes). Each mode has adva ntages and disadvantages. For example, in exact mode there is no rounding error, but some calculations will take much longer to complete and require more memory than equivalent calculations in numeric mode. Performing symbolic calculations You perform CAS calculations with a special tool known as the Equation Writer . Some computer algebra operations can also be done in the HOME screen, as long as you take certain precautions (see âUsing CAS functions in HOMEâ on page 14-7). Moreover , some computer algebra operations can only be done in the HOME screen; for example, symbolic linear algebra hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
14-2 Computer Algebra System (CAS) using vectors and matrices. (Vectors and matrices cannot be entered using the Equation Writer). To open the Equation Writer, press the soft- key on the menu bar of the HOME screen. The illustration at the right shows an expression being written in the Equation Writer. The soft keys on the menu bar provide access to CAS functions and commands. To leave the Equation Writer, press to return to the HOME screen. Note that expressions written in the Equation Writer (and the results of evaluating an expression) are not automati cally copied to the HOME history when you leave the Equation Writer. (You can, however, manually copy th em to HOME: see page 14-8). CAS functions are described in detail in âCAS functions in the Equation Writerâ on page 14-9. Chapter 15, âEquation Writerâ, explains in detail how to enter an expression in the Equation Wr iter and contains numerous worked examples of CAS in operation. An example To give you an idea of how CAS works, letâs consider a simple example. Suppose you want to convert C to the form where C is and d is a whole number. 1. Open the E quation W riter b y pres sing the soft- key on the HOME sc reen. 2. Enter the expression for C . [ Hint: use the k e ys on the k ey boar d as yo u wo uld if entering the ex pre ssion in HO ME . Pr ess the k ey tw ice t o select the entir e fir st ter m befo re e nter ing the second ter m .] d 5 â 24 5 2 0 â hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-3 3. P re s s a n d t o select j ust the 20 in the term . 4. Pres s the menu ke y and choose FACTOR . Then pr ess . Note that the FACTOR functi on is added to the sele cted t erm. 5. Press to factor the selected term. 6 . Pr ess to select the entire second term, and then press to simplify it. 7 . P r e s s to select the 45 in the first term. 8. As you did ear lier , press the menu k ey and choose FACTOR . Then pres s and to factor the selected term. 9 . Pr ess to select the entire second term, and then press to simplify it. 20 hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
14-4 Computer Algebra System (CAS) 10. Pres s three times to select the entire expression and then press to simplify it to the form required. CAS variables When you use the symbolic calculation functions, y ou are working with symbolic variab les (variables that do not contain a permanent value). In the HOME screen, a variable of this kind must have a name like S1â¦S5, s1â¦s5, n1â¦n5 , but not X, which is assigned to a real value. (By default, X is assigned to 0). To store symbolic expressions, you must use the variables E0, E1â¦E 9 . In the Equation Writer, all th e variables may, or may n ot be, assigned. For example, X is not assigned to a real value by default, so computing X X will return 2X . Moreover, Equation Writer variables can have lo ng names, like XY or ABC , unlike in HOME where implied multiplication is assumed. (For example ABC is interpreted as A à B à C in HOME. ) For these reasons, variables used in the Equation Writer cannot be used in HOME , and vice versa. Using the PUSH command, you can transfer expressions from the HOME screen history to CAS history (see page 14-8). Likewise, you can use the POP command to transfer expressions from CAS history to the HOME screen history (see page 14-8). The current variable In the Equation Writer, the current variable is the name of the symbolic variable contained in VX . It is almost always X . (The current vari able is always S1 in HOME .) Some CAS functions depend on a current variable; for example, the function DERVX calculates the derivative with respect to the current va riable. Hence in the Equation Writer, DERVX(2*X Y) returns 2 if VX = X , but 1 if VX = Y. However, in the HOME screen, DERVX(2*S1 S2) returns 2 , but DERIV(2*S1 S2,S2) returns 1. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-5 CAS modes The modes that determine how CAS operates can be set on CAS MODES scre en. To display CAS MODES screen, press: ·To navigate through the options in CAS MODES screen, press the arrow keys. To select or deselect a mode , navigate to the appropriate field and press until the co rrect setting is displayed (indicated by a check mark in the field). For some settings (such as INDEP VAR and MODULO ), you will need to press to be able to change the setting. Press to close CAS MODES screen. NOTE You can also set CAS modes from within the Equation Writer. See âConfiguration menusâ on page 15-3 for information. Selecting the independent variable Many of the functions provided by CAS use a pre- determined independent variab le. By default, that variable is the letter X (upper case) as shown in CAS MODES screen above. However, you can change this variable to any oth er letter, or combination of letters and numbers, by editing the INDEP VAR field in CAS MODES screen. To change the setting, press , enter a new value and then press . The variable VX in the calculator's {HOME CASDIR} directory takes, by de fault, th e value of 'X'. This is the name of the preferred independent variable for algebraic and calculus applications. If you use a nother independent variable name, some functions (for example, HOR NER) will not work properly. Selecting the modulus The MODULO option on CAS MODES screen lets you specify the modulo you want to use in modular arithmetic. The default value is 13. Approximate vs. Exact mode When the APPROX mode is selected, symbolic operations (for example, definite integrals, square roots, etc.), will be calculated numerically. When this mode is unselected, exact mode is active, hence symbol ic operations will be hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
14-6 Computer Algebra System (CAS) calculated as closed-form algebraic expressions, whenever possible. [Default: u nselected.] Num. Factor mode When the NUM FACTOR setting is selected, approximate roots are used when factoring . For example, is irreducible over the intege rs but has approximate roots over the reals. With NUM FACTOR set, the approximate roots are returned. [Default: unselected.] Complex vs. Real mode When COMPLEX is selected and an operation results in a complex number, the result will be shown in the form a bi or in the form of an ordered pair ( a ,b ). If COMPLEX mode is not selected and an operation results in a complex number, you will be asked to switch to COMPLEX mode. If you decline, the calculator will report an err or. [Default: unselected.] When in COMPLEX mode, CAS is able to perform a wider range of operations than in non-complex (or real) mode, but it will also be considerably slower. Thus, it is recommended that you donât select COMPLEX mode unless requested by the calculator in the perfor mance of a particular operation. Verbose vs. non- verbose mo de When VERBOSE is selected, certain calculus applications are provided with comment line s in the main display. The comment lines will appear in th e top lines of the display, but only while the operation is being calculated. [Default: unselected.] Step-by-step mode When STEP/STEP is selected, certain operations will be shown one step at a time in the display. You press to show each step in turn. [Default: selected.] Increasing-powers mode When INCR POW is selected, polynomials will be listed so that the terms will have increasing powers of the independent variable (which is the opposite to how polynomials are normally written). [Default: unselected.] Rigorous setting When RIGOROUS is selected, any algebraic expression of the form |X|, i.e., the absolute value of X, is not simplified to X. [Default: selected.] Simplify non- rational setting When SIMP NON-RATIONAL is selected, non-rati onal expressions will be automati cally simplified. [Default: selected.] x 5 5 x 1 hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-7 Using CAS functions in HOME You can use many computer algebra functions directly in the HOME screen, as long as you take certain precautions. CAS functions th at take matrices as an argument work only from HOME. CAS functions can be accessed by pressing when MATH menu is displayed. Yo u can also directly type a function name when you are in alpha mode. Note that certain calculations will be performed in approximate mode because numbers are interpr eted as reals instead of integers in HOME. To do exact calculations, you should use the XQ command. This command converts an approxi mate argument into an exact argument. For example, if Radians is your angle setting, then: ARG(XQ(1 i)) = Ï /4 but ARG(1 i) = 0.7853... Similarly: FACTOR(XQ(45)) = 3 2 à 5 but FACTOR(45) = 45 Note too that the symbolic HOME variable S1 serves as the current variable for CAS functions in HOME. For example: DERVX(S1 2 2 à S1) = 2 à S1 2 The result 2 à S1 2 does not depend on the Equation Writer variable, VX . Some CAS functions cannot wo rk in HOME because they require a change to the current variable. Remember that you must use S1,S2,â¦S5, s1,s2,â¦s5, and n1,n2,â¦n5 for symbolic variables and E0, E1,â¦E9 to store symbolic expressions. For example, if you type: S1 2 â 4 à S2 E1 then you get: DERVX(E1) = S1 à 2 DERIV(E1, S2) = â4 INTVX(E1) = 1/3 S1 3 â 4 à (S2 à S1) hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
14-8 Computer Algebra System (CAS) Symbolic matrices are stored as a list of lists and therefore must be stored in L0, L1â¦L 9 (whereas numeric matrices are stored in M0, M1,â¦M9). CAS linear algebra instructions accept lists of lists as input. For example, if you type in HOME: XQ({{S2 1, 1}, { , 1}}) L1 then you have: TRAN(L1) = {{S2 1, }, {1, 1}} Some numeric linear algebra commands do not direc tly work on a list of lists, but will do so after a conversion by AXL. For example, if you enter: DET(AXL(L1)) E1 you get: S2â(â1 ) Send expressions fr o m H O M E t o C A S history In the HOME screen, you can use the PUSH command to send expressions to CAS hist ory. For example, if you enter PUSH(S1 1), S1 1 is written to CAS history. Send expressions from CAS to HOME history In the HOME screen, you can use the POP command to retrieve the last expression written to CAS history. For example, if S1 1 is the last expression written to CAS history and you enter POP in the HOME screen, S1 1 is written to the HOME screen history (and S1 1 is removed from CAS history). Online Help When you are working with the Equation Writer, you can display online help about any CAS command. To display the contents of the online help, press 2. Press to navigate to the command you want help with and then press . You can also get CAS help from the HOME screen. Type 2 2 2 hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-9 HELP and press . The menu of help topi cs appears. Each help topic includes the required syntax, along with real sample values. You can copy the syntax, with the sample values, to the HOME screen or to the Equation Writer, by pressing . TIP If you highlight a CAS command and then press 2, help about the highlighted command is di splayed. You can display the online help in Fr ench rather than English. For instructions, see âOnline Help languageâ on page 15-4. CAS functions in the Equation Writer You can display a menu of CAS functions in four ways: ⢠by displa y ing the MA TH menu fr om HOME and then pres sing , or ⢠opening the Eq uation W riter and pr essing , ⢠opening the E quatio n W r iter and selecting a f uncti on fr om a soft-ke y menu , or ⢠opening the Eq uation W riter and pr essing . You can also directly type the name of a CAS function when you are in ALPHA mode. Note that in this section, CAS functions available from the sot-key menus in the E quation W riter are described. CAS functions available from the MATH menu are described in âCAS Functions on the MATH menuâ on page 14-45. NOTE When using CAS, you should be aware that the required syntax will vary depending on whether you are applying the command to an expressio n or a function. All CAS commands are designed to work with expressions; that is, they take expressions as arguments. If you are going to use a functionâfor example, Fâyou need to specify an expression made from this function, such as F( x ), where x is the independent variable. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
14-10 Computer Alge bra System (CAS) For example, suppose you have stored the expression x 2 in G, and have defined the function F(x) as x 2 . Suppose now you want to calculate INTVX(X 2 ). You could: ⢠enter INTVX(X 2 ) direc tly , or ⢠enter INTVX(G) , or ⢠enter INTVX(F(X)) . Note that you can apply the command directly to an expression or to a variable that holds an expression (the first two cases above). But where you want to apply it to a defined function, you need to specify the full function name, F(X), as in the third case above. ALGB menu COLLECT Factors over the integers COLLECT combines like terms and factors the expression over the integers. Example To factor over the integers you would type: COLLECT(X 2 â4) which gives in real mode: Example To factor over the integers you would type: COLLECT(X 2 â2) which gives: DEF Define a func tion For its argument, DEF tak es an equality between: 1. the name of a func tion ( with par enthese s containing the var iable), and 2 . an expr ession def ining the functi on. DEF defines this function and returns the equality. x 2 4 â x 2 () x 2 â () â x 2 2 â x 2 2 â hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-11 Typing: DEF(U(N) = 2N 1) produces the result: U(N) = 2N 1 Typing: U(3) then returns: 7 Example Calculate the first six Fermat numbers F1...F6 and determine whether they are prime. So, you want to calculate: for k = 1...6 Typing the formula: gives a result of 17. You can then invoke the ISPRIME?() command, which is found in the MATH keyâs Integer menu. The response is 1, which m eans TRUE. Using the history (which you access by pressing the SYMB key), you put the expression into the Equation Writer with ECHO , and change it to: Or better, define a function F(K) by selecting DEF from the ALGB menu on the menu bar and type: The response is and F is no w listed among st the var iables ( whic h y ou can ver ify using the VARS ke y). For K=5 , you then type: F(5) Fk () 2 2 k 1 = 2 2 2 1 2 2 2 1 2 2 3 1 D E FFK () 2 2 k 1 = () 2 2 k 1 hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
14-12 Computer Alge bra System (CAS) which gives 4294967297 You can factor F(5) with FACTOR , which youâll find in the ALGB menu on the menu bar. Typing: FACTOR(F(5)) gives: 641·6700417 Typing: F(6) gives: 18446744073709551617 Using FACTOR to factor it, then yields: 274177·67280421310721 EXPAND Di stributivity EXPAND expands and simp lifies an expression. Example Typing: gives: FACTOR Factorization FACTOR factors an expression. Example To factor: type: FACTOR(X 4 1) FACTOR is located in the ALGB menu. XPAND X 2 2 X 1 â () X 2 2 X â 1 â ( ) â ( x 4 1 x 4 1 hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-13 In real mode, the result is: In complex mode (using CFG ), the result is: PARTFRAC Partial fraction expansion PARTFRAC has a rational fraction as an argument. PARTFRAC returns the partial fraction decomposition of this rational fraction. Example To perform a partial fraction decomposition of a rational function, such as: you use the PARTFRAC command. In real and direct mode, this produces: In complex mode, this produces: QUOTE Quoted expression QUOTE( expression ) is used to prevent an expression from being evaluated or simplified. Example 1 Typing: gives: â x 2 2 x â 1 () x 2 2 x â 1 â () â 1 16 ----- - 2 x 1 i () 2 â () 2 x 1 i () â2 â () 2 x 1 i â () 2 â () 2 x 1 i â () â2 â () â â â â x 5 2 â x 3 1 â x 4 2 â x 3 â 2 x 2 2 x 1 â () â â ------------------------------------------------------------------------ - x 2 x 3 â 2 x 2 â 2 --------------------- - 1 â 2 x â 2 â ------------------ - x 2 13 i â 4 ------------- - xi ------------- - 1 â 2 ----- - x 1 â ---------- - 13 i 4 ------------- - xi â ------------- - i m QUOTE 2 X 1 â () ( EXP ( 1 X -- - 1 ) â â X â = , â â â â hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
14-14 Computer Alge bra System (CAS) Example 2 Typing: SUBST(QUOTE(CONJ(Z)),Z=1 i) gives: CONJ(1 i) STORE Store an object in a variable STORE stores an object in a variable. STORE is found in the ALGB menu or the Equation Writer menu bar. Example Type: STORE(X 2 -4,ABC) or type: X 2 -4 then select it and call STORE , then type ABC, then press ENTER to confirm the definition of the variable ABC . To clear the variable, press VARS in the Equation Writer (then choose PURGE on the menu bar), or select UNASSIGN on the ALGB menu by typing, for example, UNASSIGN(ABC) | Substitute a value for a variable | is an infix operator used to substitute a value for a variable in an expression (similar to the function SUBST ). | has two parameters: an ex pression dependent o n a parameter, and an equality (parameter=substitute value). | substitutes the specified value for the variable in the expression. Typing: gives: X 2 1 â X 2 = 2 2 1 â hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-15 SUBST Substi tute a value for a variable SUBST has two parameters: an expression depe ndent on a parameter, and an equality (parameter=substitute value). SUBST substitutes the specifie d value for the variable in the expression. Typing: SUBST(A 2 1,A=2) gives: TEXPAND Develop in terms of sine and cosine TEXPAND has a trigonometric expression or transcendental function as an argument. TEXPAND develops this expression in terms of sin(x) and cos(x). Example Typing: TEXPAND(COS(X Y)) gives: Example Typing: TEXPAND(COS(3·X)) gives: UNASSIGN Clear a variable UNASSIGN is used to clear a variable, for example: UNASSIGN( ABC ) 2 2 1 y () cos x () cos y () x () sin â sin â â 4 x () 3 cos 3 â x () cos â â hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
14-16 Computer Alge bra System (CAS) DIFF menu DERIV Derivative and partial derivativ e DERIV has two arguments: an expression (or a functi on) and a variable. DERIV returns the derivative of the expression (or the function) with respect to th e variable given as the second parameter (used for calculating partial derivatives). Example Calculate: Typing: DERIV(X·Y 2 ·Z 3 X·Y,Z) gives: DERVX Derivative DERVX has one argument: an expression. DERVX calculates the derivative of the expression with respect to the variable stored in VX. For example, given: calculate the derivative of f . Type: Or, if you have stored the definition of f(x) in F, that is, if you have typed: then type: â xy 2 z 3 â â xy â () â z --------------------------------------------- - 3 xy 2 z 2 â â â fx () x x 2 1 â ------------- - x 1 x 1 â ----------- - ââ ââ ln = D ERVX X X 2 1 â -------------- - LN X 1 X 1 â ------------ - â â â â â â â â TORE X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ F , â â â â hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-17 DERVX(F) Or, if you have defined F(X) using DEF , that is, if you have typed: then type: DERVX(F(X)) Simplify the result to get: DIVPC Division in increasing order by exponent DIVPC has three ar guments: two polynomials A(X) and B(X) (where B(0) â 0), and a whole number n. DIVPC returns the quotient Q(X) of the division of A(X) by B(X), in increasing order by exponent, and with deg(Q) <= n or Q = 0. Q[X] is then the limite d nth-order expansion of: in the vicinity of X= 0. Typing: DIVPC(1 X 2 X 3 ,1 X 2 ,5) gives: NOTE: When the calculator displays a request to change to increasing powers mode, respond yes. FOURIER Fourier coefficients FOURIER has two parame ters: an expr ession f(x) and a whole number N . FOURIER returns the Fourier coefficient c N of f(x), considered to be a function defined over interval [0, T ] D EF(F(X) X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ â â = 3 x 2 1 â â x 4 2 â x 2 1 â -------------------------------- - â AX [] BX [] ----------- - 1 x 3 x 5 â hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
14-18 Computer Alge bra System (CAS) and with period T (T being equal to the contents of the variable PERIOD ). If f(x) is a discrete series, then: Example Determine the Fourier coefficients of a periodic function f with period 2 Ï and defined over interval [0, 2 Ï ] by f(x)=x 2 . Typing: STORE(2 Ï,PERIOD) FOURIER(X 2 ,N) The calculator does not know that N is a whole number, so you have to replace EXP(2 â iâ NâÏ ) with 1 and then simplify the expression. We get So if , then: Typing: FOURIER(X 2 ,0) gives: so if , then: IBP Partial integration IBP has two parameters: an expression of the form and . f x () c N e 2 iN x Ï T ------------- -- - N â â = â â = 2 iN Ï 2 â â â N 2 ---------------------------------- N 0 â c N 2 iN Ï 2 â â â N 2 --------------------------------- - = 4 Ï 2 â 3 ------------ - N 0 = c 0 4 Ï 2 â 3 ------------ - = ux () v ' x () â vx () hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-19 IBP returns the AND of and of that is, the terms that are calculated when performing a partial integration. It remains then to calculate the integral of the second term of the AND, then add it to the first term of the AND to obtain a primitive of . Typing: IBP(LN(X),X) gives: X·LN(X) AND - 1 The integration is completed by calling INTVX : INTVX(X·LN(X)AND - 1) which produces the result: X·LN(X) - X NOTE: If the first I BP (or INTVX) pa rameter is an AND of two elements, IBP concerns itself only with the second element of the AND, adding the integrated term to t he first element of the AND (so that you can perform multiple IBP in succession). INTVX Primitive and defined integral INTVX has one argument: an expression. INTVX calculates a primitive of its argument with respect to the variable stored in VX. Example Calculate a primitive of sin(x) à cos(x) . Typing: INTVX(SIN(X)·COS(X)) gives in step-by-step mode: COS(X)·SIN(X) Int[uâ âF(u)] with u=SIN(X) Pressing OK then sends the result to the Equation Writer: ux () vx () â v â x () u ' x () â ux () v ' x () â x () 2 sin 2 ----------------- - hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
14-20 Computer Alge bra System (CAS) Example Given: calculate a primitive of f . Type: Or, if you have stored f(x) in F, that is, if you have already typed: then type: INTVX(F) Or, if you have used DEF to define f( x), that is, if you have already typed: then type: INTVX(F(X)) The result in all cases is equivalent to: You will obtain absolute values only in Rigorous mode. (See âCAS modesâ on page 14-5 for instructions on setting and changing mode s.) Example Calculate: Typing: f x () x x 2 1 â ------------- - LN x 1 x 1 â ----------- - ââ ââ = N TVX X X 2 1 -------------- - LN X 1 X 1 â ------------ - ââ ââ â â â â TORE X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ F , â â â â D EF(F(X) X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ â â = X LN X 1 X 1 â ------------ - ââ ââ 3 2 -- - LN X 1 â () 3 2 -- - LN X 1 ( â â â 2 x 6 2 x 4 x 2 â ----------------------------------- x d â« hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-21 gives a primitive: Note You can also type which gives the primitive which is zero for x = 1 Example Calculate: Typing: gives the result: NOTE: If the argument to INTVX is the AND of two elements, INTVX concerns itself only with the se cond element of the AND, and adds the result to the first argument. lim Calculate limits LIMIT or lim has two arguments: an expression dependent on a variable, and an equality (a variable = the value to which you want to calculate the limit). You can omit the name of the variable and the sign =, when this name is in VX). It is often preferable to use a quoted expression: NTVX 2 X 6 2 X 4 X 2 â -------------------------------------- â â â â 3 â x () atan 2 x -- - x x 2 1 ------------- - â â â 2 X 6 2 X 4 X 2 â -------------------------------------- X d 1 X â« 3 â x () atan 2 x -- - x x 2 1 ------------- - 3 Ï 10 â 4 ---------------------- - ââ ââ â â â 1 x () sin 2 x â () sin ------------------------------------------- - x d â« N TVX 1 SIN X () SIN 2 X â () --------------------------------------------------- - â â â â 1 6 -- - LN X () cos 1 â () â 1 2 -- - LN X () cos 1 () â 2 â 3 ----- - LN 2 X () cos 1 () â hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
14-22 Computer Alge bra System (CAS) QUOTE(expression), to avoid rewriting the expression i n normal form (i.e., not to have a rational simplification of the arguments) during the execution of the LIMIT command. Example Typing: gives: â To find a right limit, for example, type: gives (if X is the current variable): â To find a left limit, for example, type: gives (if X is the current variable): â â It is not necessary to quote the second argument when it is written with =, for example: gives: â Example For n > 2 in the following expressio n, find the limit as x approaches 0: You can use the LIMIT command to do this. lim QUOTE 2 X 1 â () ( ( EXP 1 X 1 â ----------- - ââ ââ â â X â = ) , â lim 1 X 1 â ----------- - QUOTE 1 0 () , ââ ââ lim 1 X 1 â ----------- - QUOTE 1 0 â () , ââ ââ lim 1 X 1 â ----------- - X 10 = () , ââ ââ nx () tan nx â () tan â â nx â () sin nx () sin â â --------------------------------------------------- - hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-23 Typing: gives: 2 NOTE: To find the limit as x approaches a (resp a â ), the second argument is written: X=A 0(resp X=A-0) For the following expression, find the limi t as x approaches â : Typing: produces (after a short wait): NOTE: the symbol â is obtained by typing SHIFT 0. To obtain â â : (â) â To obtain â : (â)(â) â You can also find the symbol â in the MATH keyâs Constant menu. PREVAL Eva luate a primitive PREVAL has three parame ters: an expression F(VX) dependent on the variable contained in VX , an d two expressions A and B. For example, if VX contai ns X , and if F is a function, PREVAL (F(X),A,B) returns F(B)-F(A ) . lim NT A N X () TAN N X ) â ( â â SIN N X â () NS I N X () â â ---------------------------------------------------------------- - 0 , ââ ââ xxx x â lim XXX X â , â ââ ââ 1 2 -- - hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
14-24 Computer Alge bra System (CAS) PREVAL is used for calculatin g an integral defined from a primitive: it evaluates this pr imitive between the two limits of the integral. Typing: PREVAL(X 2 X,2,3) gives: 6 RISCH Primitive and defined integral RISCH has two parameters: an expression and the name of a variable. RISCH returns a primitive of the first parameter with respect to the variable spec ified in the second parameter. Typing: RISCH((2·X 2 1)·EXP(X 2 1),X) gives: X·EXP(X 2 1) NOTE: If the RISCH parameter is the AND of two elements, RISCH concerns itself only with the second element of the AND, and adds the result to the first argument. SERIES Limited n th-order expansion SERIES has three arguments: an expression de pendent on a variable, an equality (the variable x = the value a to which you want to calculate the expansion) and a whole number (the order n of the limited expan sion). You can omit the name of the variable and the = sign when this name is in VX ). SERIES returns the limited n th-order expansion of the expression in th e vicinity of x = a . ⢠Ex ampl e â Expansion in th e vicinit y of x=a Give a limited 4th-order expansion of cos(2 · x ) 2 in the vicinity of . For this you use the SERIES command. x Ï 6 -- - = hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-25 Typing: gives: ⢠Ex ampl e â Expansion in the vic inity of x= â or x=â â Example 1 Give a 5th-order expansion of arctan(x) in the vic inity of x = â , taking as infinitely small . Typing: SERIES(ATAN(X),X = â,5) gives: Example 2 Give a 2nd-order expan sion of in the vicinity of x = â, taking as infinitely small . gives: ⢠Unidirec tional expansion To perform an expansion in the vicinity of x = a where x > a, use a positive real (such as 4.0) for the order. To perform an expansion in the vicinity of x = a where x < a, use a negative real (such as â4.0) for the order. S ERIES COS 2 X â () 2 X Ï 6 -- - =4 ,, â â â â 1 4 -- - 3 h 2 h 2 83 3 --------- - h 3 8 3 -- - h 4 0 h 5 4 ---- - ââ ââ â â hX Ï 6 -- - â = â©| ⪠h 1 x -- - = Ï 2 -- - â â h h 3 3 ---- - h 5 5 ---- - 0 Ï h 6 â 2 ------------ - ââ ââ â â â â h 1 x -- - = 2 x 1 â () e 1 x 1 â ----------- h 1 x -- - = S ERIES 2 X 1 ) â ( ( EXP 1 X 1 â ----------- - ââ ââ X â 3 ) , = , â 12 6 h 12 h 2 17 h 3 6 h â ------------------------------------------------------ - 02 h 3 â () h 1 x -- - = hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
14-26 Computer Alge bra System (CAS) You must be in Rigorous (not Sloppy) mode to apply SERIES with unidirectional expansion. (See âCAS modesâ on page 14-5 for instructions on setting and c hanging modes. Example 1 Give a 3rd-order expansion of in the vicinity of x = 0 . Typing: gives: Example 2 Give a 3rd-order expansion of in the vicinity of x = 0 â . Typing: gives: Note that h = â x is positive as x â 0 â . Example 3 If you enter the order as an integer rather than a real, as in: you will get the following error: SERIES Error: Unable to find sign. Note that if you had been in Sloppy rather than Rigorous mode, all three examples above would h ave returned the same answer as you got when exploring in the vicinity of x = 0 : x 2 x 3 SERIES X 2 X 3 X 03 . 0 , = , () 1 16 ----- - h 4 â 1 â 8 ----- - h 3 â 1 2 -- - h 2 â h 0 h 5 () hx = () x 2 x 3 S ERIES X 2 X 3 X 03 . 0 â , = , ( ) 1 â 16 ----- - h 4 â 1 â 8 ----- - h 3 â 1 â 2 ----- - h 2 â h 0 h 5 () hx â = () SERIES X 2 X 3 X 03 , = , () hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-27 TABVAR Variation table TABVAR has as a parameter an expression wi th a rational derivative. TABVAR returns the variation table for the expression in terms of the current variable. Typing: TABVAR(3X 2 -8X-11) gives, in step-by-step mode: Variation table: The arrows indicate whether th e function is increasing or decreasing during the specifie d interval. This particular variation table indicates that the function F( x ) decreases for x in the interval [â â , ], reaching a mi nimum of at x = . It then increases in the interval [ , â ], reaching a maximum of â . Note that â?â appearing in the variation table indicates that the function is not defined in the correspo nding interval. TAYLOR0 Limited expansion in the vicinity of 0 TAYLOR0 has a single argument: the function of x to expand. It returns the functionâs limited 4th-relative-order expansion in the vicinity of x=0 (if x is the current variable). 1 16 ----- - h 4 â 1 â 8 ----- - h 3 â 1 2 -- - h 2 â h 0 h 5 () hx = () â â â â X â ââ â F F 3 x 2 â 8 x â â1 1 â () = F '3 2 x 8 â â â () = 23 x 4 â â () â () â 4 3 -- - 49 â 3 --------- - 4 3 -- - 49 â 3 --------- - 4 3 -- - 4 3 -- - hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
14-28 Computer Alge bra System (CAS) Typing: gives: Note âth-orderâ means that the numerator and the denomi nator are expanded to the 4th relative order (here, the 5th absolute order for the numerator, and fo r the denominator, which is given in the end, the 2nd order (5 â 3), seeing that the exponent of the denominator is 3). TRUNC Truncate at order n - 1 TRUNC enables you to truncate a p olynomial at a given order (used to perform limited expansions). TRUNC has two arguments: a polynomial and X n . TRUNC returns the polynomial truncated at order n â 1; that is, the returned polynomial has no terms with exponents ⥠n. Typing: gives: REWRI menu The REWRI menu contains functions that enable you to rewrite an expression in another form. DISTRIB Distributivity of multiplication DISTRIB enables you to apply the distributivity of multiplication in respect to addition in a single instance. DISTRIB enables you, when you apply it several times, to carry out the distributivity step by step. TAYLOR0 TAN P X â () SIN P X â () â TAN Q X â () SIN Q X â () â - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ââ ââ P 3 Q 3 - ----- P 5 Q 2 â P 3 â 4 Q 3 â ---------------------------- - x 2 â TRUNC 1 X 1 2 - X 2 â ââ ââ 3 X 4 , ââ ââ 4 x 3 9 2 -- - x 2 3 x 1 hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-29 Typing: DISTRIB((X 1)·(X 2)·(X 3)) giv es: EPSX0 Disregard small values EPSX0 has as a parameter an ex pres sion in X, and returns the same expression with the values less than EPS replaced by zeroes. Typing: EPSX0(0.001 X) gives, if EPS=0.01: 0 x or, if EPS=0.0001: . 001 x EXPLN Transform a trigonometric expression into complex exponentials EXPLN takes as an argument a trigonometric expression. It transforms the trigonometric function into exponentials and logarithms without linearizing it. EXPLN puts the calculat or into complex mode. Typing: EXPLN(SIN(X)) gives: EXP2POW Transform exp(n â ln(x)) as a power of x EXP2POW transforms an expression of the form exp(n à ln(x)), rewr iting it as a power of x. xx 2 () x 3 () â â 1 x 2 () x 3 () â â ix â () exp 1 ix â () exp ---------------------- - â 2 i â - -------------------------------------------------- - hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
14-30 Computer Alge bra System (CAS) Typing: EXP2POW(EXP(N · LN(X))) gives: FDISTRIB Distributivity FDISTRIB has an expression as argument. FDISTRIB enables you to appl y the distributivity of multiplication with respec t to addition all at once. Typing: FDISTRIB((X 1)·(X 2)·(X 3)) gives: x·x·x 3·x·x x·2·x 3·2·x x·x·1 3·x·1 x·2·1 3·2·1 After simplification (by pressing ENTER): x 3 6·x 2 11·x 6 LIN Linearize the expon entials LIN has as an argument an expression containing exponentials and trigonometric functions. LIN does not linearize trigonometric expressions (as does TLIN) but converts a trigonometric expression to ex ponentials and then linearizes the complex exponenti als. LIN puts the calculator into complex mode when dealing with trigonometric functions. Example 1 Typing: LIN((EXP(X) 1) 3 ) gives: 3·exp(x) 1 3·ex p(2·x) exp(3·x) Example 2 Typing: LIN(COS(X) 2 ) gives: x n hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-31 Example 3 Typing: LIN(SIN(X)) gives: LNCOLLECT Regroup the logarithms LNCOLLECT has as an argument an expression containing logarithms. LNCOLLECT regroups the terms in the logarithms. It is therefore preferable to use an expression that has already been factored (using FACTOR ). Typing: LNCOLLECT(LN(X 1) LN(X-1)) gives: ln((x 1)(x â 1)) POWEXPAND Transform a power POWEXPAND writes a power in the form of a product. Typing: POWEXPAND((X 1) 3 ) gives: (x 1) · (x 1) · (x 1) Th i s a ll o w s y o u to d o t h e development of (x 1) 3 in step by step, using DISTRIB several times on the preceding result. SINCOS Transform the complex expone ntials into sin and cos SINCOS takes as an argument an expression containing complex exponentials. SINCOS then rewrites this ex pression in terms of sin(x) and cos(x). 1 4 -- - 2 ix â â () â () exp â 1 2 -- - 1 4 -- - 2 ix â â () exp â i 2 -- - ix â exp â i 2 -- - ix â () â () exp â â hp40g .book Page 31 Friday, December 9, 2005 1:03 AM
14-32 Computer Alge bra System (CAS) Typing: SINCOS(EXP(i·X)) gives after turning on complex mode, if necessary: cos(x) i · sin(x) SIMPLIFY Simplify SIMPLIFY simplifies an expression automatically. Typing: gives, after simplification: 4 · cos(x) 2 â 2 XNUM Evaluation of reals XNUM has an expression as a parameter. XNUM puts the calculator into approxima te mode and returns the n umeric value of the expres sion. Typing: XNUM( â2) gives: 1.414 213 5 6 2 3 7 XQ Rational approximation XQ has a real numeric expression as a parameter. XQ puts the calculator into exact mode and gives a rational or real approximation of the expression. Typing: XQ(1.41421) gives: SIMPLIFY SIN 3 X â () SIN 7 X â () SIN 5 X â () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ââ ââ 66441 46981 -------------- - hp40g .book Page 32 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-33 Typing: XQ(1.414213562) gives: â 2 SOLV menu The SOLV menu contains functions that enable you to solve equations, linear systems, and differential equations. DESOLVE Solve differential equations DESOLVE enables you to solve differential equations. (For linear differential equations ha ving constant coefficients, it is better to use LDEC.) DESOLVE has two arguments: 1. the differential equation wher e is written as d1Y(X) (or the differenti al equation and the initial conditions sepa rated by AND ) , 2 . the unkno w n Y(X) . The mode must be set to real. Example 1 Solve: yâ y = cos(x) y (0)=c 0 yâ(0) = c 1 Typing: DESOLVE(d1d1Y(X) Y(X) = COS(X),Y(X) ) gives: cC0 and cC1 are integration constants (y(0) = cC0 yâ(0) = cC1). You can then assign values to the constants usin g the SUBST command. y ' YX () cC 0 x () cos â x 2 cC 1 â 2 -------------------------- x () sin â = hp40g .book Page 33 Friday, December 9, 2005 1:03 AM
14-34 Computer Alge bra System (CAS) To produce the solutions for y(0) = 1, type: which gives: Example 2 Solve: yâ y = cos(x) y(0) = 1 yâ(0) = 1 It is possible to solve for the constants from the outset. Typing: DESOLVE((d1d1Y(X) Y(X)=COS(X)) AND (Y(0)=1) AND (d1Y(0)=1),Y(X)) gives: ISOLATE The zeros of an expression ISOLATE returns the values that are the zeros of an expression or an equation. ISOLATE has two parameters: an expression or equation, and the name of the variable to isolate (i gnoring REALASSUME). Typing: ISOLATE(X 4 -1=3,X) gives in real mode: (x = â 2) OR (x = ââ 2) and in complex mode: (x = â 2 · i) OR (x = ââ 2) OR (x = â (â2 · i)) OR (x = â 2) S UBST Y X () ( c C0 COS X () â X2 c C 1 â 2 - - - - - - - - - - - - - - - - SIN X () cC0 , â 1 ) = = yx () 2 x () cos â x 2 cC1 â () x () sin â 2 ------------------------------------------------------------------------ --------- - = Yx () x cos 2 x 2 ----------- - x () sin â = hp40g .book Page 34 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-35 LDEC Linear diffe rential equations having constant coefficients LDEC enables you to directly solve linear differential equations having cons tant coefficients. The parameters are the second member and the characteristic equation. Solve: yâ â 6 · yâ 9 · y = x · e 3·x Typing: LDEC(X·EXP(3·X),X 2 â 6·X 9) gives: cC0 and cC1 are integration constants (y(0) = cC0 and yâ(0) = cC1). LINSOLVE Solve linear system LINSOLVE enables you to solve a system of linear equations. It is assumed that the variou s equations are of the form expression = 0. LINSOLVE has two arguments: the first members of the various equations separated by AND, and the names of the various variables separated by AND. Example 1 Typing: LINSOLVE(X Y 3 AND X-Y 1, X AND Y) gives: ( x = â 2) AND (y = â 1) or, in Step-by-step mode (CFG, etc.): L2=L2 â L1 ENTER - 18 x 6 â â () cC 06 xc C 1 â â x 3 () â â 6 ------------------------------------------------------------------------------- --------- - 3 x â () exp â ââ ââ 113 11 â 1 hp40g .book Page 35 Friday, December 9, 2005 1:03 AM
14-36 Computer Alge bra System (CAS) L1=2L1 L2 ENTER Reduction Result then press ENTER. The following is then written to the Equation Writer: (x = â 2) AND (y = â 1) Example 2 Type: (2·X Y Z=1)AND(X Y 2·Z=1)AND(X 2·Y Z=4) Then, invoke LINSOLVE and type the unknowns: X AND Y AND Z and press the ENTER key. The following result is produced if you are in Step-by-step mode (CFG, etc.): L2=2L2 â L1 ENTER L3=2L3 â L1 and so on until, finally: Reduction Result 11 3 02 â 2 â 20 4 02 â 2 â 211 1 â 112 1 â 121 4 â 211 1 â 013 1 â 121 4 â 80 0 4 08 0 2 0 â 00 8 â4 â hp40g .book Page 36 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-37 then press ENTER. The following is then written to the Equation Writer: SOLVE Solve equations SOLVE has as two parameters: (1) either an equality between two expressions, or a single expression (in which case = 0 is implied), and (2) the name of a variable. SOLVE solves the equation in R in real mode and in C in complex mode (ignoring REALASSUME). Typing: SOLVE(X 4 -1=3,X) gives, in real mode: (x = ââ 2) OR (x = â 2) or, in complex mode: (x = ââ 2) OR (x = â2) OR (x = â i · â 2) OR (x = i â 2) Solve systems SOLVE also enables you to solve a system of non-linear equations, if they are polynomials. (If they are not polynomials, use MSOLV in the HOME screen to get a numerical solution.) It is assumed that the variou s equations are of the form expression = 0. SOLVE has as arguments, the first members of the various equations separated by AND, and the names of the various variables separated by AN D. Typing: SOLVE(X 2 Y 2 -3 AND X-Y 2 1,X AND Y) gives: (x = 1) AND (y = ââ 2) OR (x = 1) AND (y = â 2) x 1 2 -- - â = ââ ââ AND y 5 2 -- - = ââ ââ AND z 1 2 -- - â = ââ ââ hp40g .book Page 37 Friday, December 9, 2005 1:03 AM
14-38 Computer Alge bra System (CAS) SOLVEVX Solve equations SOLVEVX has as a parameter either: (1) an equality between two expressions in the variable contained in VX, or (2) a single such expression (in which case = 0 is implied). SOLVEVX solves the equation. Example 1 Typing: SOLVEVX(X 4 -1=3) gives, in real mode: (x = ââ 2) OR (x = â 2) or, in complex mode, even if you have chosen X as real: (x = ââ 2) OR (x = â2) OR (x = â i · â 2) OR (x = i â 2) Example 2 Typing: SOLVEVX(2X 2 X) gives, in real mode: (x = â1/ 2) OR (x = 0) TRIG menu The TRIG menu contains functions that enable you to transform trigonometric expressions. ACOS2S Tra nsform the arccos into arcsin ACOS2S has as a trigonometric expression as an argument. ACOS2S transforms the expression by replacing arccos(x) with â arcsin(x). Ï 2 -- - hp40g .book Page 38 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-39 Typing: ACOS2S(ACOS(X) ASIN(X)) gives, when simplified: ASIN2C Transform the arcsin into arccos ASIN2C has as a trigonometric expression as an argument. ASIN2C transforms the express ion by re placing arcsin (x) with â arcco s(x) . Typing: ASIN2C(ACOS(X) ASIN(X)) gives, when simplified: ASIN2T Transform the arccos into arctan ASIN2T has a trigonometric expression as an argument. ASIN2T transforms the expression by replacing arcsin(x) with Typing: ASIN2T(ASIN(X)) gives: ATAN2S Transform the arctan into arcsin ATAN2S has a trigonometric expression as an argument. ATAN2S transforms the expression by replacing arctan(x) with . Ï 2 -- - Ï 2 ----- Ï 2 ----- arc x 1 x 2 â ----------------- - ââ ââ ââ tan x 1 x 2 â ----------------- - ââ ââ ââ atan arc x 1 x 2 ----------------- - ââ ââ ââ sin hp40g .book Page 39 Friday, December 9, 2005 1:03 AM
14-40 Computer Alge bra System (CAS) Typing: ATAN2S(ATAN(X)) gives: HALFTAN Transform in terms of tan(x/2) HALFTAN has a trigonometric expression as an argument. HALFTAN transforms sin(x), cos(x) and tan(x) in the expression, rewriting them in terms of tan(x/2). Typing: HALFTAN(SIN(X) 2 COS(X) 2 ) gives (SQ(X) = X 2 ): or, after simplification: 1 SINCOS Transform the complex expone ntials into sin and cos SINCOS takes an express ion containing complex exponentials as an argument. SINCOS then rewrites th is ex pression in terms of sin(x) and cos(x). Typing: SINCOS(EXP(i · X)) gives after turning on complex mode, if necessary: cos(x) i · sin(x) TAN2CS2 Transform tan(x) with sin(2x) and cos(2x) TAN2CS2 has a trigonometric expression as an argument. x x 2 1 ----------------- - ââ ââ ââ asin 2 x 2 -- - ââ ââ tan â SQ x 2 -- - ââ ââ tan ââ ââ 1 -------------------------------------- - ââ ââ ââ ââ ââ 2 1 SQ x 2 -- - ââ ââ tan ââ ââ â SQ x 2 -- - ââ ââ tan ââ ââ 1 -------------------------------------- - ââ ââ ââ ââ ââ 2 hp40g .book Page 40 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-41 TAN2CS2 transforms this expr ession by replacing tan(x) with . Typing: TAN2CS2(TAN(X)) gives: TAN2SC Replace tan(x) with sin(x)/cos(x) TAN2SC has a trigonometric expression as an argument. TAN2SC transforms this expr ession by replacing tan(x) with . Typing: TAN2SC(TAN(X)) gives: TAN2SC2 Transform tan(x) with sin(2x) and cos(2x) TAN2SC2 has a trigonometric expression as an argument. TAN2SC2 transforms this expression by replacing tan(x) with Typing: TAN2SC2(TAN(X)) gives: TCOLLECT Reconstruct the sine and the cosine of the same angle TCOLLECT has a trigonometric expression as an argument. 12 x â () cos â 2 x â () sin -------------------------------- 12 x â () cos â 2 x â () sin -------------------------------- x () sin x () cos --------------- - x () s i n x () cos --------------- - 2 x â () sin 12 x â () cos -------------------------------- - 2 x â () sin 12 x â () cos -------------------------------- - hp40g .book Page 41 Friday, December 9, 2005 1:03 AM
14-42 Computer Alge bra System (CAS) TCOLLECT linearizes this ex pression in terms of sin( n x ) and cos( n x ), then (in Real mode) reconstructs the sine and cosine of the same angle. Typing: TCOLLECT(SIN(X) COS(X)) gives: TEXPAND Develop transcen dental expressions TEXPAND has as an argument a transcendental expression (that is, an expression with trigonometric, exponential or logarithmic functions). TEXPAND develops this expression in terms of sin(x), cos(x), exp(x) or ln(x). Example 1 Typing: TEXPAND(EXP(X Y)) gives: ex p(x)·exp(y ) Example 2 Typing: TEXPAND(LN(X·Y)) gives: ln(y) ln(x) Example 3 Typing: TEXPAND(COS(X Y)) gives: cos(y)·cos(x)âsin(y)·sin(x) Example 4 Typing: TEXPAND(COS(3·X)) 2 x Ï 4 -- - â ââ ââ cos â hp40g .book Page 42 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-43 gives: 4·cos(x) 3 â3·cos(x) TLIN Linea rize a trigonomet ric expression TLIN has as an argument a trigonometric expression. TLIN linearizes this expression in terms of sin( n x ) and cos( n x ). Example 1 Typing: TLIN(COS(X) · COS(Y)) gives: Example 2 Typing: TLIN(COS(X) 3 ) gives: Example 3 Typing: TLIN(4·COS(X) 2 -2) gives: TRIG Simplify using sin(x) 2 cos(x) 2 = 1 TRIG has as an argument a trigonometric expression. TRIG simplifies this expression using the identity sin(x) 2 c o s ( x ) 2 = 1. 1 2 -- - xy â () cos â 1 2 -- - xy () cos â 1 4 -- - 3 x â () cos â 3 4 -- - x () cos â 22 x â () cos â hp40g .book Page 43 Friday, December 9, 2005 1:03 AM
14-44 Computer Alge bra System (CAS) Typing: TRIG(SIN(X) 2 COS(X) 2 1) gives: 2 TRIGCOS Simplify using the cosines TRIGCOS has as an argument a trigonometric expression. TRIGCOS simplifies this expression, using the identity sin(x) 2 cos(x) 2 = 1 to rewrite it in terms of cosines. Typing: TRIGCOS(SIN(X) 4 COS(X) 2 1) gives: TRIGSIN Simplify using the sines TRIGSIN has as an argument a trigonometric expression. TRIGSIN simpl ifies this ex pression, using the identity sin(x) 2 c o s ( x ) 2 = 1 to rewrite it in terms of sines. Typing: TRIGSIN(SIN(X) 4 COS(X) 2 1) gives: TRIGTAN Simplify using the tan gents TRIGTAN has as an argument a trigonometric expression. TRIGTAN simplifies this expression, using the identity sin(x) 2 c o s ( x ) 2 = 1 to rewrite it in terms of tangents. Typing: TRIGTAN(SIN(X) 4 COS(X) 2 1) gives: x () 4 cos x () 2 cos 2 â x () 4 sin x () 2 sin 2 â 2 x () 4 tan â 3 x () 2 tan â 2 x () 4 tan 2 x () 2 tan 1 â ------------------------------------------------------------------ - hp40g .book Page 44 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-45 CAS Functions on the MATH menu When you are in the Equation Writer and press , a menu of additional CAS functions available to you is displayed. Many of the functions in this menu match the functions available from the soft-key men us in the Equation Writer; but there are other functions that are only available from this menu. This section desc ribes CAS functions that are available when you press in the Equation Writer (grouped by main menu name). Algebra menu All the functions on this menu are also available on the menu in the Equation Writer. See âALGB menuâ on page 14-10 for a description of these functions. Complex menu i I nserts i (= ). ABS Determines the absolute value of the argument. Example Typing ABS(7 4i) yields , as does ABS(7 â 4i). ARG See âARGâ on page 13-7. CONJ See âCONJâ on page 13-7. DROITE DROITE returns the equation of the line through the Cartesian points, z 1 , z 2 . It takes two complex numbers, z 1 and z 2 , as arguments. Example Typing: DROI TE((1, 2) , (0, 1)) or: DROI TE(1 2·i, i) 1 â 65 hp40g .book Page 45 Friday, December 9, 2005 1:03 AM
14-46 Computer Alge bra System (CAS) returns: Y = X â1 2 Pressing simplifies this to: Y = X 1 IM See âIMâ on pag e 13-7. â Specifies the negation of the argument. RE See âREâ on page 13-8. SIGN Determines the quotient of the argument divided by its modulus. Example Typing SIGN(7 4i) or SIGN(7,4) yields . Constant menu e, i, Ï See âConstantsâ on page 13-8. â Enters the sign for infinity. Diff & Int menu All the functions on this menu are also available on the menu in the Equation Writer. See âDIFF menuâ on page 14-16 for a description of these functions. Hyperb menu All the functions on this menu are described i n âHyperbolic trigonometryâ on page 13-9. Integer menu Note that many integer functions also work with Gaussian integers ( a b i where a and b are integers). 74 i 65 ------------- - hp40g .book Page 46 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-47 DIVIS Gives the divisors of an integer. Example Typing: DIVIS(12) gives: 12 OR 6 OR 3 OR 4 OR 2 OR 1 Note: DIVIS(0) returns 0 OR 1. EULER Returns the Euler index of a whole number. The Euler index of n is the number of whole numbers less than n that are prime with n . Example Typing: EUL E R (2 1 ) gives: 12 Explanation: {2,4,5,7,8,10,11,13,1 5,16,17,19} is the set of who le numbers le ss than 21 and prim e with 21. There are 12 members of the set, so the Euler index is12. FACTOR Decomposes an integer into its prime factors. Example Typing: FA C T O R ( 9 0 ) gives: 2·3 2 ·5 GCD Returns the greatest common divisor of two integers. Example Typing: GCD(18, 15 ) gives: 3 hp40g .book Page 47 Friday, December 9, 2005 1:03 AM
14-48 Computer Alge bra System (CAS) In step-by-step mode, there ar e a number of intermediate results: 18 mod 15 = 3 15 mod 3 = 0 Res ul t : 3 Pressing or then causes 3 to be written to the Equation Writer. Note that the last non-zero remainder in the sequence of remainders shown in the intermediate steps is the GCD. IDIV2 Returns the quotient and the remainder of the Euclidean division between two integers. Example Typing: I D IV 2 ( 1 48, 5) gives: 29 A N D 3 In step-by-step mode, the calculator shows the division process in longhand. IEGCD Returns the value of Bézoutâs I dentity for two integers. For example, IEGCD(A,B) returns U AND V = D, with U, V, D such that AU BV=D and D=GC D(A,B). Example Typing: I EGC D (48, 3 0 ) gives 2 AND â3 = 6 In other words: 2·48 (â3)·30 = 6 an d GCD(48,30) = 6. In step-by-step mode, we get: [z ,u ,v]:z=u*48 v*30 hp40g .book Page 48 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-49 [48, 1 ,0 ] [30, 0,1]*â1 [18,1,â1]*â1 [12 ,â1 ,2]*â1 [6,2 ,â3]*â2 Re sult: [6,2 ,â3] Pressing or then causes 2 AND â3 = 6 to be written to the Equation Writer. The intermediate steps shown are the combination of lines. For example, to get line L( n 2), take L( n ) â q *L( n 1) where q is the Euclidean quotient of the integers at the beginning of the vector, these integers being the sequence of remainders). IQUOT Returns the integer quotient of the Euclidean division of two integers. Example Typing: IQUO T(14 8, 5 ) gives: 29 In step-by-s tep mode, the division is carried out as if in longhand Pressing or then causes 2 9 to be written to the Equation Writer. IREMAINDER Returns the integer remainder from the Euclidean division of two integers. Example 1 Typing: IREMAINDER(148 , 5) gives: 3 hp40g .book Page 49 Friday, December 9, 2005 1:03 AM
14-50 Computer Alge bra System (CAS) IREMAINDER works with integers and with Gaussian integers. This is what distingui shes it from MOD. Example 2 Typing: IREMAINDER(2 3·i, 1 i) gives: i ISPRIME? Returns a value indicating whether an integer is a prime number. ISPRIME?( n ) returns 1 (TRUE) if n is a prime or pseudo-prime, and 0 (FALSE) if n is not prime. Definition: For numbers less than 10 14 , pseudo-prime and prime mean the same thing. Fo r numbers greater than 10 14 , a pseudo-prime is a number with a large probability of being prime. Example 1 Typing: ISPRIME?(13) gives: 1. Example 2 Typing: ISPRIME?(14) gives: 0. LCM Returns the least common multiple of two integers. Example Typing: L CM(18 , 15) gives: 90 MOD See âMODâ on page 13 -15. hp40g .book Page 50 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-51 NEXTPRIME NEXTPRI ME( n ) returns the smallest prime or pseudo-prime greater than n . Example Typing: NEXTPRIME( 7 5) gives: 79 PREVPRIME PREVPRIME( n ) returns the greatest prime or pseudo-prime less than n . Example Typing: PRE VP RI ME (7 5) gives: 73 Modular menu All the examples of this section assume that p =13; that is, you have entere d MODSTO(13) or STORE(13,MODULO), or have specified 13 for Modulo in CAS MODES screen (as explained on page 15-16). ADDTMOD Performs an addition in Z/pZ. Example 1 Typing: ADDTMOD( 2 , 18) gives: â6 ADDTMOD can also perform addition in Z/pZ[X]. Example 2 Typing: ADD TMOD(11X 5, 8X 6) gives: 6 x 2 â hp40g .book Page 51 Friday, December 9, 2005 1:03 AM
14-52 Computer Alge bra System (CAS) DIVMOD Division in Z/pZ or Z/pZ[X]. Example 1 In Z/pZ, the arguments are two integers: A and B. When B has an inverse in Z/pZ, the result is A/B simplified as Z/pZ. Typing: DIVM OD(5 , 3) gives: 6 Example 2 In Z/pZ[X], the arguments are two polynomials: A[X] and B[X]. The result is a rational fraction A[X]/B[X] simplified as Z/pZ[X]. Typing: DIV MOD( 2X 2 5, 5X 2 2X â3) gives: EXPANDMOD Expand and simplify expre ssions in Z/pZ or Z/pZ[X]. Example 1 In Z/pZ, the argument is an integer expression. Typing: EXP ANDMOD( 2 · 3 5 · 4) gives: 0 Example 2 In Z/pZ[X], the argument is a polynomial. Typing: EXP ANDMOD ((2X 2 12)·(5X â 4)) gives: 4 x 5 3 x 3 -------------- - â 3 x 3 â 5 x 2 â â5 x â 4 â () â hp40g .book Page 52 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-53 FACTORMOD Factors a polynomial i n Z/pZ[X], providing that p ⤠97, p is prime and the order of the multiple factors is less than the modu lo. Example Typing: FA C T O R M O D ( â ( 3 X 3 â 5X 2 5X â 4)) gives: GCDMOD Calculates the GCD of the two polynomials in Z/pZ[X]. Example Typing: GCDMOD(2X 2 5, 5X 2 2X â 3) gives: INVMOD Calculates the inverse of an integer in Z/pZ. Example Typing: INVMOD(5) gives: â5 since 5 · â5 = â25 = 1 (mod 13). MODSTO Sets the value of the M ODULO variabl e p . Example Typing: MODS T O(11) sets the value of p to 11. 3 x 5 â () x 2 6 () â () â 6 x 1 â () â hp40g .book Page 53 Friday, December 9, 2005 1:03 AM
14-54 Computer Alge bra System (CAS) MULTMOD Performs a multiplication in Z/pZ or in Z/pZ[ X]. Example 1 Typing: MUL TMO D(11, 8) gives: â3 Example 2 Typing: MUL TMOD(11X 5, 8X 6) gives: POWMOD Calculates A to the power of N in Z/pZ[X], and A(X) to the power of N in Z/pZ[X]. Example 1 If p = 13, typing: POWMO D (1 1 , 1 95) gives: 5 In effect: 11 12 = 1 mod 13, so 11 195 = 11 16Ã12 3 = 5 mod 13. Example 2 Typing: POWMO D (2 X 1 , 5) gives: since 32 = 6 (mod 13), 80 = 2 (mod 13), 40 = 1 (mod 13), 10 = â3 (mod 13). 3 x 2 2 x â4 â () â 6 x 5 2 x 4 2 x 3 x 2 3 x â1 hp40g .book Page 54 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-55 SUBTMOD Performs a subtraction in Z/pZ or Z/pZ[X]. Example 1 Typing: SU BTM O D ( 29 , 8 ) gives: â5 Example 2 Typing: S UB TMOD(11X 5, 8X 6) gives: Polynomial menu EGCD Returns Bézoutâs Identity, the Extended Greatest Common Divisor (EGCD). EGCD(A(X), B(X)) returns U(X) AND V(X) = D(X), with D, U, V such that D(X) = U(X)·A(X) V(X)·B(X). Example 1 Typing: EG C D ( X 2 2 · X 1, X 2 â 1) gives: AND Example 2 Typing: EG C D ( X 2 2 · X 1, X 3 1) gives: AND 3 x 1 â 1 â1 â2 x 2 = x 2 â () â1 3 x 3 = hp40g .book Page 55 Friday, December 9, 2005 1:03 AM
14-56 Computer Alge bra System (CAS) FACTOR Factors a polynomial. Example 1 Typing: F ACT OR(X 2 â 2) gives: Example 2 Typing: F ACT OR(X 2 2·X 1) gives: GCD Returns the GCD (Greatest Common Divisor) of two polynomials. Example Typing: GCD(X 2 2·X 1, X 2 â 1) gives: HERMITE Returns the Hermi te polynomial of degree n (where n is a whole number). This is a polynomial of the following type: Example Typing: HERMITE(6) gives: x 2 () x 2 â () â x 1 () 2 x 1 H n x () 1 â () n e x 2 2 ---- - d n dx n ------- - e x 2 2 ---- - â â = 64 x 6 480 x 4 â7 2 0 x 2 120 â hp40g .book Page 56 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-57 LCM Returns the LCM (Least Common Multiple) of two polynomials. Example Typing: LC M ( X 2 2·X 1, X 2 â 1) gives: LEGENDRE Returns the polynomial L n , a non-null solution of the differential equation: where n is a whole number. Example Typing: LEG ENDRE(4) gives: PARTFRAC Returns the partial fraction decomposition of a rational fraction. Example Typing: gives, in real and direct mode: and gives, in complex mode: x 2 2 x 1 () x 1 â () â x 2 1 â () y â³ â 2 â xy â² nn 1 () y â â â â 0 = 35 x 4 â 30 â x 2 â 3 8 --------------------------------------------- - A RTFRAC X 5 2 X 3 â1 X 4 2 X 3 â2 X 2 2 X â1 ---------------------------------------------------------- - - â â â x 2 x 3 â 2 x 2 2 ----------------- 1 â 2 x 2 â -------------- - x 2 13 i â â 4 ----------------- - xi ----------------- - 1 â 2 ----- - x 1 â ---------- - 13 i â 4 ----------------- - xi â ----------------- - hp40g .book Page 57 Friday, December 9, 2005 1:03 AM
14-58 Computer Alge bra System (CAS) PROPFRAC PROPFRAC rewrites a rational fr action so as to bring out its whole number part. PROPFRAC(A(X)/ B(X)) writes th e rational fraction A(X)/ B(X) in the form: where Râ(X) = 0, or 0 ⤠deg (R(X) < deg (B(X). Example Typing: gives: PTAYL PTAYL rewrites a polynomial P(X) in order of its powers of X â a. Example Typing: PT A Y L( X 2 2·X 1, 2) produces the polynomial Q(X), namely: Note that P(X) = Q(Xâ2). QUOT QUOT returns the quotient of two polynomials, A(X) and B(X), divided in decreasing order by exponent. Example Typing: QUO T (X 2 2·X 1, X) gives: Q X () RX () BX () ----------- - ROPFRAC 5 X 3 () X 1 â () â X 2 ------------------------------------------ - â â â â 5 x 12 â 21 x 2 ----------- - x 2 6 x 9 x 2 hp40g .book Page 58 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-59 Note that in step-by-step mode, synthetic division is shown, with each polynomial represented as the list of its coefficients in descending order of power. REMAINDER Returns the remainder from the division of the two polynomials, A(X) and B(X), div ided in decreasing order by exponent. Example Typing: REMAINDER(X 3 â 1, X 2 â 1) gives: Note that in step-by-step mode, synthetic division is shown, with each polynomial represented as the list of its coefficients in descending order of power. TCHEBYCHEFF For n > 0, TCHEBYCHEFF returns the polynomial T n such that: Tn (x) = cos( n ·ar ccos( x)) For n ⥠0, we have: For n ⥠0 we also have: For n ⥠1, we have: If n < 0, TCHEBYCHEFF returns the 2nd-species Tchebycheff polynomial: x 1 â T n x () C 2k n x 2 1 â () k x n 2 k â k 0 = n 2 -- - [] â = 1 x 2 â () T â³ n x () xT â² n x () â n 2 T n x () 0 = T n 1 x () 2 xT n x () T n 1 â x () â = T n x () n arccos x () â () sin arccos x () () sin ------------------------------------------ - = hp40g .book Page 59 Friday, December 9, 2005 1:03 AM
14-60 Computer Alge bra System (CAS) Example 1 Typing: T CHEB Y CHEFF(4) gives: Example 2 Typing: T CHEB Y CHEFF(â4) gives: Real menu CEILING See âCEILINGâ on page 13-14. FLOOR See âFLOORâ on page 13-14. FRAC See âFRACâ on page 13-14. INT Se e âINTâ on page 13-15. MAX See âMAXâ on page 13-15. MIN See âMINâ on page 13-15. Rewrite menu All the functions on this menu are also available on the menu in the Equation Writer. See âREWRI menuâ on page 14-28 for a description of th ese functions. Solve menu All the functions on this menu are also available on the menu in the Equation Writer. See âSOLV menuâ on page 14-33 for a description of these functions. 8 x 4 8 x 2 â1 8 x 3 4 x â hp40g .book Page 60 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-61 Tests menu ASSUME Use this function to make a hypothesis about a specified argument or variable. Example Typing: ASSUM E( X > Y) sets an assumption that X is greater than Y. In fact, the calculator works only with large not strict relations, and thus ASSUME(X>Y) will actually set the assumption that X ⥠Y. (A message will indicate this when you enter an ASSUME function.) Note that X ⥠Y will be stored in the REALASSUME variable. To see the variable, press , select REALASSUME and press . UNASSUME Use this function to cancel all previously specified assumptions about a particul ar argument or variable. Example Typing: UN ASSUM E (X ) cancels any assumptions made about X. It returns X in the Equation Writer. To see the assumptions, press , select REALASSUME and press . >, ⥠, <, â¤, ==, â See âTest functionsâ on page 13-19. AND See âANDâ on page 13-19. OR See âORâ on page 13-19 . NOT See âNOTâ on page 13-19. IFTE See âIFTEâ on page 13-19. Trig menu All the functions on this menu are also available on the menu in the Equation Writer. See âTRIG menuâ on page 14-38 for a description of these functions. hp40g .book Page 61 Friday, December 9, 2005 1:03 AM
14-62 Computer Alge bra System (CAS) CAS Functions on the CMDS menu When you are in the Equation Writer and press , a menu of the full set of CAS functions available to you is displayed. Many of the functions in this menu match the functions available from the soft-key menus in the Equation Writer; but there are other functions that are only available from this menu . This section describes the additional CAS functions that a re available when you press in the Equation Writer. (See the previous section for other CAS commands.) ABCUV This command applies the Bézo ut identity like EGCD, but the arguments are three polynomials A, B and C. (C must be a multiple of GCD(A,B).) ABCUV(A[X], B[X], C[X]) returns U[X] AND V[ X], where U and V satisfy: C[X] = U[X] · A[X] V[X] · B[X] Example 1 Typing: ABCUV(X 2 2 · X 1, X 2 â 1, X 1) gives: CHINREM Chinese Remainders: CHINREM has two sets of two polynomials as arguments, each separated by AND. CHINREM((A(X) AND R(X), B(X) AND Q(X)) returns an AND with two polynomials as components: P(X) and S(X). The polynomials P(X) and S(X) satisfy the following relations when GCD(R(X),Q(X)) = 1: S(X) = R(X) · Q(X) , P(X) = A(X) (modR(X)) and P(X) = B(X) (modQ(X)). There is always a solution, P(X), if R(X) and Q(X) are mutually primes and all solu tions are congruent modulo S(X) = R(X) · Q(X). 1 2 - - - AND 1 2 - - - â hp40g .book Page 62 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-63 Example Find the solutions P(X) of: P(X) = X (mod X 2 1) P(X) = X â 1 (mod X 2 â 1) Typing: CHINREM((X) AND (X 2 1) , (X â 1) AND (X 2 â 1)) gives: That is: CYCLOTOMIC Returns the cyclotomic polynomial of order n . This is a polynomial having the n th primitive roots of unity as zeros. CYCLOTOMIC has an integer n as its argument. Example 1 When n = 4 the fourth roots of unity are {1, i, â1, âi}. Among them, the primitive roots are: {i, âi}. Therefore, the cyclotomic polynomial of order 4 is (X â i).(X i) = X 2 1. Example 2 Typing: CY CL O T OMIC(20) gives: EXP2HYP EXP2 HYP has an expression enclosing exponenti als as an argument. It transforms that expression with the relation: exp(a) = sinh(a) cosh(a). x 2 2 x â1 2 ------------------------- - â AND x 4 1 â 2 ------------- - P X [] x 2 2 x â1 2 ------------------------- - mod x 4 1 â 2 ------------- - â â â â â â = x 8 x 6 â x 4 x 2 â1 hp40g .book Page 63 Friday, December 9, 2005 1:03 AM
14-64 Computer Alge bra System (CAS) Example 1 Typing: EXP 2HY P (EXP (A)) gives: sinh( a) co sh(a ) Example 2 Typing: EXP 2HY P( EXP (â A) EXP(A) ) gives: 2 · cosh( a) GAMMA Returns the values of the Î function at a given point. The Î function is defined as: We have: Î (1) = 1 Î ( x 1) = x · Î ( x ) Example 1 Typing: GA M M A ( 5 ) gives: 24 Example 2 Typing: GAMMA(1/2 ) gives: IABCUV IABCUV(A,B,C) returns U AND V such that AU BV = C where A, B and C are whole numbers. C must be a multiple of GCD( A,B) to obtain a solution. Î x () e t â t x 1 â t d 0 â â« = Ï hp40g .book Page 64 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-65 Example Typing: I AB CU V (48, 3 0, 1 8 ) gives: 6 AND â9 IBERNOULLI Returns the n th Bernoulliâs number B( n ) where: Example Typing: IBERNOULLI(6) gives: ICHINREM Chinese Remainders: ICHINREM(A AND P,B AND Q) returns C AND R, where A, B, P and Q are whole numbers. The numbers X = C k · R where k is an integer are such that X = A mod P and X = B mod Q . A solution X always exists when P and Q are mutually prime, (GCD( P ,Q ) = 1) and in this case, all the solutions are congruent modulo R = P · Q . Example Typing: ICHINREM(7 AND 10, 12 AND 15) gives: â3 AND 30 ILAP LAP is the Laplace transform of a given expression. The expression is the value of a function of the variable stored in VX. t e t 1 â ------------ - Bn () n ! ----------- t n n 0 = â â = 1 42 ---------- - hp40g .book Page 65 Friday, December 9, 2005 1:03 AM
14-66 Computer Alge bra System (CAS) ILAP is the inverse Laplace transform of a given expression. Again, the expression is the value of a function of the variable stored in VX. Laplace transform (LAP ) and inverse Laplace transfo rm (ILAP) are useful in solving linear differential equations with constant coefficients, for example: The following relations hold: where c is a closed contour enclosing the poles of f . The following property is used: The solution, y , of: is then: Example To solve: c type: LAP(X · EXP(3 · X)) The result is: y â³ py â² â qy â fx () = y 0 () a y â² 0 () b == LAP(y)(x) e x â t â yt () t d 0 â â« = ILAP(f)(x) 1 2 i Ï ------- - e zx fz () z d c â« â = L AP y â² () x () y 0 () â x LAP y () x () â = y â³ py â² â qy â fx () , y 0 () a , y â² 0 () b == = ILAP LAP fx () () xp () ab â x 2 px q ------------------------------------------------------------------ - ââ ââ y â³ 6 â y â² â 9 y â xe 3 x â , y 0 () a , y â² 0 () b == = 1 x 2 6 x â9 ------------------------- - hp40g .book Page 66 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-67 Typing: gives: LAP See ILAP above. PA2B2 Decomposes a prime integer p congruent to 1 modulo 4, as follows: p = a 2 b 2 . The calculator gives the result as a b · i. Example 1 Typing: P A2B2(17) gives: 4 i that is, 17 = 4 2 1 2 Example 2 Typing: P A2B2(2 9) gives: 5 2 · i that is, 29 = 5 2 2 2 PSI Returns the value of the nth derivative of the Digamma function at a . The Digamma function is the derivative of ln( Î (x)). Example Typing: P SI(3, 1) I LAP 1 X 2 6 X â9 --------------------------- - X 6 â () ab â X 2 6 X â9 ------------------------------------------------------------------ - â â â â â â â â â â x 3 6 ---- - 3 ab â () â xa â ââ ââ e 3 x â hp40g .book Page 67 Friday, December 9, 2005 1:03 AM
14-68 Computer Alge bra System (CAS) gives: Psi Returns the value of the Digamma function at a . The Digamma function is defined as the derivative of ln( Î (x)), so we have PSI( a ,0) = Psi( a ). Example Typing: Ps i ( 3 ) and pressing gives: . 922 7 84335 098 REORDER Reorders the input expression following the order of variables given in the second argument. Example Typing: REORDER(X 2 2 · X · A A 2 Z 2 â X · Z , A AND X AND Z) gives: SEVAL SEVAL simplifies the given expression, operating on all but the top-level operator of the expression. Example Typing: SEV AL(SIN(3 · X -â X) SIN(X X)) gives: SIGMA Returns the discrete antiderivative of the input function, that is, the function G, that satisfie s the relation G( x 1) â G( x ) = f( x). It has two arguments: the first is a function f( x ) of a variable x given as the second argument. 5 4 -- - â 1 6 -- - Ï 2 â A 2 2 XA â â X 2 Z â XZ 2 â 2 x â () sin 2 x â () sin hp40g .book Page 68 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-69 Example Typing: SIGMA(X · X!, X) gives: X! because (X 1)! â X! = X · X!. SIGMAVX Returns the discrete antideriva tive of the input function, that is a function, G, that satisfies the relation: G( x 1) â G( x ) = f( x ). SIGMAVX has as its argument a function f of the current variable VX. Example Typing: SIGM A VX( X 2 ) gives: because: STURMAB Returns the number of zeros of P in [ a , b [ wher e P is a polynomial and a and b are numbers. Example 1 Typing: ST U R M A B ( X 2 · (X 3 2), â2 , 0) gives: 1 Example 2 Typing: ST U R M A B ( X 2 · (X 3 2), â2 , 1) gives: 3 2 x 3 3 x 2 â x 6 ------------------------------- - 2 x 1 () 3 3 x 1 () 2 â x 12 x 3 â3 x 2 x â 6 x 2 = hp40g .book Page 69 Friday, December 9, 2005 1:03 AM
14-70 Computer Alge bra System (CAS) TSIMP Simplifies a given expression by rewriting it as a function of complex exponentials, and then reducing the number of variables (enabling complex mode in the process). Example Typing: gives: VER Returns the version number of your CAS. Example Typing: VER might give: 4.200 5 0 219 This particular result means that you have a version 4 CAS, dated 19 February 2005. Note that this is not the same as VERSION (which returns the version of the calculatorâs ROM). T SIMP SIN 3 X () SIN 7 X () SIN 5 X () -------------------------------------------------- - â â â â EXP ix â () 4 1 EXP ix â () 2 ------------------------------------- - hp40g .book Page 70 Friday, December 9, 2005 1:03 AM
Equation Writer 15-1 15 Equation W riter Using CAS in the Equation Writer The Equation Writer enables yo u to type expre ssions that you want to simplify, factor, differentiate, integrate, and so on, and then work them through as if on paper. The key on the HOME screen menu bar opens the Equation Writer, and the key closes it. This chapter explains how to write an expression in the Equation Wri ter using the menus and the keyboard, how to select a subexpression, how to apply CAS functions to an expression or subexpression and how to store values in the Equation Writer variables. Chapter 14 explains all the symbolic calculation functio ns contained in the various menus, and chapter 16 provides numerous examples showing the use of the Equation Writer. The Equation Writer menu bar The Equation Writer has a number of soft menu keys. TOOL menu Unlike the other soft menu keys, the menu does not give access to CAS commands. Instead, it provides access to a number of utilities to help you work with the Equation Writer. The following table explains each of the utilities on the menu. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
15-2 Equation Writer ALGB menu The menu contains functions that enable you to perform algebra, such as factoring, expansion, simplification, substitution, and so on. DIFF menu The menu contains functions that enable you to perform differential calculus, such as differentiation, integration, series expansion, limits, and so on. Cursor mode Enables you to go into cursor mode, for quicker selection o f expression s and subexpressions (see page 15- 10). Edit expr. Enables you to edit the highlighted expression on the edit line, just as you do in the HOME screen (see page 15- 11). Change font Enables you to choose to type using large or small characters (see page 15-10). Cut Copies the selection to the clipboard and erases the selection from Equation Writer. Copy Copies the selection to the clipboard. Paste Copies the contents of the clipboard to the location of the cursor. The clipboard contents will be either whatever Copy or Cut selected the last time you used these commands, or the highlighted level when you selected COPY in CAS history. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Equation Writer 15-3 REWRI menu The menu contains functions that enable you to rewrite an expression in another form. SOLV menu The menu contains functions that enable you to solve equation s, linear systems, and diffe rential equations. TRIG menu The menu contains functions that enable you to transform trigonometric expressions. NOTE You can get online help about any CAS function by pressing 2 and selecting that function (as explained in âOnline Help â on page 14-8). Configuration menus You can directly see, and change, CAS modes while working with the Equation Writer. The first line in e ach of the Equation Writer menus (except ) indicates the current CAS mode settings. In the example at the right, the first line of the menu reads: CFG R= X S CFG stands for âconfigurationâ, and the symbols to the right of it indicate various mode settings. ⢠The f irst s y mbol, R , indicates that y ou are in r eal mode. If y ou wer e in complex mode , this symbol wou l d be C . ⢠The s econd sy mbol , = , indicates that y ou ar e in ex act mode. If y ou were in appr ox imate mode, this s ymbol wou l d be ~ . ⢠The thir d sy mbol , X in the abov e e xam ple, indi cates the cur r ent independent v ari able. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
15-4 Equation Writer ⢠The fo u r th sym bo l, S , in the abov e e xample , indicates that y ou ar e in step-b y-step mode . If you w ere not in step-b y-step mode, this s y mbol wo uld be D (whi ch stands for Direct ). The first line of an Equation Writer me nu only indica tes some of the mode settings. To see more settings, highlight the first line and press . The configuration menu appears. The header of the configuration menu has additional symbols. In the ex ample above, the upward- pointing arrow indicates that polynomi als are displayed with increasing powers, and the 13 indicates the modulo value. You can change CAS mode settings directly from the configuration menu. Just press until the setting you want to choose is highlighted and then press . Note that the configuration menu includes only those options that are not currently selected. For example, if Rigorous is a current setting, its opposite, Sloppy , will appear on the menu. If you choose Sloppy , then Rigorous appears in its place. To return your CAS modes to their default settings, select Default cfg and press . To close the configuration menu, select Quit config and press . NOTE You can also change CAS mode settings from CAS MODES screen. See âCAS mo desâ on page 14-5 for information. Online Help language One CAS setting that only appears on the configuration menu is the setting that determines the language of the online help. Two languages are available : English and French. To choose French, select Francais and press . To return to English, select English and press . hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Equation Writer 15-5 Entering expressions and subexpressions You type expressions in the Equation Writer is much the same way as you type them in the HOME screen, using the keys to directly enter numbers, letters and operators, and menus to select various functions and commands. When you type an expression in the Equation Writer, th e operator that you are typing always carrie s over to the adjacent or selected express ion. You donât have to worry about where the parentheses go: they are automatically entered for you. It will help you understand ho w the Equation Writer works if you view a mathematical expression as a tree, with the four arrow keys enabling you to move through the tree: ⢠the and k ey s enable yo u to mov e fr om one branc h to another ⢠the and k ey s enable y ou to mov e up and dow n a particular tr ee ⢠the and k ey comb inations enable y ou to mak e multiple s electi ons. How do I select? There are two ways of going into selection mode: ⢠Pres sing tak es you int o selection mode and selects the element ad jacent to the cursor . F or ex ample: 1 2 3 4 selects 4. Pres sing it again select s the entir e tr ee: 1 2 3 4. ⢠Pres sing tak es you int o selectio n mode and selects the br anch adj acent to the cur sor . Pre ssing it augments the s electio n, adding the ne xt branc h to the ri ght . F or ex ample: 1 2 3 4 selects 3 4. Pressing it again selects 2 3 4, and again selects 1 2 3 4. NOTE: If you are typing a templated function with multiple arguments (such as â , â« ,SUBST, etc.), pressing or enables you to move from one argument to another. In hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
15-6 Equation Writer this case, you have to press to select elements in the expression. The following illustration shows how an expression can be viewed as a tree in the Eq uation W riter. It illustrates a tree view of the expression: Suppose that the cursor is positioned to the right of 3: ⢠If you pr ess once, the 3 component is selected. ⢠If y ou press again , the selecti on mov es up the tree , with x 3 now selected. ⢠If y ou press again , the selecti on mov es up the tree , and now the entir e expr essi on is selected . ⢠If you h ad p ressed in stea d of when the cursor was positioned to the right of 3, the leaves of the branch get selected (that is, x 3). ⢠If y ou press again , the selecti on mov es up the tree , and now the entir e expr essi on is selected . ⢠If yo u now pr ess , ju st the numer ator is selected . ⢠If you no w pre ss again, the top-most branch select ed (that is, (5 x 3). ⢠Conti nue p ressing t o sel ect e ach to p-m ost le af in turn (5 x and then 5 ) . 5 x 3 () x 1 â () â x 3 ---------------------------------------- - ÷ à â à # N ! N î N ! hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Equation Writer 15-7 ⢠Pres s again an d again to progre ssiv ely select mor e of the top-most br anch , and then low er branc hes (5 x , 5x 3, and then the entire numerator and finall y the entir e expr essi on). More Examples Example1 If you enter: 2 X à 3â X and press the entire expres sion is select ed. Pressing evaluates what is selected (that is, the entire expression) and returns: 2X 2 If you enter the same expression as earlier but press after the first X, as in: 2 X à 3 â X the 2 X is selected an d the next operation, multiplication, is applied to to it. The expression becomes: (2 X) à 3 â X Pressing selects the entire expres sion, and pressing evaluates it, resulting in: 2X 6 Now enter the same expre ssion, but press after the 3, as in: 2 X à 3 â X Note that selects the expression so far entered (2 X) thus making the next operation apply to the entire selection, not just the last entered term. The key selects just the last entry (3 ) and makes the next operation hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
15-8 Equation Writer (â X) apply to it. As a result, the entered expression is interpreted, and displayed, as (2 X)(3 â X). Select the entire expression by pressing and evaluate it by pressing . The result is: â(X 2 âXâ6) Example2 To enter X 2 â3X 1, press: 2 â 3 1 If, instead, you had to enter âx 2 â3X 1, you would need to press: (â) 2 â 3 1 Note that you press twice to ensure that the exponent applies to âX and not just to X. Example 3 Suppose you want to enter: Each fraction can be viewed as a separate branch on the equation tree. In the Equation Writer type the first branch: 1 ÷ 2 and then select this branch by pressing . Now type and enter the second branch: 1 ÷ 3 Select the second branch by pressing . Now type and enter the third branch: 1 ÷ 4 Likewise, select the third branch by pressing , type and then the fourth branch: 1 ÷ 5 1 2 -- - 1 3 -- - 1 4 -- - 1 5 -- - hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Equation Writer 15-9 Select the fifth branch by pressing . At this point, the desired expression is in the Equation Writer, as shown at t he right. Suppose that you want to select the second and third branches, that is: . Firs t press . This selects , the second term. Now press . This key combination enables you to select two contiguous branches, the one already selected a nd the one to the right of it. If you wa nt, you ca n evaluate the selected part by pressing . The result is shown at the right. Suppose now you want to perform the partial calculation: Because the two terms in this partial calculation are not contiguous (that is, side by side), you must first perform a permutation so that they are side by side.T o do this, press: This exchanges the selected element with its neighbour to the left. The result is shown at the right. Now press: to select just the branches you are interested in: 1 3 -- - 1 4 -- - 1 3 -- - 1 2 -- - 1 5 -- - hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
15-10 Equation Writer Pressing produces the result of the partial calculation. Summing up Pressing enables you to select the current element and its neighbour to the right. enables you to exchange the selected element with its neighbour to the left. The selected element remains selected after you move it. Cursor mode In cursor mode you can select a large expression quickly. To select cursor mode, press: Cursor mode As you press the arrow key, various parts of the expression are enclosed n in a box. When what you want to select is enclosed, press to select it. Changing the font If you are entering a long expression, yo u may find it useful to reduce the size of th e font used in the Equation Writer. Se lect Change font from the menu. This enables you to view a large expression in its entirety when you need to. Selecting Change font again returns the font size to its previous setting. You can also see the selected expression or subexpression is a smaller or larger font size by pressing and then (to use the smaller font) or (to use the larger font). hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Equation Writer 15-11 How to modify an expression If youâre typing an expression, the key enables you to erase what youâve typed. If youâre selecting, you can: ⢠Cancel the sele ction w ithout dele ting the expr essi on by pre ssing . The cur sor mo v es to the end o f the deselected portion . ⢠Replace the selection with an e xpression , just b y typing the desir ed expr essi on. ⢠T ransform the selected e xpressi on by appl y ing a CAS functi on to it (w hic h you can in vok e from one o f CAS menus along the bottom of the screen). ⢠Delete the selected e xpr ession b y pre ssing: ⢠Delete a selected unary operator at the top of the expr ession tr ee by pr essing: F or e xam ple, t o rep lace SIN(e xpr ) with C OS(e xpr), select S IN(expr ) , pres s a nd then press COS. ⢠Delete a binary i nfi x operator and one of its argume nts by s electing the ar gument y ou w ant delete and pres sing: F or ex ample , if you ha ve the e xpres sion 1 2 and select 1, pr essing deletes 1 and leaves o n ly 2. S i m i l a r l y , t o d e l e t e F ( x )= in the expre ssion F( x ) = x 2 â x 1, you s elect F( x ) and then pr es s . This pr oduces x = x 2 â x 1. ⢠Delete a binary operator by se lecting: Edit expr . fr om the menu and then making the cor rec tion . ⢠Cop y an element from CA S histor y . Y ou access CAS history by pr essing . See page 15-19 for details. hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
15-12 Equation Writer Accessing CAS functions While you are in the Equation Writer, you can access all CAS functions, and you can ac cess them in various ways. General principle: When you have written an expression in the Equation Writer, all you have to do is press to evaluate whatever you have selected (or the entire expression, if nothing is selected). How to type Σ and â« Press to enter Σ and to enter â« . These symbols and are treated as prefix functions with multiple arguments. They are automatically placed before the selected element, if there is one (hence the term prefix functions). You can move the cursor from argument to argument by pressing or . Enter the expressions accordin g to the rules of selection explained earlier, but you must first go into selection mode by pressing . NOTE Do not use the index i to define a summation, because i designates the complex-number solution of x 2 1 = 0. Σ performs exact calculations if its argument has a discrete primitive; otherwise it performs approximate calculations, even in exact mode. For example, in both approximate and exact mode : = 2.70833333334 whereas in exact mode: Note that Σ can symbolically calculate summations of rational fractions and hyperg eometric series that allow a discrete primitive. For example, if you type: 1 k ! --- - k 0 = 4 â 1 1 1! ---- - 1 2! ---- - 1 3! ---- - 1 4! ---- - 65 24 ----- - = 1 KK 1 () â ------------------------- - K 1 = 4 â hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Equation Writer 15-13 select the entire expression and press , you obtain: However, if you type: select the entire expression and press , you obtain 1. How to enter infix function s An infix function is one that is typed between its arguments. For example, AND , | and MOD are infix functions.You can either: ⢠type them in Alpha mode and then enter their argumen ts, or ⢠select them f ro m a CAS menu o r by pr essing an appr opri ate k e y , pro v ided that y ou ha ve alr eady wr itten and selec ted the fir st argume nt. Y ou mo ve f rom one ar gument to the other b y pres sing and . The comma enables y ou to w rite a complex number : when y ou type (1,2) , the par entheses ar e auto matically placed w hen you ty pe the comma. If y ou w ant to type (â1,2), you must select â1 bef or e you type the comma . How to enter prefix function s A prefix function is one that is typed before its arguments. To enter a prefix function, you can: ⢠type the f irst ar gument , selec t it , then select the functi on fr om a menu , or ⢠y ou can select the functi on fr om a menu , or by di re c t ly en t eri n g i t i n Al p h a mode , and then type the arguments . The following example illu strates t he various ways of entering a prefix function. Suppose you want to factor the expression x 2 â 4 , then find its value for x = 4 . FACTOR is the function for facto ring, and it is found on the menu. SUB ST is the function for subs tituting a value for a variable in an ex pression, and it is also found in the menu. l 4 5 -- - 1 KK 1 () â ------------------------- - K 1 = â â hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
15-14 Equation Writer First option: function first, then arguments In the Equation Writer, press , select FACTOR and then press or . FACTOR() is displayed in the Equation Writer, with the cursor between the parentheses (as shown at the right). Enter your expression, using the rules of selection described earlier. 2 4 The entire expression is now selected. Press then produce the result. With a blank Equation Writer screen, press , select SUBST and then pres s or . With the cursor between the parentheses at the location of the first argument, type your expression. Note that SUBST has two arguments. When you have finished entering the first argument (the expression), press to move to the second argument. Now enter the second argument, x =4. hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Equation Writer 15-15 Press to obtain th e an intermediate result (4 2 â 4) and again to evaluate the intermediate result. The final answer is 12. Second option: arguments first, then function Enter your expression, using the rules of selection described earlie r. 2 4 The entire expression is now selected. Now press and select FACTOR . Notice that the FACTOR is applied to whatever was selected (which is automatically placed in parentheses). Press to evaluate the expression. The result is the factors of the expression. B ecause the result of an evaluation is always selected, you can immediat ely apply another command to it. To illustrate this, press , select SUBST and then press or . Note that SUBST is applied to whatever was selected (which is automatically placed in parentheses). Note too that the cursor is automatically placed in th e position of the second argument. Enter the second argument, x =4. hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
15-16 Equation Writer Press to obtain an intermediate result, (4â 2)(4 2), and again to evaluate the intermediate result. The final answer, as before, is 12. Note If you call a CAS function while youâre writing an expression, whatever is currentl y selected is copied to the functionâs first or main argument. If nothing is selected, the cursor is placed at the appropriate location for completing the arguments. Equation Writer variables You can store objects in variab les, then access an object by using the name of its va riable. However, you should note the following: ⢠V ar iables used in CAS cannot be used in HOME , and vic e ve rs a. ⢠In HOME or in the pr ogram editor , use to sto re an object in a var iable . ⢠In CAS , use the S T OR E command (on the menu) to stor e a value in a vari able. ⢠The ke y display s a menu that contains all the av ailable v ari ables . Pr essing while y ou ar e in HOME displa y s the names of the v ari ables def ined in HOME and in the Aplets. Pr essing while y ou are in the Eq uation W riter displa ys the names of the var iables de fined in CA S (as explained on page 15-18) . Predefined CAS variables ⢠VX contains the name of the c u rr ent s ymboli c var iable . Generall y , this is X , so y ou should not use X as the name of a numeri c var iable. No r should you eras e th e contents of X w ith the UNASSIGN command (on the menu) after hav ing done a s ymboli c calculati on. ⢠EPS contains the v alue of epsilo n used in the EP SX0 command. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Equation Writer 15-17 ⢠MODULO contains the v alue of p fo r performing symbolic c alcu lat ion s i n Z/pZ or in Z/pZ [ X ]. Y ou can change the value of p either with the MODSTO command on the MODULAR menu , (by typ ing, f or ex ample , MODS T O( n ) to gi ve p a value of n ), o r f r o m CAS M ODE S scr een (see page 14- 5). ⢠PERIOD mus t contain the period of a f unction befo re y ou can find its F ourier coeff ic ients. ⢠PRIMIT contains the pr imitiv e of the las t integrat ed functi on . ⢠REALASSUME contains a list o f the names of the s ymbolic v ariables that are consider ed reals . If you âve chosen the Cmplx vars opti on on the CFG confi guratio n menu , the defa ults are X , Y , t, S1 and S2 , as well as an y integration v ar iables that ar e in use. If y ouâv e cho sen the Real vars optio n on the CFG confi guratio n menu , all sy mbolic var ia bles are consider ed reals . Y ou can also use an assumptio n to define a v ari able such as X >1. In a case like this, y ou use the ASSUME(X>1) command to make REALASSUME contain X>1. The command UNASSUME(X) cancels all the as sumptions y ou have pre v iousl y made about X . T o see these vari ables, as well as those that you âve def ined in CAS , pr ess in the Equatio n Editor (see âCAS vari ables â on page 14-4) . The keyboard in the Equation Writer The keys mentioned in this se ction have different functions when pressed in the Equation Writer than when used elsewhere. MATH key The key, if pressed in the Equation Writer, displays just those functions used in symbolic calculation. These functions are contained in the following menus: ⢠The f iv e func tion-containing Equati on W riter menus outlined in the pr ev ious sec tion: Algebra () , hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
15-18 Equation Writer Diff&Int () , Rewrite () , Solve () and Trig () . ⢠The Complex menu , pr ov iding f unctions spec ific to manipulating with com plex numbers . ⢠The Constant menu , containing e , i, â and Ï . ⢠The Hyperb . menu , containing hy perboli c functions . ⢠The Integer men u, con taining functions that enable you to perfo rm integer arithmeti c. ⢠The Modular men u, con taining functions that enable y ou to perform modular ar ithmetic (using the v alue contained in the MODULO varia bl e) . ⢠The Polynom. menu , containing f unctions that enable you to perfor m calculations w i th polynomi als. ⢠The Real menu , containing func tions spec ifi c to common r eal-number calc ulations ⢠The Tests menu , containing logic f unctions f or wo rking w ith hy potheses . SHIFT MATH keys The key combination opens an alphabetical menu of all CAS commands. You can enter a command by selecting it from this menu, so that you donât have to type it in ALPHA mode. VARS key Pressing while youâre in the Equation Writer displays the names of the variables defined in CAS. Take special note of namVX , which contains the name of the current variable. The menu options on the variables screen are: Press to copy the name of the highlighted variable to the position of the cursor in Equation Writer. Press to see the contents of the highlighted variable. Press to change the contents of the highlighted variable. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Equation Writer 15-19 Press to clear the value of the highlighted variable. Press to change the name of the highlighted variable. Press to define a new variable (which you do by specifying an object and a name for the object. SYMB key Pressing the key in the Equation Writer gives you access to CAS history. As in the HOME screen history, the calculations are written on the left and the results are written on the right. Using the arrow keys, you can scroll through the histor y. Press to copy the highlighted entry in history to the clipboard in order to paste it in the Equation Writer. Press or to replace the current selection in Equation Writer with the high lighted entry in CAS history. Press to leave CAS history without changing it in any way. SHIFT SYMB or SHIFT HOME keys While you are working in the Equation Writer, pressing or opens CAS MODES screen. The various CAS modes are described in âCAS modesâ on page 14-5. SHIFT , key Pressing followed by the comma key undoes (that is, cancels) your last operation. PLOT key Pressing in the Equation Writer displays a menu of plot types. You can choose to graph a function, a parametric curve, or a polar curve. Depending on what you choose, the highlighted expression is copied into the appropriate aplet, to the destination that you specify. hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
15-20 Equation Writer NOTE This operation supposes that the c urrent variable is also the variable of the function or curve you want to graph. When the expression is copied, it is evaluated, and the current variable (contained in VX) is changed to X, T, or θ , depending on the type of plot you chose. If the function depends on a pa rameter, it is preferable to give the parameter a value before pressing . If, however, you want the parameterized expression to be copied with its parameter, then the name of the parameter must consist of a si ngle letter other than X, T, or θ , so that there is no confusion. If the highlighted expression has real values, the Function, Aplet or Polar Aplet can be chosen, and the graph will be of Function or Polar type. If the highligh ted expression has complex values, the Parametric Aplet must be chosen, and the graph will be of Parametric type. To summarize. If you choose: ⢠the F unction A plet, the hi ghlighted e xpr essio n is copied into the c hosen f unction Fi , and the cur rent var ia ble is changed to X. ⢠the P arametr ic A plet, the r eal par t and the imaginary part of the h ighlighted expres sion are copied into the chosen f unctions Xi , Yi , and the curr ent vari able is changed to T . ⢠the P olar Aplet , the highli ghted ex pre ssion is cop ied into the ch osen func tion R i and the cur rent v ariable is changed to θ . NUM key Pressing in the Equation Writer causes the highlighted expression to be replaced by a numeric approximation. puts the calculator into approximate mode. SHIFT NUM key Pressing in the Equation Writer causes the highlighted expression to be replaced by a rational number. puts the calculator into exact mode. VIEWS key Pressing in the Equation Writer enables you to move the cursor with the and arrow keys to see the entire highlighted expression. Press to return in the Equation Writer. hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Equation Writer 15-21 Short-cut keys In the Equation Writer, the following are short-cut keys to the symbols indicated: 0 for â 1 for i 3 for Ï 5 for < 6 for > 8 for ⤠9 for ⥠hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-1 16 Step-b y-Step Ex ampl es Introduction This chapter illustrates the power of CAS, and the Equation Writer, by working though a number of examples. Some of these examples are variations on questions from senior math examination papers. The examples are given in order of increasing difficulty. Example 1 If A is: calculate the result of A in the form of an irreduci ble fraction, showing each step of the calculation. Solution: In the Equation Writer, enter A by typing: 3 2 1 1 2 1 Now press to select the denominator (as shown above). Press to simplify the denominator. Now select the numerator by pressing . 3 2 -- - 1 â 1 2 -- - 1 ----------- - hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
16-2 Step-by-Step Examples Press to simplify the numerator. Press to select the entire fraction. Press to simplify the selected fraction, giving the result shown at the right. Example 2 Given that write C in the form , where d is a whole number. Solution: In the Equation Writer, enter C by typing: 2 45 3 12 20 6 3 Pres s to select . Pres s to select and to select 20. Now pr ess , select FACTOR and pres s . C 2 45 3 12 20 â6 3 â = d 5 63 â 20 â hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-3 Pres s to factor 20 into . Pre ss to selec t and to simplify it. Pre ss to selec t and to e xc hange with . Pre ss to selec t and to select 45 . Pres s , sel ect FACTOR and pres s . Press to factor 45 i n t o . Pre ss to selec t and to simplify the selecti on. Pre ss to selec t , and to select . 2 2 5 â 2 2 5 â 25 â 31 2 25 â 24 5 3 2 5 â 3 2 5 â 235 â 235 â 25 â hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
16-4 Step-by-Step Examples Pres s to ev aluate the selection . It re mains to transf orm and combine it w ith . Follo w the same procedur e as undertaken a number of times abo ve . Y ou w ill find that is equal to , and so the final tw o terms cancel each other out. Hence the r esult is Example 3 Given the expression : ⢠expand and r educe D ⢠factor D ⢠sol ve the equati on and ⢠eva lu a te D for x = 5 . Solution: First, enter D using the Equation Writer: 3 X 1 2 81 Press to select and to expand the expression. This gives: 31 2 63 â 31 2 63 C 45 = D 3 x 1 â () 2 81 â = 3 x 10 â () 3 x 8 () â 0 = 3 X 1 â () 2 9 x 2 6 x â1 8 1 â hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-5 Press to select the entire equation, then press to reduce it to . Press , select FACTOR, press and then . The r esult is as shown at the right. Now press , select SOLVEVX, press and press . The result is shown at t he right. Press to display CAS history, select D or a version of it, and press . Press , select SUBST , press and, then complete the second argument: Press to select the enti re express ion and then to obtain the intermediate result shown. Press once more to yield the re sult: . Therefore, when . Example 4 A baker pro duces two assortments of biscuits and macaroons. A packet of the first assortment contains 17 biscuits and 20 macaroons. A packet of the second assortment contains 10 biscuits and 25 macaroons. Both packets cost 90 cents. Calculate the price of one biscuit, and the price of one macaroon. Solution: Let x be the price of one biscuit, and y the price of one macaroon. The problem is to solve: 9 x 2 6 x â8 0 â x 5 â = 175 D 175 = x 5 â = hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
16-6 Step-by-Step Examples Pres s , select LINSOLVE and pr ess . Enter 17 X 20 Y 90 10 X 25 Y 90 X Y If you are working in step by step mode, pressing produces the result at the right. Press again to produce the next step in the solution: Press again to produce the reduction result: Pressing again produces the final resul t: If you select , and press you get X = 2 a nd Y = 2.8. In other words, the price of one biscuit is 2 cents, and the price of one macaroon is 2.8 cents. Exercise 5 Suppose that A and B are points having the coordinates (â1, 3) and (â3,â1) respectively, and where the unit of measure is the centimetre. 17 x 20 y 90 = 10 x 25 y 90 = 14 5 ----- - hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-7 1. F ind the ex act le ngth of AB in cen timetr es. 2 . Deter mine the equation o f the line AB . First method Type: STORE((-1,3),A) and press . Accept the change to Complex mode, if necessary. Note that pressing returns the coordinates in complex form: â1 3i. Now type: STORE((-3,-1),B) and press . The coordinates this time are represented as â3 â1·i. The vector AB has coordinates B â A. Type: (B - A) Press . The result is . Now apply the DROITE command to determine the equation of the line AB : Complex DROITE A B Pressing gives an intermediate result . 25 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
16-8 Step-by-Step Examples Press again to simplify the result to Y = 2X 5. Second method Type: (-3,-1 )-(-1,3) The answer is â(2 4i). With the answer still selected, apply the ABS command by pressing . Pressing gives , the same answer as with method 1 above. You can also deter mi1ne the equati on of the line b y ty pi ng: DROITE(( -1,3), (-3,-1)) Pressing then gives the result obtained before: Y = â(2X 5). Exercise 6 In this exercise, we consider some examples of integer arithmetic. Part 1 For n , a strictly positive integer, we define: 1. Compute a 1 , b 1 , c 1 , a 2 , b 2 , c 2 , a 3 , b 3 and c 3 . 2 . Deter mine ho w man y digits the dec imal repr esentations of a n and c n can hav e. Sho w that a n and c n are di v isible by 3 . 3 . Using a list of prime numbers less than 100, show that b 3 is a prime . 25 AB a n 41 0 n à 1 b n 21 0 n 1 â à c n 21 0 n à 1 = , = , â = hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-9 4. Show that for e very integer n > 0, b n à c n = a 2n . 5 . Deduce the prime factor decompositi on of a 6 . 6. S h ow t h a t GC D ( b n , c n ) = GCD( c n ,2). Deduce that b n and c n are prime together . Solution: Begin by entering the three definitions. Type: DEF(A(N) = 4 · 10 N â1) DEF(B(N) = 2 · 10 N â1) DEF(C(N) = 2 · 10 N 1) Here are the keystrokes for en tering the first definition: First select the DEF command by pressing . Now press A N = 4 10 N 1 Finally press . Do likewise to define the other two expressions. You can now calculate various values of A(N), B(N) and C(N) simply by typing the defined variab le and a value for N, and then pressing . For example: A(1) yields 39 A(2) yields 399 A(3) yields 3999 B(1) yields 19 B(2) yields 199 B(3) yields 1999 and so on. In determining the number of digits the dec imal repr esentations of a n and c n can hav e, the calculator is used only to try out different values of n. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
16-10 Step-by-Step Examples Show that the whole numbers k such that: have digits in decimal notation. We have: so have digits in decimal notation. Moreover, is divisible by 9, since its decimal notation can only end in 9. We also have: and so and are both di visible by 3. Letâs consider whether B(3) is a prime number. Type ISPRIME?(B(3)) and press . The result is 1, which means true. In other words, B(3) is a prime. Note: ISPRIME? is not available from a CAS soft menu, but you can select it from from CAS FUNCTIONS menu while you are in the Equation Writer by pressing , choosing the INTEGER menu, and scrolling to the ISPRIME? function. To prove that is a prime number, it is necessary to show that 1999 is not divi sible by any of the prime numbers less than or equal to . As , that means testing the divisibility of 1999 by n = 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41. 1999 is not divisible by any of these numbers, so we can conclude that 1999 i s prime. 10 n k 10 n 1 < ⤠n 1 () 10 n 31 0 n â a n 41 0 n â 10 n 1 << << 10 n b n 21 0 n â 10 n 1 << < 10 n 21 0 n â c n 31 0 n â 10 n 1 << << a n b n c n , , n 1 () d n 10 n 1 â = a n 31 0 n â d n = c n 31 0 n â d n â = a n c n b 3 1999 = 1999 1999 2025 < 45 2 = hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-11 Now consider the product of two of the definitions entered above: B(N) Ã C(N): B N C N . Press , to select EXP2POW and press . Press to evaluate the expression, yielding the result of B(N) Ã C(N). Consider now the decomposition of A(6) into its pr ime factors. Press , to select FACTOR and press . Now press A 6. Finally, press to get the resul t. The factor s are listed, separated by a medial period. In this case, the factors a re 3, 23, 29 and 1999. Now letâs consider whether b n and c n are relatively prime. Here, the calculator is useful only for trying out different values of n . To show that b n and c n are relatively prime, it is enough to note that: That means that the common divisors of b n and c n are the common divisors of b n and 2, as well as the common divisors of c n and 2. b n and 2 are relatively prime because b n is a prime number other than 2. So: c n b n 2 = hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
16-12 Step-by-Step Examples Part 2 Given the equation: [1] where the integers x and y are unknown and b 3 and c 3 are defined as in part 1 abo ve: 1. Sho w that [1] has at least one so lution . 2 . Appl y Euc lidâs algor ithm to b 3 and c 3 and find a solution to [1]. 3 . F ind all solutio ns of [1]. Solution : Equation [1] must have at least one solution, as it is actually a form of Bézoutâs Identity. In effect, Bézoutâs Theorem states that if a and b are relatively prime, there exists an x and y such that: Therefore, the equation has at least one solution. Now enter IEGCD(B(3), C(3)) . Note that the IEGCD function can be found on the INTEGER submenu of the MATH menu. Pressing a number of times returns the result shown at the right: In other words: Therefore, we have a particular solution: x = 1000, y = â999 . The rest can be done on paper: , GCD c n b n , () GCD c n 2 , () GCD b n 2 , () 1 = == b 3 xc 3 y 1 = â â ax â by â 1 = b 3 x â c 3 y â 1 = b 3 1000 à c 3 999 â () à 1 = c 3 b 3 =2 b 3 999 2 1 à = hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-13 so , , or The calculator is not needed for finding the general solution to equation [1]. We started with and have established that . So, by subtraction we have: or According to Gaussâs Theorem, is prime with , so is a divisor of . Hence there ex ists such that : and Solving for x and y , we get: and for . This gives us: The general solution for all is therefo re: Exercise 7 Let m be a point on the circle C of center O and radius 1. Consider th e image M of m defined on their affixes by the transformation . When m moves on b 3 999 c 3 b 3 â () 1 Ã = b 3 1000 c 3 999 â () Ã Ã 1 = b 3 x â c 3 y â 1 = b 3 1000 Ã c 3 999 â () Ã 1 = b 3 x 1000 â () c 3 y 999 () â â 0 = b 3 x 1000 â () â c 3 â y 999 () â = c 3 b 3 c 3 x 1000 â () kZ â x 1000 â () kc 3 Ã = y 999 () kb 3 Ã = â x 1000 kc 3 Ã = y 99 9 â kb 3 Ã â = kZ â b 3 xc 3 yb 3 1000 c 3 999 â () Ã Ã 1 == â â kZ â x 1000 kc 3 Ã = y 99 9 â kb 3 Ã â = F : z > 1 2 -- - z 2 â Z â â hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
16-14 Step-by-Step Examples the circle C , M will move on a curve Î . In this exercise we will study and plot Î . 1. Let and m be the point on C of affi x . F ind the coor dinates of M in terms o f t . 2 . Co mpare x(ât) w ith x(t) and y(ât) with y(t). 3. Com p u t e x â² (t ) and find the v ari ations of x o ver [0, Ï ]. 4. Repeat step 3 fo r y . 5 . Sho w the var iatio ns of x and y in the same table . 6. P ut the poin ts of Î corr esponding to t = 0 , Ï /3, 2 Ï /3 and Ï, and dra w the tangent t o Î at these points . Part 1 First go to CAS MODES screen and make t the VX variable. To do this, press to open the Equation Writer, and then press . This opens CAS MODES screen. Press and delete the current variable. Type T and press . Now enter the expression and press to select it. Now invoke the SUBST command from the menu. Because the expression was highlighted, the SUBST command is automatically applied to it. Note that the cursor is positioned in the second parameter. Since we know that , we can enter this as the second parameter. t Ï â Ï [, ] â ze it â = 1 2 -- - z 2 â z â ze it â = hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-15 Selecting the entire expression and pressing gives the result at the right: Now linearize the result by applying the LIN command (which can be found on the me nu). The result, after accepting the switch to complex mode, is shown at the right: Now store th e result in variable M. Note that STORE is on the menu. To calculate the real part of the expression, apply the RE command (available on the COMPLEX submenu of the MATH menu). Pressing yields the result at the right: We are now going to define this result as x (t ). To do this, enter =X(t), highlight the X(t) by pressing and press to swap the two parts of the expression , as shown at t he right: Now select the entire expression and apply the hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
16-16 Step-by-Step Examples DEF command to it. Press to complete the definition. To calculate the real pa rt of the expression, apply the IM command (available on the COMPLEX submenu of the MATH menu) to the stored variable M. Press to get the result at the right: Finally, define the result as Y(t) in the same way that you defined X(t): by firstly adding Y(t) = to the expression (as shown at the right) and then applying the DEF command. We have now found the coordinates of M in terms of t . Part 2 To find an axis of symmetry for Î , calculate and by typing: X t Press to highlight the expression. Then press to produce the result at the right: In other words, Now type Y t Press to highlight the expression. xt â () yt â () xt â () xt () = hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-17 Then press to produce the result at t he right: In other words, . If is part of , then is also part of . Since and are symmetrical with respect to the x- axis, we can deduce that the x-axis is an axis of symmetry for . Part 3 Calculate by typing: DERVX X t . P ress to highli ght the exp res s io n. Pressing returns the result at the right: Press to simplify the result: Y ou can now define the function by invoking DEF . Note: You will first need to type =X1(t) then exchange X1(t) with the previous expression. To do this, highlight X1(t) and type . Now select the entire expression and apply the DEF command to it: Finally press to finish the definition. yt â () yt () â = M 1 xt () yt () (,) Î M x xt â () yt â () (,) Î M 1 M 2 Î x â² t () x â² t () hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
16-18 Step-by-Step Examples Part 4 To calculate , begin by typing: DERVX(Y(t)) . Pressing returns: Press again to simplify the result: Select FACTOR and press . You can now define the function (in the same way that you defined ). Part 5 To show the variations of and , we will trace and on the same graph. The independent variable must be t which it should be as a result of the previous calculations. (You can check this by pressing .) Type X(t) in the Equation Writer and press . The corresponding expression is displayed. Now press , select Function , press , select F1 as the destination and press . Now do the same thing with Y(t), making F2 the destination. To graph the functions, quit CAS (by pressing ), choose the Function aplet, and check F1 and F2 . y â² t () y â² t () x â² t () xt () yt () xt () yt () hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-19 Now press to see the graphs. Part 6 To find the values of and for return to CAS, type each function in turn and press . (You may need to press twice for further simplification). For example, pressing X 0 gives the result at the right: Likewise, pressing X 3 gives this answer at the right: The other results are: The slope of the tangents is . We can find the values of for by using the lim command. xt () yt () t 0 Ï 3 -- - 2 Ï â 3 --------- - Ï ,, , = Ï X 2 Ï 3 ----- - ââ ââ 1 4 -- - = X Ï () 3 2 -- - = Y 0 () 0 = Y Ï 3 -- - ââ ââ 3 â 4 --------- - = Y 2 Ï 3 ----- - ââ ââ 33 â â 4 ----------------- = Y Ï () 0 = m y ' t () x ' t () --------- - = y ' t () x ' t () --------- - t 0 Ï 3 -- - 2 Ï â 3 --------- - Ï ,, , = hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
16-20 Step-by-Step Examples The example at the right shows the case for t = 0. Select the entire expression and press to get the answer: 0 The example at the right shows the case for t = Ï /3. Selecting the entire expression and pressing displays the message shown at the right. Accept YES and press . Press again to get the result: â The next example is for t = 2 Ï /3. Selecting the entire expression and pressing displays the result: 0 The final example is for the case where t = Ï . Press , accept YES to the message UNSIGNED INF. SOLVE? , press and press to get the result: â Here, then, are the variations of and : xt () yt () hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-21 Now we will graph Î , which is a parametric curve. In the Equation Writer, type X(t) i à Y(t) . Select the entire expression and press . Now press , select Parametric and press . Select X1,Y1 as the destination and press . To make the graph of Î , quit CAS and choose the Parametric aplet. Check X1(T) and Y1(T) . Now press to see the graph. t 0 Ï 0â0 0 âââ 0 âââ 0 0â â 1 â0 2 m 0 â 0 â Ï 3 -- - 2 Ï 3 ------ x ' t () 3 xt () 1 â 2 ----- - 3 â 4 ----- - 1 4 -- - 3 2 -- - yt () 3 â 4 --------- - 33 â 4 ------------- y ' t () hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
16-22 Step-by-Step Examples Exercise 8 For this exercise, make sure that the calculator is in exact real mode with X as the current variable. Part 1 For an integer, n , define the following: Define g over [0,2] where: 1. F ind the var iati ons of g o ver [0,2]. Sho w that for ev ery real x in [0,2]: 2 . Sho w that for e v ery real x in [0,2]: 3 . After int egrati on, sh ow that: 4. Using: sho w that if has a limit L as n appr oaches inf inity , then: u n 2 x 3 x 2 -------------- - e x n -- - x d 0 2 â« = gx () 2 x 3 x 2 -------------- - = 3 2 -- - gx () 7 4 -- - â¤â¤ 3 2 -- - e x n -- - gx () e x n -- - 7 4 -- - e x n -- - â¤â¤ 3 2 -- - ne 2 n -- - n â ââ ââ ââ u n 7 4 -- - ne 2 n -- - n â ââ ââ ââ â¤â¤ e x 1 â x ------------- x 0 â lim 1 = u n 3 L 7 2 -- - â¤â¤ hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-23 Solution 1 Start by defining G(X): DEF G X = 2 X 3 X 2 Now press : Press and to select the numerator and denominator, and then press . This leaves G(X) displayed: Finally, apply the TABVAR function: TABVAR and pres s a number of times until the var iation table appears (sho w n abov e) . The first line of the variation table gives the sign of according to x , and the second line the variations of g (x ). Note that for TABVAR the function is always called F . We can deduce, then, that g (x ) increases over [0, 2]. If you had been in step-by- step mode, you would have obtained: Pr ess to get the result at the right. g â² x () F 2 X 3 â X 2 ------------------- - = hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
16-24 Step-by-Step Examples Now press and scroll down the screen to: Now press to obtain the table of variations. If you are not in step-by -step mode, you can also get the calculation of the derivative by typing: DERVX(G(X)) which produces the preceding result. To prove the stated inequality, first calcu late g (0) by typing G(0) and pressing . The answer is: . Now calculate g (2) by typing G(2) and pressing . The answer is . The two results prove that: for Solution 2 The calculator is not needed here. Simply stating that: for is sufficient to show that, for , we have: Solution 3 To integrate the preceding inequality, type the expression at the right: Pressing produces the result at the right: 1 x 2 () 2 ------------------ - â 3 2 -- - 7 4 -- - 3 2 -- - gx () 7 4 -- - â¤â¤ x 02 [,] â e x n -- - 0 ⥠x 02 [, ] â x 02 [,] â 3 2 -- - e x n -- - gx () e x n -- - 7 4 -- - e x n -- - â¤â¤ hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-25 We can now see that: To justify the preceding calculation, we must assume that is a primitive of . If you are not s ure, you can use the INTVX function as illustrated at the right: Note that the INTVX command is on the menu. The simplified result, got by pressing twice, is shown at t he right: Solution 4 To find the limit of when , enter the expression at the right: Note that the lim command is on the menu. The infinity sign can be selected from the character map, opened by pressing . Pressing once after selecting the infinity sign adds a â â character to the infinity sign. Select the entire expression ans press to get the result, which is: 2 3 2 -- - ne 2 n -- - n â ââ ââ ââ u n 7 4 -- - ne 2 n -- - n â ââ ââ ââ â¤â¤ ne x n -- - â e x n -- - ne 2 n -- - n â ââ ââ ââ n â â hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
16-26 Step-by-Step Examples NOTE : The variable VX is now set to N . Reset it to X by pressing (to display CAS MODES screen) and change the INDEP VAR s etting. To check the result, we can say that: and that therefore: or, simplifying: If the limit of exists as approaches in the inequalities in solution 2 above, we get: Part 2 1. Sho w that for e very x in [0,2]: 2 . F ind the v alue of: 3. Sh ow t h a t fo r e ve r y x in [0,2]: 4. Deduce that: 5 . Sho w that is con ver gent and f ind its limit, L . e x 1 â x ------------- x 0 â lim 1 = e 2 n -- - 1 â 2 n -- - ------------- - n â â lim 1 = e 2 n -- - 1 â ââ ââ ââ n â n â â lim 2 = Lu n n â 3 2 -- - 2 â L 7 4 -- - 2 â â¤â¤ 2 x 3 x 2 -------------- - 2 1 x 2 ----------- - â = I 2 x 3 x 2 -------------- - dx 0 2 â« = 1 e x n -- - e 2 n -- - â¤â¤ 1 u n e 2 n -- - I â â¤â¤ u n hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-27 Solution 1 Start by defining the following: Now type PROPFRAC(G(X)) . Note that PROPFRAC can be found on the POLYNOMIAL submenu of th e MATH menu. Pressing yields the result shown at the right. Solution 2 Enter the integral: . Pressing yields the result shown at the right: Pressing again yields: Working by hand: , so: Then, integrating term by term between 0 and 2 produces: that is, since : gx () 2 1 x 2 ----------- - â = Ig x () x d 0 2 â« = 2 x 3 2 x 2 () 1 â = gx () 2 1 x 2 ----------- - â = gx () x 2 xx 2 () ln â [] = d 0 2 â« x 2 = x 0 = 42 2 ln = ln gx () x 42 ln â = d 0 2 â« hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
16-28 Step-by-Step Examples Solution 3 The calculator is not needed here. Simply stating that increases for is sufficient to yield the inequality: Solution 4 Since is positive over [0, 2 ], through multiplication we get: and then, integrating: Solution 5 First find the limit of when â . Note: pressing after you have selected the infinity sign from the character map places a â â character in front of the infinity sign. Selecting the entire expression and pressing yields: 1 In effect, tends to 0 as tends to , so tends to as tends to . As tends to , is the portion between and a quantity that tends to . Hence, converges, and its limit is . We have therefore shown that: e x n -- - x 02 [,] â 1 e x n -- - e 2 n -- - â¤â¤ gx () gx () gx () e x n -- - gx () e 2 n -- - â¤â¤ Iu n e 2 n -- - I â¤â¤ e 2 n -- - n â 2 n -- - n â e 2 n -- - e 0 1 = n â n â u n I I u n I LI 42 ln â == hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-29 hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-1 17 V ariables and memory manag ement Introduction The HP 40gs has approximately 200K of user memory. The calculator uses this memory to store variables, perform computations, and store history. A v a r i a b l e i s a n o b j e c t t h a t y o u c r e a t e i n m e m o r y t o h o l d data. The HP 40gs has two types of variables, home variables and aplet v ariables. ⢠Home variables are available i n all aplets. For example, you can store real numbers in var iables A to Z and complex numbers in variables Z0 to Z9. These can be numbers you have entered, or the results of calculations. Th ese variables are available within all aplets and within any programs. ⢠Aplet variables apply only to a single aplet. Aplets have specific vari ables allocated to them which vary from aplet to aplet. You use the calculatorâs memory to store the following objects: ⢠copies of aplets with specific con figurations ⢠new aplets that you download ⢠aplet variables ⢠home variables ⢠variables created through a catalog or editor, for example a matrix or a text note ⢠programs that you create. You can use the Memory Manager ( MEMORY ) to view the amount of memory av ailable. The catalog views, which are accessible via the Memory Manager, can be used to transfer variables such as lists or matrices between calculators. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
17-2 Variables and memory management Storing and recalling variables You can store numbers or expressions from a previous input or result into variables. Numeric Precision A number stored in a variable is always stored as a 12- digit mantissa with a 3-digit exponent. Numeric precisio n in the display, however, de pends on the display mode (Standard, Fixed, Scientific, Engineering, or Fraction). A displayed number has only the precision that is displayed. If you copy it from the HOME view display history, you obtain only the precision displayed, not the full internal precision. On the other hand, the variable Ans always contains the most recent result to full precisio n. To store a value 1. On the command line, enter the value or the calculati on f or the re sult yo u wi s h t o st o re. 2. P r e s s 3 . Enter a name f or the vari ab l e. 4. Pres s . To store the results of a calculation If the value you want to store is in the HOME view display history, for example the results of a previous calculation, you need to copy it to the command line, then store it. 1. P erform the calculati on f or the r esult y ou w ant to stor e. 3 8 6 3 2 . Pr ess to hi ghlight to the r esult y ou wish to st ore . 3 . Pres s to copy the r esult to the command line . 4. Pres s . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-3 5 . Enter a name f or the var iable . A 6 . Pr ess to stor e the re sult . The results of a calculation can also be stored directly to a variable. For example: 2 5 3 B To recall a value To recall a variableâs value, type the name of the variable and press . A To use variables in calculations You can use variables in calculations. The calculator substitutes the variableâs value in the calculation: 65 A To clear a variable You can use the CLRVAR command to clear a specified var iable. For example, if you have stored {1,2,3, 4} in variable L1, entering CLRVAR L1 w ill clear L1. (Y ou can f ind the CLRVAR command b y pres sing and choosing the PROMP T category of commands.) hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
17-4 Variables and memory management The VARS menu You use the VARS menu to access all variables in the calculator. The VARS menu is organised by category. For each variable category in the left column, there is a list of variables in the right colu mn. You select a variable category and then select a variable in the category. 1. Open the V ARS menu . 2 . Use the arr ow k eys or pr ess the alpha ke y of the f irst letter in the category to select a var iable category . For exa m p l e, t o s e l e ct the Matri x category , pres s . Note: In this instance , ther e is no need to pre ss the ALPHA k ey . 3 . Mov e the highli ght to the var iable s column. 4. Use the ar r ow k e ys t o select the v ari able that you want . F or example , to select the M2 var iable , pres s . hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-5 5 . Choos e whether to place the v ari able name or the var iable v alue on the command line . â Press to indicate that yo u want the var iable âs contents to appear on the command line. â Press to indicate that y ou wa nt the var iable âs name to appear on the co mmand line. 6. Pr ess to place the va lue or name on the command line . The selec ted object a ppears on the command line . Note: The V ARS men u can also be used to enter the names or values of v ari ables into pr ograms . Example This example demonstrates how to use the VARS menu to add the contents of two list variables, and to store the result in another list variable. 1. Display the L ist Catalog . LIST to select L1 2 . Enter the data f or L1. 88 90 89 65 70 3 . Retu rn to the L ist Catalog to c r eate L2 . LIST to select L2 hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
17-6 Variables and memory management 4. Enter data for L2 . 55 48 86 90 77 5 . Pres s to access HOME . 6. Open the var iab le menu and select L1. 7 . Copy it to the command line . Note: Because the option is highli ghted, the v ar iable âs name, rather than its conten ts, is copied to the command line . 8. Insert the oper ator and select the L2 v ari able fr om th e Li s t va ria b l es. 9 . S tore the answ er in the Lis t catalog L3 var iable . L3 Note: Y ou can also type list names dir ectly fr om the k ey boar d. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-7 Home variables It is not possible to store data of one type in a variable of another type. For example, yo u use the Matrix catalog to create matrices. You can crea te up to ten matrices, and you can store these in variables M0 to M9. You cannot store matric es in variab les other than M0 to M9. Cate- gory A v ailab le nam es Complex Z0 to Z9 Fo r e xa m p l e, (1,2) Z0 or 2 3 i Z1. Y ou can enter a complex number by typing (r ,i) , where r r e pres ents the r eal par t , and i repr esents the imaginar y part. Graphic G0 to G9 SeeâGraphic commandsâ on page 21-21 for more information on storing graphic objects via programming commands. See âTo store into a graphics variableâ on page 20-5 for more information on storing graphic object via the sketch view. Library Aplet library variables can store aplets that you have created, either by saving a copy of a standard aplet, or downloading an aplet from another source. List L0 to L9 For example, {1,2,3} L1. Matrix M0 to M9 c an store matrices or vectors. For example, [[1,2],[3,4]] M0. Modes Modes variables store the modes settings that you can configure using MODES . Notepad Notepad variables store notes. Program Progr am variables store programs. Real A to Z an d θ. Fo r e xa m p l e, 7 . 45 A . Symbolic E0â¦9 , S1â¦S5, s1â¦s5 and n1â¦n5. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
17-8 Variables and memory management Aplet variables Most aplet va riables stor e values that a re unique to a particular aplet. These include symbolic expressions and equations (see below), settings for the Plot and Numeric views, and the results of some calculations such as roots and intersections. See the Reference Information chapter for more information about aplet variables. To access an aplet variable 1. Open the aplet that con tains the var iable y ou w ant to rec a l l. 2 . Pres s to display the V ARS menu . 3 . Use the ar r ow k e y s to select a v ar iable category in the left column, then press to ac cess the vari ables in the ri ght column. 4. Use the ar r ow k eys t o select a v ar iable in the ri ght column. 5 . T o copy the name of the var iable on to the edit line, pres s . ( is the default setting .) 6. T o copy the value o f the var iable into the edit line, pres s and pres s . Category A v ailable names Function F0 to F9 (Symbolic view). See âFunction aplet variablesâ on pa ge R-7. Parametric X0, Y0 to X9, Y9 (Symbolic view). See âParametric aplet variablesâ on page R-8. Polar R0 to R9 (Symbolic view). See âPolar aplet variablesâ on pa ge R-9. Sequence U0 to U9 (Symbolic view). See âSequence aplet variablesâ on page R-10. Solve E0 to E9 (Symbolic view). See âSolve aplet variablesâ on pa ge R-11. Statistics C0 to C9 (Numeric view). See âStatistics aplet variablesâ on page R-12. hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-9 Memory Manager You can use the Memory Manager to determine the amount of available memory on the calculator. You can also use Memory Manager to organize memory. For example, if the available memory is low, you can use the Memory Manager to determine which aplets or variables consume large amounts of memory. You can make deletions to free up memory. Example 1. Start the Memory Manager . A list of var iable categor ies is displa y ed. MEMORY F ree memory is display ed in the top ri ght corner and the body of the sc reen lists each category , the memory it uses, and the percen tage of the total memory it uses. 2 . Selec t the category with w hic h you w ant to w ork and pres s . Memory M anager display s memory details of v ari ables w ithin the category . 3 . T o delete v aria bles in a category: â Press to delete the selec ted var iable . â Press CLEAR to delet e all var iables in the select ed category . hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Matrices 18-1 18 Matrices Introduction You can perform matrix calc ulations i n HOME and in programs. The matrix and each row of a matrix appear in brackets, and the elements and rows are separated by commas. For example, the following matrix: is displayed in the history as: [[1,2,3],[4,5,6]] (If the Decimal Mark mode is set to Comma , then separate each element and each row with a period.) You can enter matrices directly in the command line, or create them in the matrix editor. Vectors Vectors are one-dimensional arrays. They are composed of just one row. A vector is represented with single brackets; for example, [1,2,3]. A vector can be a real number vector or a complex number vector, for example [(1,2), (7,3)]. Matrices Matrices are two-dimensional ar rays. They are composed of more than one row and more than one column. Two-dimensional matrices ar e represented with nested brackets; for example, [[1,2,3],[4,5,6]]. You can create complex matrices, for example, [[(1,2), (3,4)], [(4 ,5), (6,7)]]. Matrix Variables There are ten matrix variables available, named M0 to M9. You can use them in calculation s in HOME or in a program. You can retrieve th e matrix names from the VARS menu, or just type th eir names from the keyboard. 123 456 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
18-2 Matri ces Creating and storing matrices You can create, edit, delete, send, and receive matrices in the Matrix catalog. To open the Matrix catalog, press MATRIX . You can also create and store matricesânamed or unnamedâ-in HOME. For example, the command: POLYROOT([1,0,â1,0]) XM1 stores the root of the complex vector of length 3 into the M1 variable. M1 now contains the three roots of Matrix Catalog keys The table below lists the operations of the menu keys in the Matrix Catalog, as well as the use of Delete ( ) and Clear ( CLEAR ). To create a ma trix in the Matrix Catalog 1. Pres s MATRIX to open the Matri x Catalog . The Matri x catalog lists the 10 a vaila ble matri x v ari ables, M0 to M9 . x 3 x â0 = Key M e a n i n g Opens the highlighted matrix for editing. Prompts for a matrix type, then opens an empty matrix with the highlighted name. Transmits the highlighted matrix to another HP 40gs o r a disk drive. See. Receives a ma trix from an other HP 40gs or a disk drive. See . Clears the highlighted matrix. CLEAR Clears all matrices. or Moves to the end or the beginning of the catalog. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Matrices 18-3 2 . Highli ght the matr ix v aria ble name you w ant to use and pres s . 3 . Select the ty pe of matr ix t o cr eate . â For a ve ct or (one -dimension al array) , select Real vector or Complex vector . Certain oper ations ( , â , CRO SS ) do not r ecogni ze a one-dimensi onal matr i x as a v ect or , so th is se lect ion i s imp or tant. â For a ma trix (two-dime nsional array) , select Real matrix or Complex matrix . 4. F or each element in the matr ix , type a number or an expr ession , and pres s . (The e xpr essio n may not contain s y mbolic va riable name s.) For co m p l ex n um b er s , ente r each n umber in comple x form; that is , (a, b) , wher e a is the r eal part and b is the imaginary par t. Y ou must include the par entheses and the comma . 5 . Use the c urs or ke y s to mov e to a differ ent ro w or column. Y ou can change the dir ection o f the highlight bar by pr essing . The men u ke y toggles between the f ollo w ing three opti ons: â spec ifie s that the cur sor mov es to the cell belo w the cur ren t cell when y ou pr ess . â spec ifies that the c ursor mo v es to the cell to the ri ght of the c urr ent cell w hen y ou pre ss . â sp ecif ies that the cur sor sta y s in the cur r ent cell when yo u press . 6. When done , pr ess MATRIX to see the Matr i x catalog , or pre ss to retur n to HOME . The matri x entr ies ar e automatically s tor ed. A matrix is listed with two dimensions, even if it is 3Ã1. A vector is listed with the number of elements, such as 3. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
18-4 Matri ces To transmit a matrix You can send matrices between calculators just as you can send aplets, programs, lists, and notes. 1. Connec t the calculat ors using an appr opri ate cable . 2 . Open the Matr ix catalogs on both calc ulators. 3 . Highlig ht the matri x to send . 4. Pres s and choose the method of sending . 5 . Press on the recei v ing calculator and choose the method of r ecei v ing. F or mor e infor mation on se nding and recei ving files , see âSending and recei v ing aplets â on page 22 - 4. Working with matrices To edit a matrix In the Matrix catalog, highli ght the name of the matrix you want to edit and press . Matrix edit keys The following table lists the matrix edit key o perations. Key M e a n i n g Copies the highlighted element to the edit line. Inserts a row of zeros above, or a column of zeros to the left, of the highlighted cell. (You are prompted to choose row or column.) A three-way toggle for cursor advancement in the Matrix editor. advances to the right, ¸ advances downward, and does not advance at all. Switches between larger and smaller font sizes. Deletes the highlighted cells, row, or column (you are prompted to make a choice). CLEAR Clears all elements from the matrix. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Matrices 18-5 To display a matrix ⢠In the Matri x catalog ( MATRIX ) , highlight the matri x name and pr ess . ⢠In HOME , enter the name of the matri x var iable and pres s . To display one element In HOME, enter matrixname ( row,column ). For example, if M2 is [[3,4],[5,6]] , then M2(1,2) returns 4 . To create a matrix in HOME 1. Enter the matr i x in the edit line. S tart and end the matri x and each r o w with square brac kets (the shif ted and key s) . 2 . Separate each element and each r ow w ith a comma . Example: [[1,2],[3, 4]] . 3 . Pre ss to enter and displa y the matri x. The left screen below shows the matrix [[2.5,729],[16,2]] being stored into M5. The screen on the right shows the vector [66,33,11] being stored into M6. Note that you can enter an expression (like 5/2) for an element of the matrix, and it will be evaluated. Moves to the first row, last row, first column, or last column respectively. K e y Meani ng (Continued) hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
18-6 Matri ces To store one element In HOME, enter, value matrixname ( row, column ). For example, to change the element in the first row and second column of M5 to 728, then display the resulting matrix: 728 M 512 M5 . An attempt to store an element to a row or column beyond the size of the matrix results in an error message. Matrix arithmetic You can use the arithmetic functions ( , â, Ã, / and powers) with matrix arguments. Division left-multiplies by the inverse of the divisor. You can enter the matrices themselves or enter th e names of stor ed matrix variab les. The matrices can be real or complex. For the next examples, store [[1,2],[3,4]] into M1 and [[5,6],[7,8]] into M2. Example 1. Create the f irst matr ix. MATRIX 1 2 3 4 2 . Cr eate the second matr ix . MATRIX 5 6 7 8 3 . Add the matr ices that you c re at e d. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Matrices 18-7 M1 M2 To multiply and divide by a scalar For division by a scalar, enter the matrix first, then the operator, then the scalar. For multiplication, the order of the operands does not matter. The matrix and the sc alar can be real or complex. For example, to divide the result of the previous example by 2, press the following keys: 2 To multiply two matrices To multiply the two matrices M1 and M2 that you created for the previous example, press the following keys: M1 M 2 To multiply a matrix by a vector, enter the matrix first, then the vector. The number of elements in the vector must equal the number of columns in the matrix. To raise a matrix to a power You can raise a matrix to any power as long as the power is an integer. The following example shows the result of raising matrix M1, created earlier, to the power of 5. M1 5 Note: You can also raise a matrix to a power without first storing it as a variable. Matrices can be raised to ne gative powers. In this case, the result is equivalent to 1/[matrix]^ABS(power). In the following example, M1 is raised to the power of â2. M1 2 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
18-8 Matri ces To divide by a square matrix For division of a matrix or a vector by a square matrix, the number of rows of the dividend (or the number of elements, if it is a vector) must equal the number of rows in the divisor. This operation is not a mathematical division: it is a left- multiplication by the inverse of the divi sor. M1/M2 is equivalent to M2 â1 * M1. To divide the two matrices M1 and M2 that you created for the previous example, press the following keys: M1 M2 To invert a matrix You can invert a square matrix in HOME by typing the matrix (or its variable name) and pressing x â1 . Or you can use the matrix INVERSE command. Enter INVERSE ( matrixna me ) in HOME and press . To negate each element You can change the sign of each element in a matrix by pressing before the matrix name. Solving systems of linear equations Example Solve the following linear system: 1. Open the Matri x catalog and cr eate a vec to r . MATRIX 2 . Cr eate the vec tor of the constants in the line ar sy stem. 5 7 1 2 x 3 y 4 z 5 xy z â 7 4 xy â2 z 1 = = = hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Matrices 18-9 3 . Retu rn to the Matri x Cat al og. MATRIX In this ex ample , the vec tor you c reated is listed a s M1. 4. Creat e a new matr ix . Select Real matrix 5 . Enter the eq uation coeffi ci ents. 23 4 11 1 4 12 In this ex ample , the matr ix y ou c reat ed is listed as M2 . 6. Re turn to HOME and ent er the calculati on to left-multipl y the constants v ector b y the in vers e of the coeff ic ients matr i x. M2 x â1 M1 The result is a vector of the solution s x = 2, y = 3 and z = â2. An alternative method, is to use the RREF function. See âRREFâ on page 18-12. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
18-10 Matric es Matrix functions and commands About functions ⢠Fu n c t io n s c a n b e u s e d i n a n y a p l e t o r i n H O M E. Th e y are lis ted in the MA TH menu under the Matr i x category . The y can be used in mathematical expr essions âprimaril y in HOMEâas w ell as in progr ams. ⢠F unctio ns alw ay s pr oduce and displa y a r esult . The y do not change an y stor ed vari ables, such as a matr ix vari ab l e. ⢠F unctions ha ve ar guments that ar e enclos ed in parenthes es and separated b y commas; f or ex ample , CROSS ( vect or 1 , vect o r2 ) . The matr ix in put can be either a matr ix v ari able name (such as M1 ) or the actual matri x data inside brac ke ts. F or e xample , CROSS(M1,[1,2]) . About commands Matrix commands are listed in the CMDS menu ( CMDS ), in the matrix category. See âMatrix commandsâ on page 21-24 for details of the matrix commands available for use in programming. Functions differ from commands in that a function can be used in an expression. Commands cannot be used in an expression. Argument conventions ⢠For row # or column# , supply the n umber of the r ow (counting fr om the top , starting with 1) or the number of the column (counting fr om the left, starting w ith 1) . ⢠The ar gument matri x can re fer to e ither a ve ctor or a matr ix . Matrix functions COLNORM Column Norm. Finds the maximum value (over all columns) of the sums of the absolute values of all elements in a column. COLNORM ( matr ix ) hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Matrices 18-11 COND Condition Number. Finds the 1-norm (column norm) of a square matrix . COND ( matri x ) CROSS Cross Product of vector1 with vecto r2 . CROSS ( vec to r1 , ve ct or 2 ) DET Determinant of a square matrix . DET ( matri x ) DOT Dot Product of two arrays, matrix1 matrix2 . DOT ( matri x1, matri x2 ) EIGENVAL Displays the eigenvalue s in vector form for matrix . EIGENVAL ( matri x ) EIGENVV Eigenvectors and Eige nvalues for a square matrix . Displays a list of two arra ys. The first contains the eigenvectors and the second contains the eigenvalues. EIGENVV ( matri x ) IDENMAT Identity m atrix. Creates a square matrix of dimension size à si ze whose diagonal elements are 1 and off- diagonal elements are zero. IDENMAT ( siz e ) INVERSE Inverts a square matrix (real or complex). INVERSE ( matri x ) LQ LQ Factor ization. Factors an m à n matrix into three matrices: {[[ m à n lowertrapezoidal ]],[[ n à n orthogonal ]], [[ m à m permutation ]]}. LQ ( matri x ) LSQ Least Squares. Displays the minimum norm least squares matrix (or vector ). LSQ ( matri x1, matri x2 ) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
18-12 Matric es LU LU Deco mposition. Factors a square matrix into three matrices: {[[ lowertriangular ]],[[ uppertriangular]],[[ permutation ]]} The uppertriangular has ones on its diagonal. LU ( matri x ) MAKEMAT Make Matr ix. Creates a matrix of dimension rows à columns , using expression to calculate each element. If expression contains the variables I and J, then the calculation for each element substitutes the current row number for I and the current column number for J. MAKEMAT ( ex p re s s io n, rows , columns) Example MAKEMAT(0,3,3) r eturns a 3Ã3 z er o matri x , [[0,0,0],[0,0,0],[0,0,0]] . QR QR Factorization. Factors an m à n matrix into three matrices: {[[ m Ãm orthogonal ]], [[m Ãn uppertrapezoidal ]],[[ n à n permutation ]]}. QR ( matri x ) RANK Rank of a rectangular matrix . RANK ( matri x ) ROWNORM Row Norm . Finds the maximum value (over all rows) for the sums of the absolute values of all elements in a row. ROWNORM ( matri x ) RREF Reduced-Row Echelon Form. Changes a rectan gular matrix to its reduced row-echelon form. RREF ( matri x ) SCHUR Schur Decomposition. Factors a square matri x into two matrices. If matrix is real, then the result is {[[ orthogonal ]],[[ upper-quas i triangular ]]}. If matrix is complex, then the result is {[[ unitary ]],[[ upper-triangular ]]}. SCHUR ( matri x ) SIZE Dimensions of matrix . Retur ned as a list: {rows,columns}. SIZE ( matri x ) hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Matrices 18-13 SPECNORM Sp ectral Norm of matrix . SPECNORM ( matri x ) SPECRAD Spectr al Radius o f a square matri x . SPECRAD ( matri x ) SVD Singular Value Decomp osition. Factors an m à n matrix into two matrices and a vector: {[[ m à m square orthogonal ]],[[ n à n square orthogonal]], [ real ]}. SVD ( matri x ) SVL Singular Values. Returns a vector containing the singular values of matrix. SVL ( matri x ) TRACE Finds the trace of a square matrix. The trace is equal to the sum of the diagonal elements. (It is also equal to the sum of the eigenvalues.) TRACE ( matri x ) TRN Transposes matr ix . For a complex matrix, TRN finds the conjugate transpose. TRN ( matri x ) Examples Identity Matrix You can create an identity matrix with the IDENMAT function. For example, IDENMAT(2) creates the 2Ã2 identity matrix [[1,0],[0,1]]. You can also create an identity matrix using the MAKEMAT ( make matrix ) function. For example, entering MAKEMAT(I¼J,4,4) creates a 4 à 4 matrix showing the numeral 1 for all elements except zeros on the diagonal. The logical operator ¼ returns 0 when I (the row nu mber) and J (the column number) are equal, and returns 1 when they are not equal. Transposing a Matrix The TRN function swaps the row-column and column-row elements of a matrix. For instance, element 1,2 (row 1, hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
18-14 Matric es column 2) is swapped with element 2,1; element 2,3 is swapped with element 3,2; and so on. For example, TRN([[1,2],[3,4]]) creates the matrix [[1,3],[2,4]] . Reduced-Row Echelon Form The following set of equations can be written as the augmented matrix which can then stored as a real matrix in any matrix variable. M1 is used in this example. You can use the RREF function to change this to reduced row echelon form, storing it in any matrix variable. M2 is used in this example. The reduced row echelon matrix gives the solution to the linear equation in the fourth column. An advantage of using the RREF function is that it will also work with inconsistent matrices resulting from syst ems of equations which have no solution or infinite solutions. For example, the following set of equations has an infinite number of solutions: x 2 y â3 z 1 4 2 xy z â 3 4 x â 2 y â2 z 1 4 = = = 12 â3 1 4 21 1 â3 â 42 â2 1 4 34 Ã xy z â 5 2 xy â7 x 2 y â z 2 = = = hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Matrices 18-15 The final row of zeros in the reduced-row echelon form of the augmented matrix indicates an inconsistent system with infinite solutions . hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Lists 19-1 19 L ists You can do list operations in HOME and in programs. A list consists of comma-separated real or complex numbers, expressions, or matr ices, all enclosed in braces. A list may, for example, contain a sequence of real numbers such as {1,2,3} . (If the Decimal Mark mode is set to Comma , then the separators are periods.) Lists represent a convenient way to group related objects. There are ten list variables available, named L0 to L9. You can use them in calculations or expressions in HOME or in a program. Retrieve the list names from the VAR S menu, or just type their names from the keyboar d. You can create, edit, delete , send, and re ceive named lists in the List catalog ( LIST ). You can also create and store listsânamed or unnnamedâin HOME lists List variables are identical in behaviour to the columns C1.C0 in the Statistics aplet. You can store a statistics column to a list (or vice versa) and us e any of the list functions on the statistics columns, or the statistics functions, on the list variables. Create a list in the List Catalog 1. Open the List catalog. LIST . 2 . Hi ghlight the list name you w ant to assign to the new list (L1, etc.) and press to display the List editor . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
19-2 Lists 3. En ter t he va lues you want i n th e l ist, pressin g after each one. V alues can be r eal or comple x number s (or an expr ession). If you enter a calculati on, it is ev aluated and the re sult is inserted in the list . 4. When done , pr ess LIST to see the List catalog, or pres s to re turn to HOME . List catalog keys The list catalog keys are: Key M e a n i n g Opens the highlighted list for editing. Transmits the highlighted list to another HP 40gs or a PC. See âSending and receiving apletsâ on page 22-4 for further information. Receives a list from another HP 40gs or a PC. See âS ending and receiving apletsâ on page 22-4 for further information. Clears the highlighted list. CLEAR Clears all lists. or Moves to the end or the beginning of the catalog. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Lists 19-3 List edit keys When you press to create or change a list, the following keys are available to you: Create a list in HOME 1. Enter the list on the edit line. Start and end t he list w ith brace s (the shifted and ke ys) and separate each element w ith a comma. 2 . Pres s to evaluate and display the li st. Immediatel y after typ ing in the list, y ou can store it in a var iable by pressing lis tname . The list va riable name s ar e L0 throug h L9 . This example st ores the list {2 5,14 7 , 8} in L1. Note: Y ou can omit the final brace w hen enter ing a list. Key M e a n i n g Copies the highlighted list item into the edit line. Inserts a new value before the highlighted item. Deletes the highlighted item from the list. CLEAR Clears all elements from the list. or Moves to the end or the beginn ing of the list. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
19-4 Lists Displaying and editing lists To display a list ⢠In the List catalog , highligh t the list name and pres s . ⢠In HOME , enter the name of the list and pr ess . To display one element In HOME, enter listname ( element# ). For example, if L2 is {3,4,5,6}, then L2(2) returns 4 . To edit a list 1. Open the List catalog. LIST . 2 . Pr ess or to highlight the name of the list y ou want to edit (L1, etc.) and press to display the list contents. 3 . Press or to highlight the element you want to edit. In this ex ample , edit the thir d element so that it has a value of 5 . 5 4. Pres s . hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Lists 19-5 To insert an element in a list 1. Open the List catalog. LIST . 2. P r e s s o r t o highligh t the name of the list y ou wan t to edit (L1, etc.) and pr ess to display the lis t contents . New elements are inserted above the highlighted positio n. In this example, an element, with the value of 9, is inserted between the first and second elements in th e list. 3 . Pre ss to the insertion position, then pres s , and p re ss 9. 4. Pres s . To store one element In HOME, enter value listname ( element ) . For example, to store 148 as the second element in L1, type 148 L1(2) . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
19-6 Lists Deleting lists To delete a list In the List catalog, highli ght the list name and press . You are prompted to confirm that you want to delete the contents of the highlighted list variable. Press to delete the contents. To delete all lists In the List catalog, press CLEAR . Transmitting lists You can send lists to calculators or PCs just as you can aplets, programs, matrices, and notes. 1. Conne ct the calc ulators using an a ppropr iate cable). 2 . Open the L ist catalogs on both calc ulators . 3 . Highlig ht the list to send . 4. Pres s and choose the method of sending . 5 . Press on the recei v ing calculator and choose the method of r ecei v ing. F or mor e infor mation on se nding and recei ving files , see âSending and recei v ing aplets â on page 22 - 4. List functions List functions are found in the MATH menu. You can use them in HOME, as well as in programs. You can type in the name of the function, or you can copy the name of the function from the List category of the MATH menu. Press (the alpha L character key). This highlights the List category in the left column. Press to move the cursor to the right column which contain the List functions, select a function, and press . List functions have the following syntax: ⢠F unctions ha ve ar guments that ar e enclos ed in parenthes es and separated b y commas. Example: CONCAT(L1,L2) . An argument can be either a list hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Lists 19-7 var iable name (su ch as L1) or the actual list . F or ex ample , REVERSE({1,2,3}) . ⢠If Dec imal Mark in Modes is set to C omma, use peri ods to separ ate arguments . F or e xample , CONCAT(L1.L2) . Common operators like , â, Ã, and / can take lists as arguments. If th ere are two ar guments a nd both are lists, then the lists must have the same length, since the calculation pairs the elements . If there are two arguments and one is a real number, then the c alculation pairs the number with each element of the list. Example 5 * {1,2,3} ret u r ns {5,10,15} . Besides the common operators that can take numbers, matrices, or lists as arguments, there are commands that can only operate on lists . CONCAT Concatenates two lists into a new list. CONCAT( list1 , list2 ) Example CONCAT({1,2,3},{4}) ret u r n s {1,2,3,4} . Î LIST Creates a new list composed of the first differences, that is, the differences between the seque ntial elements in list1. The new list has one fewer elements than list1 . The first differences for {x 1 x 2 ... x n } are {x 2 âx 1 ... x n âx nâ1 } . Î LIST( list1 ) Example In HOME, store {3,5,8,12,17,23} in L5 and find the first differences for the list. { 3,5,8 ,12 ,17 ,2 3 } L 5 L Select Î LIST L5 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
19-8 Lists MAKELIST Calculates a sequence of elements for a new list. Evaluates expression with variable from begin to end values, taken at increment steps. MAKELIST( expression , va ria b le , begin , end , incr ement ) The MAKELIST function generates a series by automatically producing a list from the repeated evaluation of an expression. Example In HOME, generate a series of squares from 23 to 27. L Select MAKELIST A A 2 3 27 1 Î LIST Calculates the product of all elements in list. Î LIST( list ) Example Î LIST({2,3,4}) ret u r n s 24 . POS Returns the position of an element within a list. The element can be a value, a variable, or an expression. If there is more than one instance of the element, the position of the first occurrence is returned. A value of 0 is returned if there is no occurrence of the specified element. POS( list, element ) Example POS ({3, 7, 12, 19},12) returns 3 REVERSE Creates a list by reversing the order of the elements in a list. REVERSE( list ) hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Lists 19-9 SIZE Calculates the number of elements in a li st. SIZE( list ) Also works with matrices. Σ LIST Calculates the sum of all elements in list. Σ LIST( list ) Example Σ LIST({2,3,4}) ret u rn s 9 . SORT Sor ts elements in ascending or der. SORT( list ) Finding statistical values for list elements T o f i n d v a l u e s s u c h a s t h e mean, median, maximum, and minimum values of the elements in a list, use the Statistics aplet. Example In this example, use the Statistics aplet to find the mean, median, maximum, and minimum values of the elements in the list, L1. 1. Creat e L1 with v alues 88 , 90, 8 9 , 65, 7 0, and 8 9 . { 88 9 0 89 65 70 89 } L1 2 . In HOME , stor e L1 into C1. Y ou w ill then be able to see the lis t data in the Numeri c vie w of the Sta ti st ics ap le t. L1 C1 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
19-10 Lists 3 . Start the S tatistic s aplet, and se lect 1-var iable mode (pre ss , if necessary , to displa y ). Select Statistics Note: Y our list values are no w in column 1 (C1). 4. In the S ymbo lic vi ew , define H1 (for e xam ple) as C1 (sample) and 1 (f req uency). 5 . Go to the Numeri c vie w to displa y calc ulated statistic s. See âOne-var iable â on page 10-14 for the meaning of each comp uted statistic . hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-1 20 Notes and sk etch es Introduction The HP 40gs has text and pi cture editors for entering notes and sk etches. ⢠E ach aplet has its o wn independent No te vie w and Sk etch vi e w . Notes and sk etc hes that y ou c reat e in these vi ews ar e associ ated with the aplet. When you sav e the aplet , or send it to another calc ulator , the notes and sketches ar e sav ed or sent as well . ⢠The Notepad is a collection of no tes independent of all aplets. Thes e notes can also be sent to another calc ulator v ia the Not epad Catalog . Aplet note view You can attach text to an aplet in its Note view. To write a note in Note view 1. In an aplet, pr ess NOTE for the No te v iew . 2 . Us e the note editing k e ys sho w n in the table in the follo wing secti on. 3 . Set Alpha loc k ( ) for qui ck entry of letters. F or lo wer case A lpha lock, pr ess . 4. While Alpha lock is on: â T o type a single letter of the opposite cas e , pre ss letter . â T o type a single n on-alpha char acte r (such a s 5 or [ ), press fir st. (This turns off A lpha lo ck fo r on e ch ara cte r . ) Y our w ork is aut omaticall y sav ed. Pr ess an y vi ew k ey ( , , , ) or to ex it the Notes vie w . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
20-2 Notes and sketches Note edit keys Key M e a n i n g Space key for text entry. Displays next page o f a multi-page note. Alpha-lock for letter entry. Lower-case alpha-lock for letter entry. Backspaces cursor and deletes character. Deletes current character. Starts a new line. CLEAR Erases the entire note. Menu for entering variable names, and contents of variables. Menu for entering math operations, and constants. CMDS Menu for entering program commands. CHARS Displays special characters. To type one, highlight it and press . To copy a character without closing the CHARS screen, press . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-3 Aplet sketch view You can attach pictures to an aplet in its Sketch view ( SKETCH ). Y our w ork is aut omatically s av ed with the aplet . Pres s any other v ie w ke y or to ex it the Sketc h vie w Sketch keys To draw a line 1. In an aplet, pr ess SKETCH for the Sk etch v iew . 2 . In Sk etch v ie w , pres s and mo ve the c ursor to wher e y ou wa nt to start the line 3 . Pres s . This turns on line-dra wing . 4. Mo ve the c ursor in an y dir ection t o the end point of the line by pr essing the , , , k ey s. 5 . Press to f inish the li ne. Key M e a n i n g Stores the specified portion of the current sketch to a graphics variable (G1 through G0). Adds a new, blank page to the current sketch set. Displays next sketch in the sketch set. Animates if held down. Opens the edit line to type a text label. Displays the menu-key labels for drawing. Deletes the current sketch. CLEAR Erases the entire sketch set. Toggles menu key labels on and off. If menu key labels are hidden, or any menu key, redisplays the menu key labels. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
20-4 Notes and sketches To draw a box 1. In Sketch v ie w , pres s and mov e the c ursor to wher e you w ant any corner of the box to be . 2. P r e s s . 3 . Mov e the cur sor to mark the oppo site corner for the box . Y ou can adj ust the si ze o f the box by mo v ing the cu rs or. 4. Pre ss to f inish the box . To draw a circle 1. In Sketc h vi ew , press and move the c ursor to wher e you w ant the center of the cir cle to be. 2 . Pr ess . This tur ns on c ir cle dr aw ing. 3 . Mov e the curs or the distance of the radius. 4. Pr ess to dr a w the cir c le. DRAW keys Key M e a n i n g Dot on. Turns pixels on as the cursor moves. Dot off. Turns pixels off as the cursor moves. Draws a line from the cursorâs starting position to the cursorâs current position. Press when you have finished. You can draw a line at any angle. Draws a box from the cursorâs starting position to the cursorâs current position. Press when you have finished. Draws a circle with the cursorâs starting position as the center. The radius is the distance between the cursorâs starting and ending position. Press to draw the circle. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-5 To label parts of a sketch 1. Pres s and type the te xt on the edit line . T o lock the Alpha shift on, pr ess (for upper case) or (fo r low er case). T o make the label a smaller c har acter si ze , turn o ff befor e pr essing . ( is a toggle betwee n small and large f ont si z e). The smaller char acte r siz e cannot display lo wer case letter s. 2. P r e s s . 3 . P osition the label w her e you w ant it by pr essing the , , , ke y s. 4. Pres s again to affi x the label. 5. P re s s t o c o n t i n u e dra wing , or press to ex it the Sk etch v iew . To create a set of sketches You can create a set of up to ten sketches. This allows for simple animation. ⢠After making a sk etch , press to add a new , blank page. Y ou can now mak e a new sk etc h, w hic h becomes part of the c urr ent set o f ske tches . ⢠T o vie w the next sk etch in an ex isting set , press . Hold dow n for animati on. ⢠T o r emove the c urr ent page in the curr ent sketch seri es, pre ss . To store int o a graphics variable You can define a portion of a sketch inside a box, a nd then store that graphic into a graphic s variable. 1. In the Sk etch v iew , display the sk etch y ou w ant to copy (stor e into a variable). 2. P r e s s . 3 . Highli ght the var iable name y ou w ant to us e and pres s . 4. Dra w a bo x around the portion y ou w ant to copy : mov e the c ursor to one corner , press , then mo ve the cursor to the opposite corner , and press . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
20-6 Notes and sketches To import a graphics variable You can copy the contents of a graphics v ariable into the Sketch view of an aplet. 1. Open the Sketch v iew o f the aplet ( SKETCH ). The gr aphic w ill be copied her e. 2 . Pr ess , . 3 . Highli ght Graphic , then pr ess and highlight the name of the var iable ( G1 , etc .) . 4. Pr ess to recall the contents o f the gr aphics vari ab l e. 5 . Mov e the b ox to w here y ou would like to copy the gra phic , then pre ss . The notepad Subject to available memory , you can store as many notes as you want in the Notepad ( NOTEPAD ). These notes are independent of any aplet. The Notepad catalog lists the existing entries by name. It does not include notes that were created in apletsâ Note view s , but these can be imported. See âTo import a noteâ on page 20-8 . To create a note in the Notepad 1. Displa y the Notepad catalog. NOTEPAD 2 . Cr eate a new n ote . 3 . Enter a name f or y our note. MYNO TE hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-7 4. W rite your note . See âNote edit k e ys â on page 20 - 2 for mor e infor mation on the entry and editing of notes. 5 . When you ar e finished, press or an aplet key to e xit Not epad. Y our wor k is automaticall y sa ved . Notepad Catalog keys Key M e a n i n g Opens the selected note for editing. Begins a new note, and asks for a name. Transmits the selected note to another HP 40gs or PC. Receives a note being transmitted from another HP 40gs or PC. Deletes the selected note. CLEAR Deletes all notes in the catalog. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
20-8 Notes and sketches To import a note You can import a note from the Notepad i nto an apletâs Note view, and vice versa. Suppose you wan t to copy a note named âAssignmentsâ fr om the Notepad into the Function Note view: 1. In the F unction aplet , displa y the Note v ie w ( NOTE ). 2 . Pr ess , highlight Note pad in the left column, then highli ght the name â Assignments â in the ri ght column . 3 . Pre ss to copy the contents o f â Assignments â to the F uncti on Note v iew . Note: T o recall the name instead o f the contents, pres s instead o f . Suppose you want to copy the Note view from the current aplet into the note, Assignments, in the Notepad. 1. In the Notepad ( NOTEPAD ), open the note, â Assignments â . 2 . Pr ess , highlight Note in the left column, then pr ess and highlight Note Text in the ri ght column . 3 . Pr ess to recall the cont ents of the Note vi ew into the not e â A ssignments â . hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Programming 21-1 21 Pr ogramming Introduction This chapter describes how to program using the HP 40gs. In this chapter youâll learn about: ⢠using the Pr ogram catalog to c reat e and edit progr ams ⢠progr amming commands ⢠stor ing and re trie v ing var iables in pr ograms ⢠progr amming v ariables . HINT More information on programming, including examples and special tools, can be found at HPâs calculators web site: http://www.hp.com/calcula tors The Contents of a Program An HP 40gs program contains a sequence of numbers, mathematical expressions, and commands that execute automatically to perform a task. These items are separated by a colon ( : ). Commands that take multiple arguments have those arguments separated by a semic olon ( ; ). For example, PIXON xposition ; yposition: Structured Programming Inside a program you can use branching struct ures to control the execution flow. You can take advantage of structured programming by creating building-block programs. Each building -block program stands aloneâand it can be called from other programs. Note: If a program has a sp ace in it s name then you have to put quotes around it when you want to run it . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
21-2 Programming Example RUN GETVALUE: RUN CALCULATE: RUN " SHOW ANSWER" : This program is separated into three main tasks, each an individual program. Within each program, the task can be simpleâor it can be di vided further into other programs that perform smaller tasks. Program catalog The Program catalog is wher e you create, edit, delete, send, receive, or run progra ms. This section describes how to ⢠open the Progr am catalog ⢠cr eate a ne w pr ogram ⢠enter commands fr om the program co mmands menu ⢠enter f unctions f rom the MA TH menu ⢠edit a pr ogram ⢠run and debu g a progr am ⢠stop a pr ogram ⢠copy a pr ogram ⢠send and recei v e a progr am ⢠delete a progr am or its contents ⢠cus tomi z e an aplet. Open Program Catalog 1. Pres s PROGRM . The Pr ogra m Catalog display s a list o f progr am names. The Pr ogram C atalog contains a built-in entr y called Editline . Editline contains the la st expr es sion that y ou enter ed fr om the edit line in HOME , or the last data y ou enter ed in an inpu t for m. (If y ou pr ess fr om HOME w ithout entering an y data, the HP 40g s runs the conten ts of Editline .) Bef ore st arting to work w ith progr ams, you should tak e a fe w minutes to become f amiliar with the Progr am catalog menu k e ys . Y ou can use any o f the follo w ing ke ys (both menu and k e yboar d) , to perform tasks in the Pr ogram cata log. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Programming 21-3 Program catalog keys The program catalog keys are: Key M e a n i n g Opens the highlighted program for editing. Prompts for a new program name, then opens an empty program. Transmits the highlighted program to another HP 40gs or to a disk drive. Receives the highlighted program from another HP 40gs or from a disk drive. Runs the highlighted program. or Moves to the beginning or end of the Program catalog. Deletes the highlighted program. CLEAR Deletes all programs in the program catalog. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
21-4 Programming Creating and editing programs Create a new program 1. Pres s PROGRM t o open the Progr am catalog . 2. P r e s s . The HP 40gs prompts you f o r a n a m e. A progr a m name can contain spec ial c harac ters, such as a space . How ev er , if you use spec ial char acter s and then run the pr ogram b y typing it in HOME , you mu st enclo se the progr am name in double quotes ( " " ). Don't use the " s ymbol within y our progr am name . 3 . T ype y our progr am name , then pres s . When yo u press , the Progr am E ditor opens. 4. Enter y our pr ogram . When done , start an y other acti vity . Y our w ork is sav ed au tomaticall y . Enter commands Until yo u become familiar with the HP 40gs commands, the easiest way to enter comma nds is to select them from the Commands menu from the Program editor. You can also type in commands using alpha characters. 1. Fr om the Pr ogra m editor , pre ss CMDS to open the Progr am Commands men u. CMDS hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Programming 21-5 2 . On the left , use or t o highlight a command category , then press to access the commands in the category . Select the command that y ou want . 3 . Pres s to paste the command into the pr ogr am editor . Edit a program 1. Press PROGRM to open the Progr am catalog. 2 . Us e the arr o w ke y s to highligh t the progr am y ou wan t to edit, and press . The HP 40gs opens the Progr am E ditor . The name of y our progr am appear s in the title bar of the displa y . Y ou can use the follo wing k ey s to edit y our pr ogram . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
21-6 Programming Editing keys The editing keys are: Key M e a n i n g Inserts the character at the editing point. Inserts space into text. Displays pre vious page of the program. Displays next page of the program. Moves up or down one line. Moves right or left one character. Alpha-lock for letter entry. Press A...Z to lock lower case. Backspaces cursor and deletes character. Deletes current character. Starts a new line. CLEAR Erases the entire program. Displays menus for selecting variable names, contents of variables, math functions, and program constants. CMDS Display s menus for selecting progr am conmmands. CHARS Di splays all characters. T o type one, highlight it and press . To enter several characters in a row, use the menu key while in the CHARS menu. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Programming 21-7 Using programs Run a program From HOME, type RUN program_name. or From the Program catalog, highlight the program you want to run and press Regardless of where you star t the program, all programs run in HOME. What you see will differ slightly depending on where you started the program. If you start the program from HOME, the HP 40gs displays the contents of Ans (Home variable containing the last result), when the program has finished. If you start the program from the Program catalog, the HP 40gs returns you to the Program catalog when the program ends. Debug a program If you run a program that contains errors, the program will stop and you will see an error message. To debug the program: 1. Pre ss to edit the pr ogram . The ins ert curs or appears in the pr ogr am at the point whe re the er r or occ urr ed. 2 . E dit the pr ogram t o fi x the err or . 3 . Run the pr ogr am. 4. Repeat the pr ocess until you cor r ect all err ors. Stop a program You can stop the running of a program at any time by pressing CANCEL (the key). Note: You may have to press it a couple of times. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
21-8 Programming Copy a program You can use the following procedure if you want to make a copy of your work before editingâor if you want to use one program as a template for another. 1. Pres s PROGRM t o open the Progr am catalog . 2. P r e s s . 3 . T ype a ne w file name , then choose . The Pr ogram E ditor opens with a new pr ogr am. 4. Pres s to open t he vari ables menu . 5 . Press to quickl y scr oll to Progr am. 6. Pr ess , then highli ght the pr ogr am you w ant to copy . 7 . Press , then pre ss . The co ntents of the hi ghlighted pr ogr am ar e copied into the c urr ent pr ogram at the c ursor locati on. HINT If you use a programming rou tine often, save the routine under a different program name, then use the above method to copy it into your programs. Transmit a program You can send programs to, and receive pr ograms from, other calculators just as you can send and receive aplets, matrices, lists, and notes. After connecting the calculators with an appropriate cable, open the Program catalogs on both calculators. Highlight the program to send, then press on the sending calculator and on the receiv ing calculator. You can also send programs to, an d receive programs from, a remote storage devi ce (aplet disk drive or computer). This takes place via a cable connection and requires an aplet disk driv e or specialized software running on a PC (such as a connectivity kit). hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Programming 21-9 Delete a program To delete a program: 1. Pres s PROGRM to open the Progr am catalog. 2 . Hi ghlight a pr ogr am to delete , then pr ess . Delete all programs You can delete all programs at once. 1. In the Pr ogram catalog , pr ess CLEAR . 2. P r e s s . Delete the contents of a program You can clear the contents of a program without deleting the program name. 1. Pres s PROGRM to open the Progr am catalog. 2 . Highli ght a pr ogram , then pr ess . 3. P re s s CLEAR , then press . 4. The con tents of the pr ogr am are delet ed, but the progr am name r emains. Customizing an aplet You can customize an aplet and develop a set of programs to work with the aplet. Use the SETVIEWS command to create a custom VIEWS menu which links specially wr itten programs to the new aplet. A useful method for customizing an aplet is illustrated below: 1. Deci de on the built-in aplet tha t yo u want to cu stomiz e. F or ex ample you could customi z e the F unction aple t or the Statisti cs aplet . The c ustomi z ed aplet inher its all the pr operties of the built-in aplet . Sav e the c ustomi z ed aplet w ith a unique name . 2 . Cu stomi z e the ne w aplet if y ou need to, f or e xample by pr esetting axes or angle measur es . 3 . Dev elop the pr ograms to w or k with y our c usto miz ed aplet. When y ou dev elop the apletâs p r ograms, us e the standar d aplet naming con venti on. T his allow s y ou to ke ep trac k of the progr ams in the Pr ogram catalog tha t belong to each aplet. See â Aplet naming conv entio nâ on page 21-10. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
21-10 Programm ing 4. Dev elop a progr am that use s the SETVIEWS command to modify the apletâs VIEW S menu . The menu options pr ovid e links to ass oci ated pr ograms . Y ou can spec ify any ot her progr ams that y ou want trans ferr ed w ith the aplet . See âSETVIEWSâ on page 21-14 for info rmation on the command . 5 . Ensur e that the cu stomi z ed aplet is select ed, then r un the menu conf igur ation pr ogram to conf igur e the apletâs VIEW S menu . 6. T est the cus tomi z ed aplet and debug the ass oci ated progr a ms. (R efer to âDebug a pr ogr am â on page 16 - 7) . Aplet naming convention To assist users in keeping tr ack of aplets and associated programs, use the following naming convention when setting up an apletâs programs: ⢠Start all pr ogram name s with an a bbre v iation of the aplet name . W e w ill use AP L in this ex ample . ⢠Name pr ograms called b y menu entr ies in the VIEW S menu number , after the entry , for ex ample: â APL.ME1 f or the pr ogram called b y menu optio n 1 â APL.ME2 f or the pr ogram called b y menu optio n 2 ⢠Name the pr ogram that conf igur es the new VIEW S menu option APL .S V wher e S V stands for SETVIEWS . For example, a customized aplet called âDifferentiationâ might call programs called DIFF.ME1, DIFF.ME2, and DIFF.SV. Example This example aplet is designed to demonstrate the process of customizing an ap let. The new aplet is based on the Function aplet. Note: This aplet is not intended to serve a serious use, merely to illustrat e the process. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Programming 21-11 Save the aplet 1. Open the Functi on aplet and sa ve it as âEXPERI MENT â . The ne w aplet appear s in the Aplet library . Select Function EXP ERIMENT 2 . Cr eate a progr am called EXP .ME1 w ith contents as shown . This progr am conf igur es the plot ranges , then runs a progr am that allo w s y ou to set the angle f ormat . 3 . Create a pr ogr am called EXP .ME2 w ith contents as shown . This progr am sets the numer ic v iew opti ons for the a plet, and runs the progr am that you can use t o confi gure the angle mode. 4. Create a pr ogr am called EXP .ANG wh ich the pre viou s two progr ams c all. 5 . Create a pr ogr am called EXP .S w hic h runs when y ou start t he aplet , as sho wn . This progr am sets the angle mode to degrees , and sets up the initi al functi on that the aplet plots . Configuring the Setviews menu option programs In this secti on we w ill begin by conf igur ing the VIEW S menu by using the SETVIEW S command. W e w ill then cr eate the âhelper â progr ams called b y the VIEW S menu whi ch w ill do the actual w ork . hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
21-12 Programm ing 6. Open the Pr ogram cat alog and cr eate a pr ogram named âEXP .S Vâ . Include the follo w ing code in the progr am . E ach entry line after the command SE T VIEW S is a tri o that consists of a VIEW S menu text line (a space indicate s none), a progr am name, and a number that def ines the vi ew t o go to after the pr ogram has run its course . All pr ograms lis ted here w ill transfer w ith an aplet w hen the aplet is tr ansfer red . SETVIEWS â â â â ; â â â â ; 18; Sets the f irst men u option to be â Auto scale â . This is the fo urth standard F uncti on aplet vi ew menu opti on and the 18 â Auto scale â , specifi es that it is to be included in the new men u. T he empty quotes w ill ensure that the old name of â Auto scale â appears on the new men u . See âSETVIEWSâ on page 21-14. â â My Entry1â â ;â â EXP.ME1â â ;1; Sets the second men u option . This optio n runs pr ogram E XP .ME1, then retur ns to view 1 , Plo t view . â â My Entry2â â ;â â EXP.ME2â â ;3; Sets the third menu opti on. T his option runs the pr ogr am EXP .ME2 , then r eturns to vi ew 3, the NUM v ie w . â â â â ;â â EXP.SVâ â ;0; This line spec if ies that the pr ogra m to set the Vi ew men u (this progr am) is transf err ed with the aplet . The space char acter bet ween the first set of quotes in the tri o spec if ies that no me nu option appears f or the entry . Y ou do not need to transf er this pr ogram w ith the aplet , but it allo ws us ers to modify the apletâs menu if they w ant to . hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Programming 21-13 â â â â ;â â EXP.ANGâ â ;0; The pr ogram EXP .ANG is a small routine that is called by other pr ograms that the aplet use s. T his entry specif ies that the progr am EXP.ANG is transferr ed when the aplet is tr ansfer red , but the space in the fir st quote s ensure s that no entry appears on the menu . â â Startâ â ;â â EXP.Sâ â ;7: This spec if ies the St art menu option. T he progr a m that is assoc iated with this e ntry , EXP.S, runs au tomaticall y when y ou start the aplet . Because this men u option spec if ies v ie w 7 , the VIEW S menu opens when y ou start th e aplet. Y ou onl y need to run this pr ogr am once to confi gur e yo ur apletâs V IEWS menu . Onc e the apletâ s VIEWS menu is conf igur ed, it r emains that wa y until y ou run SETVIEW S again. Y ou do not need to inc lude this pr ogram f or yo ur aplet to w or k, but it is us eful t o spec ify that the progr am is attached to the aplet , and transmitted whe n the aplet is tr ansmitted. 7 . Return to the pr ogr am catalog. T he pr ograms that y ou cr eated sho uld appear as f ollo ws: 8. Y ou must now th e progr am EXP .S V to ex ecut e the SETVIEWS command and create the modified VIEWS menu . Check that th e name of the ne w aplet is highlight ed in the Aplet view . 9 . Y ou can now r etur n to the Aplet libr ary and pre ss to run y our ne w aplet . Programming commands This section describes th e commands for programming with HP 40gs. You can enter these commands in your program by typing them o r by accessing them from the Commands menu. hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
21-14 Programm ing Aplet commands CHECK Checks (selects) the correspon ding function in the current aplet. For example, Check 3 would check F3 if the current aplet is Function. Then a checkmark would app ear next to F3 in Symbolic view, F3 would be plotted in Plot view, and evaluated in Numeric view. CHECK n : SELECT Selects the named aplet and ma kes it the current aplet. Note: Quotes are needed if th e name contains spaces or other special characters. SELECT apletname : SETVIEWS The SETVIEWS command is used to define entries in the VIEWS menu for aplets that you customize. See âCustomizing an apletâ on page 21-9 for an example of using the SETVIEWS command. When you use the SETVIEWS command, the apletâs standard VIEWS menu is deleted and the customized menu is used in its place. You only need to apply the command to an aplet once. The VIEWS menu changes remain unless you apply the command again. Typically, you develop a progra m that uses the SETVIEWS command only. The command contains a tri o of arguments for each menu option to create, or program to attach. Keep the following points in mind when using this command: ⢠The SETVIEW S command deletes an apletâs standard Vi ew s menu opti ons. If y ou w ant to us e an y of the standar d options on y our reco nfigur ed VIEW S menu , you m ust include them in the c onfi guration . ⢠When y ou inv ok e the SETVIEWS command , the changes to an apletâs VIEW S menu r emain with the aplet . Y ou need to inv ok e the command on the aplet again to change the VIEW S menu . ⢠All the pr ogr ams that are called f rom the VIEW S menu ar e tr ansfer red w hen the a plet is tr ansferr ed, for ex ample to another c alculator or to a PC. ⢠As part of the VIEWS men u configur ation , yo u can spec ify progr ams that you wa nt transfer re d with the aplet , but are not called as menu optio ns. F or ex ample , these can be sub-pr ogr ams that menu hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Programming 21-15 options us e , or the pr ogram that def ines the aplet âs VIEW S menu . ⢠Y ou can inclu de a âStartâ opti on in the VIEW S menu to spec ify a progr am that y ou want to r un automati cally when the aplet s tarts. This pr ogr am typically sets up the apletâs initial configur ation. T he S T ART optio n on the menu is also usef ul for r esetting the aplet . Command syntax The syntax for the command is as follows: SETVIEWS " Pr ompt 1 " ;" Progr amName1 " ; ViewNum be r1 ; " Pr ompt 2 " ;" Progr amName2 " ; ViewNum be r2 : (Y ou can repeat as many Prompt/ProgramName/ ViewNumber tri os of ar guments as y ou lik e.) Within each Prompt/ProgramName/ViewNumber trio, you separate each item with a semi-colon. Prompt Prompt is the text that is displayed for the corresponding entry in the Views menu. Enclose the prompt text in double quotes. Associating prog rams with your apl et If Prompt consists of a single space, then no entry appears in the view menu. The program specified in the ProgramName item is associated with the aplet and transferred whenever the aplet is transmitted. Typically, you do this if you want to transfer the Setviews program with the aplet, or you want to transfer a sub-program that other menu programs use. Auto-run programs If the Prompt item is âStartâ, then the ProgramName program runs whenever you start the aplet. This is useful for setting up a program to co nfigure the aplet. Users can select the Start item from the VIEWS menu to reset the aplet if they change configur ations. You can also define a menu item calle d âResetâ which is auto-run if the user choo ses the button in the APLET view. hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
21-16 Programm ing ProgramName ProgramName is the name of the program that runs when the corresponding menu entry is selected. All programs that are identified in the apletâs SETVIEW S command are transferred when the aplet is transmitted. ViewNumber V iewNumber is the number of a view to start after the program finishes running. For example, if yo u want the menu option to display the Pl ot view when the associated program finishes, you would specify 1 as the ViewNumber value. Including standard menu options To include one of an apletâs standard VIEWS menu options in your customized menu, set up the arguments trio as follows: ⢠The f irst ar gument spec ifi es the menu item name: â Leave the argument empty to use th e standard Vi ew s menu name for the item , or â Enter a menu item name to r eplace the standar d name . ⢠The second argument specif ies the progr am to run: â Leav e the argu ment empty to run the st andard menu option . â Inser t a pr ogram name to run the pr ogram be for e the standar d menu opti on is e xec uted . ⢠The thir d ar gument spec ifies the v ie w and the menu number f or the item. Deter mine the menu number fr om the Vi ew n umbers table belo w . Note: SETVIEW S w ith no ar guments r esets the v ie w s to def ault of the base a plet. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Programming 21-17 View numbers The Function aplet views are numbered as fo llows: View numbers from 15 on will vary according to the parent aplet. The list shown above is for the Function aplet. Whatever the normal VIEWS menu for the parent aplet, the first entry will become number 15, the second number 16 and so on. UNCHECK Unchec ks (unselects) the corresponding function in the current aplet. For example, Uncheck 3 would uncheck F3 if the current aplet is Function. UNCHECK n : Branch commands Branch commands let a program make a decisi on based on the result of one or more tests. Unlike the othe r programming commands, the branch commands work in logical groups. Therefore, the commands are described together rather than each independently. IF...THEN...END Executes a sequence of commands in the true-clause only if the test-clause evaluates t o true. Its sy ntax is: IF test-clause THEN true-clause END 0 1 2 3 4 5 6 7 8 9 10 HOME Plot Symbolic Numeric Plot-Setup Symbolic-Setup Numeric-Setup Views Note Sketch view Aplet Catalog 11 12 13 14 15 16 17 18 19 20 21 List Catalog Matrix Catalog Notepad Catalog Program Catalog Plot-Detail Plot-Table Overlay Plot Auto scale Decimal Integer Trig hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
21-18 Programm ing Example 1 X A : IF A==1 THEN MSGBOX " A EQUALS 1" : END: IF... THEN... ELSE... END Executes the true-clause sequence of commands if the test- clause is true, or the false-clause sequence of commands if the test-clause is false. IF test-clause THEN true-clause ELSE false-clause END Example 1 X A : IF A==1 THEN MSGBOX "A EQUALS 1" : ELSE MSGBOX "A IS NOT EQUAL TO 1" : A 1 X A : END: CASE...END Executes a series of test-clause commands that execute the appropriate tr ue-cl ause sequence of commands. Its syntax is: CASE IF test-clause 1 THEN true-clause 1 END IF test-clause 2 THEN true-clause 2 END . . . IF test-clause n THEN true-claus e n END END: When CASE is executed, test -clause 1 is evaluated. If the test is true, true-clause 1 is executed, and execution skips to END. If test-clause 1 if false, execution proceeds to test- clause 2 . Execution with the CASE structure continues until a true-clause is executed (o r until all the test-clauses evaluate to false). IFERR... THEN... ELSE⦠END... Many conditions are automati cally recognized by the HP 40gs as error conditions and are automatically treated as errors in programs. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Programming 21-19 IFERR...THEN...ELSE...END allows a program to intercept error conditions that otherwise would cause the program to abort. Its syntax is: IFERR tr ap-claus e THEN clause_1 ELSE clause_ 2 END : Example IFERR 60/X X Y: THEN MSGBOX "Error: X is zero.": ELSE MSGBOX "Value is "Y: END: RUN Runs the named program. If your program name contai ns special characters, such as a space, then you must enclose the file name in double quotes (" "). RUN " pr ogram name " : or RUN progr amname : STOP Stops the current program. STOP : Drawing commands The drawing commands act on the display. The scale of the display depends on the current aplet's Xmin, Xmax, Ymin, and Ymax values. The following examples assume the HP 40gs default settings with the Function aplet as the current aplet. ARC Draws a circular arc, of give n radius, whose centre is at (x,y) The arc is drawn from start_angle_measurement to end_angle_measurement . ARC x;y; radius ; start_angle_measurement ; end_angle_measurement : hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
21-20 Programm ing Example ARC 0;0;2;0;2 Ï : FREEZE: Dra w s a c irc le cente red at (0, 0) of r adius 2 . The FREEZE command causes the cir c le to remain display ed on the screen until yo u press a k ey . BOX Draws a box with diagonally opposite corners ( x1,y1 ) and ( x2,y2 ). BOX x1 ; y1; x2; y2: Example BOX -1;-1;1;1: FREEZE: Dra w s a bo x, lo w er corner at (â1,â1), upper corner at (1,1) ERASE Clears the display ERASE: FREEZE Halts the program, freezing the current display. Execution resumes when any key is pressed. LINE Draws a line from (x1, y1) to ( x2, y2 ) . LINE x1; y 1; x2 ; y 2: PIXOFF Turns off the pixel at the specified coordinates (x,y) . PIXOFF x;y : PIXON Turns on the pixel at the specified coordinates (x,y) . PIXON x;y : TLINE Toggles the pixels along the line from (x1, y1) to ( x2, y2) on and off. Any pixel that was turned off, is turned on; any pixel that was turned on, is turned off. TLINE can be used to erase a line. TLINE x1 ; y1 ; x2 ; y2: hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Programming 21-21 Example TLINE 0;0;3;3: Era ses pr ev iously dr a wn 4 5 degr ee line fr om (0, 0) to (3, 3), or draw s that line if it doesn ât alread y e xist . Graphic commands The graphic commands use th e graphics variables G0 through G9âor the Page variable from Sketchâas graphicname arguments. The position argument takes the form ( x,y ). Position coordinates depend on the c urrent apletâs scale, which is specified by Xmin, Xmax, Ymin, and Ymax. The upper left corn er of the target graphic ( graphic2 ) is at (Xmin,Ymax). You can capture the current display and store it in G0 by simultaneously pressing . DISPLAY â Stor es the curr ent display in graphicname . DISPLAY â gr aphicname : â DISPLAY Displays graphic from graphicname in the display. â DISPLAY gr aphicname : â GROB Creates a graphic from expr ession , using font_size , and stores the resulting graphic in graphicname . Font sizes are 1, 2, or 3. If the fontsize argument is 0, the HP 40gs creates a graphic display li ke that created by the SHOW operation. â GROB gr aphicname ; exp re ss io n ; font s iz e : GROBNOT Replaces graphic in graphicname with bitwise-inverted graphic. GROBNOT gr aphicname : GROBOR Using the logical OR, superimposes graphicname2 onto graphicname1 . The upper left corner of graphicname2 is placed at position . GROBOR gr aphicname1 ; ( posi tion) ; gra phicname2 : where position is expressed in terms of the current axes settings, not in terms of pixel postion. hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
21-22 Programm ing GROBXOR Using the logical XOR, superimposes graphicname2 onto graphicname1 . The upper left corner of graphicname2 is placed at position . GROBXOR gra phicname1 ; ( posi tion ) ; gra phicname2 : MAKEGROB Creates graphic with given width, height, and hexadecimal data, and stores it in graphicname . MAKEGROB gr aphicname ; wid t h ; height ; hexdata : PLOT â Stores the Plot view display as a graphic in graphicname . PLOT â graphicname : PLOT â and DISPLAY â can be used to transfer a copy of the current PLOT view into the sketch view of the aplet for later use and editing. Example 1 X PageNum: PLOT â Page: â DISPLAY Page: FREEZE: This program stores the current PLOT view to the first page in the sketch view of the current aplet and then displays the sketch as a gr aphic ob ject until any key is pressed. â PLOT Puts graph from gr aphicname into the Plot view display. â PLOT graphicname : REPLACE Replaces portion of graphic in graph icname1 with graphicname2 , s tarting at position . REPLACE also works for lists and matrices. REPLACE gra phicname1 ; ( posi tion ) ; gra phicname2 : SUB Extracts a portion of the named graphic (or list or matrix), and stores it in a new variable, name . The portion is specified by position and positions. SUB name ; graphi cname ; ( position ) ; ( positions) : ZEROGROB Creates a blank graphic with given width and height , and stores it in graphicname . ZEROGROB gr aphicname ; wid t h ; height : hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Programming 21-23 Loop commands Loop hp allow a program to execute a routine repeatedly. The HP 40gs has three loop structures. The example programs below illustrate each of these structures incrementing the variable A from 1 to 12. DOâ¦UNTIL â¦E ND Do ... Until ... End is a loop command that executes the loop-clause repeatedly until test-clause returns a true (nonzero) result. Because the test is executed after the loop-clause, the loop-clause is always executed at least once. Its syntax is: DO loop-clau se UNTIL test-clause END 1 X A: DO A 1 X A: DISP 3;A: UNTIL A = = 12 END: WHILE⦠REPEAT⦠END While ... Repeat ... End is a loop command that repeatedly evaluates test-clause and executes loop-clause sequence if the test is true. Because the test-clause is executed before the loop-clause, the loop-clause i s not executed if the test is initially false. Its syntax is : WHILE test-clause REPEAT loop-clau se END 1 X A: WHILE A < 12 REPEAT A 1 X A: DISP 3;A: END: FORâ¦TOâ¦STEP ...END FOR name = start -expr ession TO end-e xpressi on [STEP incr ement ]; loop-clau se END FOR A=1 TO 12 STEP 1; DISP 3;A: END: Note that the STEP parameter is optional. If it is omitted, a step value of 1 is assumed. BREAK Terminates loop. BREAK: hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
21-24 Programm ing Matrix commands The matrix commands take variables M0âM9 as arguments. ADDCOL Add Column. Inserts values into a column before column_number in the specified matrix . You enter the values as a vector. The values must be separated by commas and the number of valu es must be the same as the number of rows in the matrix name . ADDCOL name ;[ va lu e 1 ,...,value n ]; column_number : ADDROW Add Row. Inserts values into a row befo re row_number in the specified matrix. You enter the values as a vector. The values must b e separate d by commas and the number of values must be the same as the number of columns in the matrix name . ADDROW name ;[ va lu e 1 ,..., val u e n ]; ro w_number : DELCOL Delete Column. Deletes the specified co lumn from the specified matrix . DELCOL name ; c olumn_number : DELROW Delete Row. Deletes the specified row from the specified matrix. DELROW name ; row _ n u m b e r : EDITMAT Starts the Matrix Editor and displays the s pecified matrix. If used in programming, returns to the program when user presses . EDITMAT name : RANDMAT Creates random matrix with a specified number of rows and columns and stores the result in name ( name must be M0...M9 ). The entries will be integers ranging from â9 to 9. RANDMAT name ; rows ; columns : REDIM Redimensio ns the specified matrix or vector to size . For a matrix, size is a list of two integers {n1,n2} . For a vector, size is a list containing one integer {n} . REDIM name ; siz e : hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Programming 21-25 REPLACE Replaces portion of a matrix or vector stored in name with an object starting at position start . start for a matrix is a list containing two numbers; for a vector, it is a single number. Replace also works with lists and graphics. REPLACE name ; star t ; object : SCALE Multiplies the specified row_number of the specified matrix by value . SCALE name ; va lu e ; rown u mb e r : SCALEADD Multiplies the row of the matrix name by value , then adds this result to the second specified row. SCALEADD name ; va lu e ; row 1 ; row 2 : SUB Extracts a sub-objectâ a portion of a list, matrix, or graphic from obj ect âand stores it into name . start and end are each specified using a list with two numbers for a matrix, a number for vector or li sts, or an ordered pair, ( X,Y ), for graphics. SUB name ; object ; sta rt ; end : SWAPCOL Swaps Columns. Exchanges column1 and co lumn2 of the specified matrix . SWAPCOL name ; column1 ; column2 : SWAPROW Swap Rows. Exchanges row1 and row2 in the specified matrix . SWAPROW name ; row 1 ; row 2 : Print commands These commands print to an HP infrared printer , for example the HP 82240B pri nter. PRDISPLAY Prints the contents of the display. PRDISPLAY: PRHISTORY Prints all objects in the history. PRHISTORY: hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
21-26 Programm ing PRVAR Prints name and contents o f variablename . PRVAR var iablename : You can also use the PRVAR command to print th e contents of a program or a note. PRVAR progr amname ;PROG: PRVAR notename ; NOTE: Prompt commands BEEP Beeps at the frequency and for the time you specify. BEEP frequen cy ; se conds : CHOOSE Creates a choose box, which is a box containing a list of options from which the user choo ses one. Each option is numbered, 1 through n . The result of the choose command is to store the number of the option chosen in a variable. The syntax is: CHOOSE var iable_name ; title ; option 1 ; option 2 ; ... option n : where variable_name is the name of a variable for storing a default option number, title is the text displaye d in the title bar of the choose box, and option 1 ...option n are the options listed in the choose box. By pre-storing a value into variable_name you can specify the default option number, as shown in the example below. Example 3 X A:CHOOSE A; "COMIC STRIPS"; "DILBERT"; "CALVIN&HOBBES"; "BLONDIE": CLRVAR Clears the specified variable. The syntax is: CLRV AR va ria bl e : hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Programming 21-27 Example If you have stored {1,2,3,4} in variable L1, entering CLVAR L1 w ill clear L1. DISP Dis plays textitem in a row of the display at the line_number . A text item consists of any number of expressions and quoted strings of text. The expressions are evaluated and turned into strings. Lines are numbered from the top of the screen, 1 being the top and 7 being the bottom. DISP line_numbe r ; textitem : Example DISP 3;"A is" 2 2 Res ul t : A is 4 (display ed on line 3) DISPXY Disp lays object at position ( x_pos , y_pos ) in size font . The syntax is: DISPXY x_po s ; y_pos ; font ; object : The value of object can be a text string, a variable, or a combination of both. x_pos and y_pos are r elati v e to the cu rr ent settings of Xmin, Xmax , Ymin and Ymax (w hich yo u set in t he PL OT SETUP v iew). The value of fo nt is either 1 (small) or 2 (large). Example DISPXY â3.5;1.5;2;"HELLO WORLD": DISPTIME Displays the current date and time. DISPTIME To set the date and time, simply store the correct settings in the date and time variable s. Use the following formats: M.DDYYYY for the date and H.MMSS for the time. hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
21-28 Programm ing Examples 5.152000 X DATE( sets the date to May 15, 2000) . 10.1500 X TIME (sets the time to 10:15 am). EDITMAT Matrix Editor. Opens the Matr ix editor for the specified matrix. Returns to the program when user presses EDITMAT matr ixname : The EDITMAT command can also be used to create matrices. 1. Pres s CMDS 2. P r e s s M 1, and then pr ess . The Matr i x catalog opens w ith M1 av ailable for editing. EDITMAT matrixname is an alternative to opening the matrix editor with matrixname . It can be used in a program to enter a matrix. FREEZE This command prevents the display from being updated after the program runs. This allows you to view the graphics created by the program. Cancel FREEZE by pressing any key. FREEZE: GETKEY Waits for a key, then stores the keycode rc.p in name, where r is row number, c is column number, and p is key- plane number. The key-planes numbers are: 1 for unshifted; 2 for shifted; 4 for alpha-shifted; and 5 for both alpha-shifted and shifted. GETKEY name : INPUT Creates an input form with a title bar and one field. The field has a label and a default value. There is text help at the bottom of the form. The user enters a value and presses the menu key. The value that the user enters is stored in the variable name . The title , label , and help items are text strings and need to be e nclosed in double quotes. Use CHARS to type th e quote mark s " ". INPUT name ; title , label ; help ; default : hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Programming 21-29 Example INPUT R; "Circular Area"; "Radius"; "Enter Number";1: MSGBOX Displays a mess age box containing textitem. A text ite m consists of any number of expressions and quoted strings of text. The expressions are evaluate d and turned into strings of text. For example , "AREA IS:" 2 2 becomes AREA IS: 4 . Use CHARS to type the quote marks " ". MSGBOX textitem : Example 1 X A: MSGBOX "AREA IS: " Ï*A^2: You can also use the NoteText variable to provide text arguments. This can be used to insert line breaks. For example, press NOTE and type AREA IS . The position line MSGBOX NoteText " " Ï*A^2: will display the same message box as the previous example. PROMPT Displays an inpu t box with name as the title, and prompts for a value for name . name can be a vari able such as Aâ¦Z, θ , L1â¦L9, C1â¦C9 or Z1â¦Z9.. PROMPT name : WAIT Halts program execution for the specified number of seconds. WAIT seconds : Stat-One and Stat-Two commands The following commands are used for analyzing one- variable and two-variab le statistical data. hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
21-30 Programm ing Stat-One commands DO1VSTATS Calculates STATS using datasetname and stores the results in the corresponding variables: N Σ , Tot Σ , Mean Σ , PVar Σ , SVar Σ , PSDev, SSDev, Min Σ , Q1, Median, Q3, and Max Σ . Datasetname can be H1, H2, ..., or H5. Datasetname must include at least two data points. DO1VSTATS datase tname : SETFREQ Sets datasetname frequency a ccording to column or value. Datasetname can be H1, H2,..., or H5, column can be C0âC9 and value can be any positive integer. SETFREQ datas etname ; column : or SETFREQ def inition ; va l u e : SETSAMPLE Sets datasetname sample according to column. Datasetname can be H1âH5, and column can be COâC9. SETSAMPLE datase tname ; column : Stat-Two commands DO2VSTATS Calculates STATS using datasetname and stores the results in corresponding variables: MeanX, Σ X, Σ X2, MeanY, Σ Y, ΣY2, Σ XY, Corr, PCov, SCov, and R ELERR. Datasetname can be SI, S2,..., or S5. Datasetname must include at least two pairs of data points. DO2VSTATS datase tname : SETDEPEND Sets datasetname dependent column . Datasetname can be S1, S2, â¦, or S5 and column can be C0âC9. SETDEPEND datase tname ; column : SETINDEP Sets datasetname independen t column . Datasetname can be S1, S2,â¦, or S5 and column can be C0âC9. SETINDEP datas etname ; column : hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Programming 21-31 Storing and retrieving variables in programs The HP 40gs has both Ho me variables and Aplet variables. Home variables ar e used for real numbers, complex numbers, graphics, lists, and matrices. Home variables keep the same values in HOME and in aplets. Aplet variables are those whose values depend on the current aplet. The aplet variables are used in programming to emulate the definitions and settings you make when working with aplets interactively. You use the Variable menu ( ) to retrieve either Home variables or aplet vari ables. See âThe VARS menuâ on page 17-4. Not all var iables are available in ev ery aplet. S1fitâS5fit, for example, are only available in the Sta ti st ics ap le t. Und er ea ch var ia bl e na me is a l ist of th e aplets where the variable can be used. Plot-view variables Area Function Contains the last value found by the Area function in Plot- FCN menu. Axes All Aplets Turns axes on or off. From Plot Setup, check (or uncheck) AXES . or In a program, type: 1 X Axes âto turn ax es on (def ault). 0 X Axes âto turn ax es o ff . Connect Function Parametric Polar Solve Statistics Draws lines between successively plotted points. From Plot Setup, check (or uncheck) CONNECT . or In a program, type 1 X Connect â to connect plotted points (de fault , ex cept in Statisti cs wher e the defa ult is off). 0 X Connect â not to connect plotted points . hp40g .book Page 31 Friday, December 9, 2005 1:03 AM
21-32 Programm ing Coord Function Parametric Polar Sequence Solve Statistics Turns the coordinate-display mode in Plot view on o r off. From Plot view, use the Menu mean key to toggle coordinate display on an off. In a program, type 1 X Coord âto turn coor dinate displa y on (defa ult) . 0 X Coord âto turn coor dinate display off . Extremum Function Contains the last value foun d by the Extremum operation in the Plot-FCN menu. FastRes Function Solve Toggles resolution between plotting in every other column (faster), or plotting in every column (more detail). From Plot Setup, choose Faster or Mo re Detail. or In a program, type 1 X FastRes âfor faster . 0 X FastRes âfor mor e detail (def ault). Grid All Aplets Turns the background grid in Plot view on or off. From Plot setup, check (or uncheck) GRID . or In a program, type 1 X Grid to turn the gr id on . 0 X Grid to turn the gr id o ff (defau lt) . Hmin/Hmax Statistics Defines minimum and maximum values for histogram bars. From Plot Setup for one-variab le statistics, set values for HRNG . or In a program, type X Hmin X Hmax whe re n 1 n 2 n 2 n 1 > hp40g .book Page 32 Friday, December 9, 2005 1:03 AM
Programming 21-33 Hwidth Statistics Sets the width of histogram bars. From Plot Setup in 1VAR stats set a value for Hwidth or In a program, type n X Hwidth Indep All Aplets Defines the value of the independent variable used in tracing mode. In a program, type n X Indep InvCross All Aplets Toggles between solid crosshai rs or inverted crosshairs. (Inverted is useful if the background is solid). From Plot Setup, check (or uncheck) InvCross or In a program, type: 1 X InvCross âto in vert the cr os shairs . 0 X InvCross âfo r solid cr osshairs (def ault) . Isect Function Contains the last value found by the Intersection function in the Plot-FCN menu. Labels All Aplets Draws labels in Plot view showing X and Y ranges. From Plot Setup, check (or uncheck) Labels or In a program, type 1 X Labels âto turn labe ls on. 0 X Labels âto turn labe ls off (defa ult) . hp40g .book Page 33 Friday, December 9, 2005 1:03 AM
21-34 Programm ing Nmin / Nmax Sequence Defines the minimum and maxi mum independent variable values. Appears as the NRNG fields in the Plot Setup input form. From Plot Setup, enter values for NRNG . or In a program, type X Nmin X Nmax whe re Recenter All Aplets Recenters at the crosshairs locations when zooming. From Plot-Zoom-Set Factors, c heck (or uncheck) Recenter or In a program, type 1 X Recenter â to turn r ecenter on (defa ult). 0 X Recenter âto turn r ecente r off . Root Function Contains the last value found by the Root function in the Plot-FCN menu. S1markâS5mark Statistics Sets the mark to use for scatter plots. From Plot Setup for two-variable statistics, S1mark- S5mark , then choose a mark. or In a program, type n X S1mark whe re n is 1,2,3,...5 SeqPlot Sequence Enables you to choose types of sequ ence plot: Stairstep or Cobweb. From Plot Setup, select SeqPlot , then choose Stairstep or Cobweb . or In a program, type 1 X SeqPlot âfor Stairstep. 2 X SeqPlot âfor Cobw eb. n 1 n 2 n 2 n 1 > hp40g .book Page 34 Friday, December 9, 2005 1:03 AM
Programming 21-35 Simult Function Parametric Polar Sequence Enables you to choose between simultaneous and sequential graphing of all selected expressions. From Plot Setup, check (or uncheck) _ SIMULT or In a program, type 1 X Simult âfo r simultaneous gr aphing (defa ult). 0 X Simult âfo r sequenti al gra phing. Slope Function Contains the last value found by the Slope function in the Plot-FCN menu. StatPlot Statistics Enables you to choose types of 1-variable statistics plot between Histogram or Box-and-Whisker. From Plot Setup, select StatPlot , then choose Histogram or BoxWhisker . or In a program, type 1 X StatPlot âfor Histogram. 2 X StatPlot âfor Box-and-Whisker. Umin/Umax Polar Sets the minimum and maxi mum independent values. Appears as the URNG field in the Plot Setup input form. From the Plot Setup input form, enter values for URNG . or In a program, type X Umin X Umax whe re Ustep Polar Sets the step size for an independent variable. From the Plot Setup input form, enter values for USTEP . or In a program, type n X Ustep whe re n 1 n 2 n 2 n 1 > n 0 > hp40g .book Page 35 Friday, December 9, 2005 1:03 AM
21-36 Programm ing Tmin / Tmax Parametric Sets the minimum and maxi mum independent variable values. Appears as the TRNG field in the Plot S etup input form. From Plot Setup, enter values for TRNG . or In a pr ogram , type X Tmin X Tmax wher e Tracing All Aplets Turns the tracing mode on or off in Plot view. In a program, type 1 X Tracing âto turn T rac ing mode on (default). 0 X Tracing âto turn T rac ing mode off. Tstep Parametric Sets the step size for the independent variable. From the Plot Setup input form, enter values for TSTEP . or In a program, type n X Tstep wher e Xcross All Aplets Sets the horizontal coordinate of the crosshai rs. Only works with TRACE off. In a program, type n X Xcross Ycross All Aplets Sets the vertical coordinate of the crosshairs. Only works with TRACE off. In a program, type n X Ycross n 1 n 2 n 2 n 1 > n 0 > hp40g .book Page 36 Friday, December 9, 2005 1:03 AM
Programming 21-37 Xtick AAll Aplets Sets the distance between tick marks for the horizontal axis. From the Plot Setup input form, enter a value for Xtick . or In a program, type n X Xtick whe re Ytick All Aplets Sets the distance between tick marks for the vertical axis. From the Plot Setup input form, enter a value for Ytick . or In a program, type n X Ytick whe re Xmin / Xmax All Aplets Sets the minimum and maximum horizontal values of the plot screen. Appears as the XRNG fields (horizontal range) in the Plot Setup input form. From Plot Setup, enter values for XRNG . or In a program, type X Xmin X Xmax whe re Ymin / Ymax All Aplets Sets the minimum and maximum vertical values of the plot screen. Appears as the YRNG fields (vertical range) in the Plot Setup input form. From Plot Setup, enter the values for YRNG . or In a program, type X Ymin X Ymax whe re n 0 > n 0 > n 1 n 2 n 2 n 1 > n 1 n 2 n 2 n 1 > hp40g .book Page 37 Friday, December 9, 2005 1:03 AM
21-38 Programm ing Xzoom All Aplets Sets the horizontal zoom factor. From Plot-ZOOM-Set Factors, enter the value for XZOOM . or In a program, type n X XZOOM wher e The default value is 4. Yzoom All Aplets Sets the vertical zoom factor. From Plot-ZOOM-Set Factors, enter the value for YZOOM . or In a program, type n X YZOOM The default value is 4. Symbolic-view variables Angle All Aplets Sets the angle mode. From Symbolic Setup, choose Degrees, Radians , or Grads for angle measure. or In a program, type 1 X Angle âfor Degrees. 2 X Angle âfor Radians. 3 X Angle âfor Grads. F1...F9, F0 Function Can contain any expression. Independent vari able is X . Example 'SIN( X)' X F1( X ) You must put single quotes ar ound an expression to keep it from being evaluated before it is stored. Use CHARS to type the single quote mark. n 0 > hp40g .book Page 38 Friday, December 9, 2005 1:03 AM
Programming 21-39 X1, Y1...X9,Y9 X0,Y0 Parametric Can contain any expression. Independent variable is T. Example 'SIN(4*T)' X Y1(T):'2*SIN(6*T)' X X1(T) R1...R9, R0 Polar Can contain any expression. Independent variable is θ . Example '2*SIN(2* θ)' X R1( θ ) U1...U9, U0 Sequence Can contain any expression. Independent variable is N. Example RECURSE (U,U(N-1)*N,1,2) X U1(N) E1...E9, E0 Solve Can contain any equation or expression. Independent variable is selected by high lighting it in Numeric View. Example 'X Y*X-2=Y' X E1 S1fit...S5fit Statistics Sets the type of fit to be used by the FIT operation in drawing the regression line. From Symbolic Se tup view, spec ify the fit in the field for S1FIT, S2FIT, etc. or In a program, store one of the following constant numbers or names into a variable S1fit, S2fit , etc. 1 Linear 2 LogFit 3 ExpFit 4 Power 5 QuadFit 6 Cubic 7 Logist 8 ExptFit 9 TrigFit 10 User hp40g .book Page 39 Friday, December 9, 2005 1:03 AM
21-40 Programm ing Example Cubic X S2fit or 6 X S2fit Numeric-view variables The following aplet variable s control the Numeric view. The value of the variable applies to the current aplet only. C1...C9, C0 Statistics C0 through C9 , for columns of data. Can contain lists. Enter data in the Numeric view or In a program, type LIST X C n wher e n = 0, 1, 2, 3 ... 9 Digits All Aplets Number of decimal places to use for Number format in the HOME view and for labeling axes in the Plot view. From the Modes view, enter a value in the second field of Number Format . or In a program, type n X Digits wher e Format All Aplets Defines the number display format to use for numeric format on the HOME view and for labeling axes in the Plot view. From the Modes view, choose Standard , Fixed , Scientific , Engineering, Fraction or Mixed Fraction in the Number Format field. or In a program, store the constant number (or its name) into the variable Format . 0 n 11 << hp40g .book Page 40 Friday, December 9, 2005 1:03 AM
Programming 21-41 1 Standard 2 Fixed 3 Sci 4 Eng 5 Fraction 6 MixFraction Note: if Fraction or Mixed Fracti on is chosen, the setting will be disregarded when labeling axes in the Plot view. A setting of Scientific will be used instead. Example Scientific X Format or 3 X Format NumCol All Aplets except Statistics aplet Sets the column to be highlighted in Numeric view. In a program, type n X NumCol where n can be 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 . NumFont Function Parametric Polar Sequence Statistics Enables you to choose the font size in Numeric view. Does not appear in the Num Setup input form. Corresponds to the key in Numeric view. In a program, type 0 X NumFont for small (de fault). 1 X NumFont for big. NumIndep Function Parametric Polar Sequence Specifies the list of independent values to be used by Build Your Own Table. In a program, type LIST X NumIndep NumRow All Aplets except Statistics aplet Sets the row to be highlighted in Numeric view. In a program, type n X NumRow whe re n 0 > hp40g .book Page 41 Friday, December 9, 2005 1:03 AM
21-42 Programm ing NumStart Function Parametric Polar Sequence Sets the starting value for a table in Numeric view. From Num Setup, enter a value for NUMSTART . or In a program, type n X NumStart NumStep Function Parametric Polar Sequence Sets the step size (increment value) for an independ ent variable in Numeric view. From Num Setup, enter a value for NUMSTEP . or In a program, type n X NumStep whe re NumType Function Parametric Polar Sequence Sets the table format. From Num Setup, choose Automatic or Build Your Own . or In a program, type 0 X NumType for B u il d Y o ur Own. 1 X NumType for A utomati c (default). NumZoom Function Parametric Polar Sequence Sets the zoom factor in the Numeric view. From Num Setup, type in a value for NUMZOOM . or In a program, type n X NumZoom whe re StatMode Statistics Enables you to choose between 1- variable and 2-va riable statistics in the Statistics aplet. Does not appear in the Plot Setup input form. Corresponds to the and menu keys in Numeric View. In a program, store the constant name (or its number) into the variable StatMode. 1VAR = 1 , 2VAR = 2. n 0 > n 0 > hp40g .book Page 42 Friday, December 9, 2005 1:03 AM
Programming 21-43 Example 1VAR X StatMode or 1 X StatMode Note variables The following aplet variable is availa ble in Note view. NoteText All Aplets Use NoteText to recall text previously entered in Note view. Sketch variables The following aplet variables are available in Sketch view. Page All Aplets Sets a pa ge in a sketch set. The graphics can be viewed one at a time using the and keys. The Page variable refers to the currently displayed page of a sketch set. In a program, type gra phicname X Page PageNum All Aplets Sets a number for referring to a particular page of the sketch set (in Sketch view). In a program, type the page that is shown when SKETCH is pressed. n X PageNum hp40g .book Page 43 Friday, December 9, 2005 1:03 AM
hp40g .book Page 44 Friday, December 9, 2005 1:03 AM
Extending aplets 22-1 22 Extending aplets Aplets are the application environments where you explore different classes of m athematical operations. You can extend the capabili ty of the HP 40gs i n the following ways: ⢠Creat e new aplets , based on ex isting aplets, with spec ifi c confi gurati ons suc h as angle measur e, gra phical or tabular settings, and annota tions . ⢠T ransmit aplets between HP 40gs calc ulators v ia a ser ial o r USB cable . ⢠Dow nload e-lessons (teaching a plets) fr om Hew lett-P ack ar dâs Calculator w eb site . ⢠Progr am ne w aplets. See c hapter 21, âPr ogramming â, f or further details. Creating new aplets based on existing aplets You can create a new aplet ba sed on an existing aplet. To create a new aplet, save an existing aplet under a new name, then modify the aplet to add the configurations and the functionality that you want. Information that defines an aplet is saved a utomatically as it is entered into the calculator. To keep as much memory available for storage as possible, delete any aplets you no longer need. Example This example demonstrates how to create a new aplet by saving a copy of the built- in Solve aplet. The new aplet is saved under the name âTRIANG LESâ and contains the formulas commonly used in calculations i nvolving right-angled triangles. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
22-2 Ext ending aplets 1. Open the Solve aplet and sav e it under th e new name . Solve | T R I A N G L E S 2 . Ent er th e fou r fo rmu la s: θ O H θ A H θ OA AB C 3 . Deci de whether y ou w ant the aplet to oper ate in Degree s, R adians, or Gr ads. MODES Degrees 4. Vi ew the A plet L ibrary . The â TRIANGLE Sâ aplet is listed in the Aplet Libr ary . The So lv e aplet can no w be re set and used for other problems . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Extending aplets 22-3 Using a customized aplet To use the âTrianglesâ aplet, simply select the appropria te formula, change to the Numeric view and solve for the missing variable. Find the length of a ladder leaning against a vertical wall if it forms an angle of 35 o with the horizontal and extends 5 metres up the wall. 1. Select the a plet. TRIANGLES 2 . Choo se the sine for mula in E1. 3 . Change to the Numer ic view a n d e n te r t h e kno wn values . 35 5 4. Solv e for the missing val u e. The le ngth of the ladder is appro x imately 8.7 2 metres Resetting an aplet Resetting an aplet clears all data and resets all default settings. To reset an aplet, open the Library, select the aplet and press . You can only reset an aplet tha t is based on a built-in aplet if the programmer who created it has pr ovided a Reset option. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
22-4 Ext ending aplets Annotating an aplet with notes The Note view ( NOTE ) attaches a note to the current aplet. See Chapter 2 0, âNotes and sketchesâ . Annotating an aplet with sketches The Sketch view ( SKETCH ) attaches a picture to the current aplet. See chapter 20, âNotes and sketchesâ. HINT Notes and sketches that you attach to an aplet b ecome part of the aplet. When y ou transf er the aplet to another calculator , the associ ated note a nd sketch ar e transferr ed as well. Downloading e-lessons from the web In addition to the standard aplets that come with the calculator, you can download aplets from the world wide web. For example, Hewlett-Packardâs Calculators web site contains aplets that de monstrate certain mathematical concepts. Note that you need the Graphing Calculator Connectivity Kit in order to load aplets from a PC. Hewlett-Packardâs Calculators web site c an be found at: http://www.hp.com/calculators Sending and receiving aplets A convenient way to distribute or share problems in class and to turn in homework is to transmit (copy) aplets d i r e c t l y f r o m o n e H P 4 0 g s t o a n o t h e r . T h i s c a n t a k e p l a c e via a suitable cable. ( You can use a serial cable with a 4-pin mini-USB connector, which plugs i nto the RS232 port on the calculator. The ser ial cable is available as a separate accessory.) You can also send aplets to, and receive aplets from, a PC. This requires special softwa re running on the PC (such as the PC Connectivity Kit). A USB cable with a 5-pin mini- USB connector is provided with the hp40gs for connecting with a PC. It plugs into the USB port on the calculator. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Extending aplets 22-5 To transmit an aplet 1. Connec t the PC o r aplet disk dr iv e to the calc ulator b y an appropr iate cable. 2 . Sending calc ulator : Open the L ibr ary , highli ght the aplet to send , and pres s . â Th e SEND TO menu appears w ith the follo w ing options: HP39/40 (USB) = to send via the U SB port HP39/40 (SER) = to send via the RS2 3 2 serial port USB DISK DRIVE = to send to a disk dri ve v ia the U SB port SER. DISK DRIVE = to send to a disk dr iv e v ia the RS 232 s e r i a l p o r t Note : ch oose a disk dr iv e option if y ou are using the hp40gs co nnecti vity kit to tr ansfer the aplet. Highli ght yo ur selecti on and pres s . â If transmitting to a disk dri v e, y ou ha ve the options o f sending to the c urr ent (de fault) directory or to another directory . 3 . Rece iv ing calculator : Open the aplet library and pres s . â Th e RECEIVE FROM menu appears w ith the follow ing options: HP39/40 (USB) = to rece iv e vi a the USB port HP39/40 (SER) = to recei v e via the R S2 3 2 serial po rt USB DISK DRIVE = to recei ve fr om a disk dri ve v ia the USB po r t SER. DISK DRIVE = to r ecei ve f r om a disk dri v e vi a the RS 232 s e r i a l p o r t Note : ch oose a disk dr iv e option if y ou are using the hp40gs co nnecti vity kit to tr ansfer the aplet. Highli ght yo ur selecti on and pres s . The T ransmit annunciatorâ âis display ed until transmissi on is complete . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
22-6 Ext ending aplets If you are using the PC Connectivity Kit to download aplets from a PC, you will see a list of aplets in the PCâs current directory. Check as ma ny items a s you would li ke to receive. Sorting items in the aplet library menu list Once you have entered information into an aplet, you have defined a new version of an aplet. The information is automatically saved under the current aplet name, such as âFunction.â To create additional aplets of the same type, you must give the current aplet a new name. The advantage of storing an ap let is to allow you to keep a copy of a working environment for later use. The aplet library is where you go to manage your aplets. Press . Highlight (using the arrow keys) the name of the aplet you want to act on. To sort the aplet list In the aplet library, press . Select the sorting scheme and press . ⢠Chronologically pr oduces a chr onological order based on the date an aplet w as last us ed. (T he last- used aplet appe ars first , and so on.) ⢠Alphabetically pr oduces an alphabetical order by a plet name. To delete an aplet You cannot delete a built-in aplet. You can only clear its data and reset its default settings. To delete a customized aplet, open the aplet library, highlight the aplet to be deleted, and press . To delete all custom aplets, press CLEAR . hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
R-1 R Re ference inf ormation Glossary aplet A small application, limited to one topic. The built-in aplet types are Function, Parametric, Polar, Sequence, Solve, Statistics, Inference, Finance, Trig Explorer, Quad Explorer, Linear Explorer and Triangle Solve. An aplet can be filled with the data and solutions for a specific problem. It is reusable (like a program, but easier to use) and it records all your settings and definitions. command An oper ation for use in programs. Commands can store results in variables, but do no t display re sults. Arguments are separated by semi- colons, such as DISP expression ; line# . expression A number, variable, or algebraic expression (numbers plus functions) that produces a value. function An operation, possibly with arguments, that returns a result. It does not store results in variables. The arguments must be enclosed in parentheses and separated with commas (or periods in Comma mode), such as CROSS ( matrix1,matrix2 ). HOME The basic starting point of the calculator. Go to HOME to do calculations. Library For aplet management: to start, save, reset, send and receive aplets. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
R-2 list A set of values separated by commas (periods if the Decimal Mark mode is set to Comma ) and enclosed in braces. Lists are commonly used to enter statistical data and to evaluate a function with multiple values. Created and manipulated by the List editor and catalog. matrix A two-dimensional array of values separated by commas (periods if the Decimal Mark mode is set to Comma ) and enclosed in nested brackets. Created and manipulated by the Matrix catalog and editor. Vectors are also handled by the Matrix catalog and editor. menu A choice of options given in the display. It can appear as a list or as a set of menu-key labels across the bottom of the display. menu keys The top row of keys. Their operatio ns depend on the current context. The labels along the bottom of the display show the current meanings. note Text that you write in the Notepad or in the Note view for a specific aplet. program A reusable set of instructions that you record using the Program editor. sketch A drawing that you make in the Sketch view for a specific aplet. variable The name of a number, list, matrix, note, or graphic that is stored in memory. Use to store and use to retrieve. vector A one-dimensional array of values separated by commas (periods if the Decimal Mark mode is set to Comma ) and enclosed in single brackets. Created and manipulated by the Matrix catalog and editor. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
R-3 Resetting the HP 40gs If the calculator âlocks upâ and seems to be stuck, you must reset it. This is much like resetting a PC. It cancels certain operations, restores ce rtain conditions, and clears temporary memory locations. However, it does not clear stored data (variables, aplet datab ases, programs) unless you use th e procedur e, âTo erase all memory an d reset defaultsâ. To reset using the keyboard Press and hold the key and the third menu key simultaneously, then release them. If the calcu lator does no t respond to the above key sequence, then: 1. T urn the calculator o ver and locate the small hole in the back o f the calculato r . 2 . Insert the end of a straightened metal paper clip into the hole as f ar as it will go . Hold it ther e fo r 1 second , then remo ve it . 3 . Pr ess If necessary , press and the fir st and last menu k e ys simultaneousl y . (Note: This w ill er ase y our calculat or memory .) To erase all memory and reset defaults If the calculator does not respond to the above resetting procedures, you might need to restart it by erasing all of memory. You will lose everything you have stored. All factory-default settings are restored. 1. Pr ess and hold the ke y , the firs t menu k ey , and the last menu ke y simultaneously . 2 . Re lease all k ey s in the r ev erse or der . Note: T o cancel this process , relea se only the top-r ow k ey s, then pr es s the third men u ke y . views The possible contexts for an aplet: Plot, Plot Setup, Numeric, Numeric Setup, Symbolic, Symbolic Setup, Sketch, Note, and special views like split screens. ReferenceInfo.fm Pa ge 3 Friday, Dec ember 16, 2005 11:26 AM
R-4 If the calculator does not turn on If the HP 40gs does not turn on follow the steps below until the calculator turns on. You may find that the calculator turns on before you have completed the procedure. If the calculator still does not turn on, please contact Customer Support for further information. 1. Pres s and hold the ke y fo r 10 seconds. 2 . Pres s and hold the ke y and the th ird men u ke y simultaneou sly . Re lease the thir d menu k ey , then release the ke y . 3 . Pres s and hold the ke y , the fir st menu k ey , and the six th menu k ey sim ultaneousl y . Releas e the six th menu k e y , then releas e the fir st menu k ey , and then release the ke y . 4. Locat e the small hole in the back of the calc ulator . Insert the end of a straightened metal paper clip into the hole as fa r as it will go . Hold it ther e for 1 second , then r emov e it . Press the k ey . 5 . Remo ve the batteri es (see âBatter ies â on page R-4) , pres s and hold the key f or 10 seconds, and then put the batterie s back in. Pr es s the ke y . Operating details Operating temperature: 0 ° to 45 ° C (32 ° to 113 ° F). Storage temperature: â20 ° to 65 ° C (â 4 ° to 149 ° F). Operating and storage humidity: 90% relative humidity at 40 ° C (104 °F) maximum. Avoid getting the calculator wet. Battery operates at 6.0V dc, 80mA maximum. Batteries The calculator uses 4 AAA(LR03) batteries as main power and a CR2032 lithium battery for memory backup. Before using the calculator , please install the batteries according to the following procedure. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
R-5 To install the main batteries a. Slide up the battery compartment cover as illustrated. b. Insert 4 new AAA (LR03) batteries into the main compartment. Make sure each batte ry is inserted in the indicated direction. To install the backup battery a. Press down the holder. Push the plate to the shown direction and lift it. b. Insert a new CR2032 lithium battery. Make sure its positive ( ) side is facing up. c. Replace the plate and push it to the original place. After installing the batteries, press to turn the power on. Warning: It is recommended that you replace this battery every 5 ye ars. When the low battery icon is displaye d, you need to replace the batte ries as soon as possible. However, avoid removing th e backup battery and main batteries at the same time to avoid data lost. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
R-6 Variables Home variables The home variables are: Category Available name Complex Z1... Z9, Z0 Graphic G1 ... G9, G0 Library Function Parametric Polar Sequence Solve Statistics User-named List L1 ... L9 , L0 Matrix M1 ... M9 , M0 Modes Ans Date HAngle HDigits HFormat Ierr Time Notepad User-named Program Editline User-named Real A...Z, θ hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
R-7 Function aplet variables The function aplet variables are: Category Availa ble name Plot A xes Connect Coord FastRes Grid Indep InvCross Labels Recenter Simult Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Plot-FCN Area Extremum Isect Root Slope Symbolic Angle F1 F2 F3 F4 F5 F6 F7 F8 F9 F0 Numeri c Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
R-8 Parametric aplet variables The parametric aplet variables are: Category Available name Plot Axe s Connect Coord Grid Indep InvCross Labels Recenter Simult Tmin Tmax Tracing Tstep Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yzoom Symbolic Angle X1 Y1 X2 Y2 X3 Y3 X4 Y4 X5 Y5 X6 Y6 X7 Y7 X8 Y8 X9 Y9 X0 Y0 Numeric Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
R-9 Polar aplet variables The polar aplet variables are: Category Available names Plot A xes Connect Coord Grid Indep InvCross Labels Recenter Simult Umin Umax θ step Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle R1 R2 R3 R4 R5 R6 R7 R8 R9 R0 Numeri c Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
R-10 Sequence aplet variables The sequence aplet variables are: Category Available name Plot Axe s Coord Grid Indep InvCross Labels Nmin Nmax Recenter SeqPlot Simult Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yzoom Symbolic Angle U1 U2 U3 U4 U5 U6 U7 U8 U9 U0 Numeric Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
R-11 Solve aplet variables The solve aplet variables are: Category Availa ble name Plot A xes Connect Coord FastRes Grid Indep InvCross Labels Recenter Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle E1 E2 E3 E4 E5 E6 E7 E8 E9 E0 Numeri c Digits Format NumCol NumRow Note NoteText Sketch Page PageNum hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
R-12 Statistics aplet variables The statistics aplet variables are: Category Available name Plot Axe s Connect Coord Grid Hmin Hmax Hwidth Indep InvCross Labels Recenter S1mark S2mark S3mark S4mark S5mark StatPlot Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle S1fit S2fit S3fit S4fit S5fit Numeric C0,...C9 Digits Format NumCol NumFont NumRow StatMode Stat-One Max Σ Mean Σ Median Min Σ N Σ Q1 Q3 PSDev SSDev PVar Σ SVar Σ Tot Σ Stat-Two Corr Cov Fit MeanX MeanY RelErr Σ X Σ X2 Σ XY Σ Y Σ Y2 Note NoteText Sketch Page PageNum hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
R-13 MATH menu categories Math functions The math functions are: Category Availa ble name Calculus TAYLOR Complex ARG CONJ IM RE Constant e i MAXREAL MINREAL Ï Hyperb . ACOSH ASINH ATANH COSH SINH TANH ALOG EXP EXPM1 LNP1 List CONCAT Î LIST MAKELIST Ï LIST POS REVERSE SIZE Σ LIST SORT Loop ITERATE RECURSE Σ â â« hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
R-14 Matrix COLNORM COND CROSS DET DOT EIGENVAL EIGENVV IDENMAT INVERSE LQ LSQ LU MAKEMAT QR RANK ROWNORM RREF SCHUR SIZE SPECNORM SPECRAD SVD SVL TRACE TRN Polynom. POLYCOEF POLYEVAL POLYFORM POLYROOT Prob. COMB ! PERM RANDOM UTPC UTPF UTPN UTPT Real CEILING DEG âRAD FLOOR FNROOT FRAC HMS â â HMS INT MANT MAX MIN MOD % %CHANGE %TOTAL RAD âDEG ROUND SIGN TRUNCATE XPON Stat-Two PREDX PREDY Symbolic = ISOLATE LINEAR? QUAD QUOTE | Category Available name (Continued) hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
R-15 Program constants The program constants are: Tests < ⤠= = â > ⥠AND IFTE NOT OR XOR Trig ACOT ACSC ASEC COT CSC SEC Category Av ailable name (Continued) Category Availa ble name Angle Degrees Grads Radians Format Standard Fixed Sci Eng Fraction SeqPlot Cobweb Stairstep S1...5fit Linear LogFit ExpFit Power Trigonometric QuadFit Cubic Logist User Exponent StatMode Stat1Var Stat2Var StatPlot Hist BoxW hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
R-16 Physical Constants The physical constants are: Category Available Nam e Chemist ⢠Avogadro (A vagadr o âs Number , NA) ⢠Boltz . (Boltmann, k) ⢠mol. vo... (molar v olume , Vm) ⢠univ gas (univ er sal gas, R) ⢠std temp (standard temper ature , St d T) ⢠std pres (standard pr essur e , St d P) Phyics ⢠StefBolt (S tef an -Boltzmann, Ï ) â¢l ight s... (speed of light , c) ⢠permitti (permitti vity , ε 0) ⢠permeab (permeability , μ 0) ⢠acce gr... (acceleration of gra v ity , g) ⢠gravita... (gra v itation , G) Quantum ⢠Plankâs (Plankâs cons tant , h) ⢠Diracâs (Diracâs , hbar) ⢠e charge (electr onic c harge , q) ⢠e mass (electr on mass, me) ⢠q/me ra... (q/me rati o , qme) ⢠proton m (pr oton mass , mp) ⢠mp/me r... (mp/me rati o , mpme) ⢠fine str (fine st ructur e , α ) ⢠mag flux (magnetic flu x , Ï ) ⢠Faraday (F arada y , F) ⢠Rydberg (Ry dberg , ) ⢠Bohr rad (Bohr r adius, a0) ⢠Bohr mag (Bohr magneton, μ B) ⢠nuc. mag (nuclear magnet on, μ N) ⢠photon... (photon w av elength, λ ) ⢠photon... (photon fr equenc y , f0) ⢠Compt w... (Compton wa ve length, λ c) R â hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
R-17 CAS functions CAS functions are: Category Function Algebra COLLECT DEF EXPAND FACTOR PARTFRAC QUOTE STORE | SUBST TEXPAND UNASSIGN Complex i ABS ARG CONJ DROITE IM â RE SIGN Constant e i â Ï Diff & Int DERIV DERVX DIVPC FOURIER IBP INTVX lim PREVAL RISCH SERIES TABVAR TAYLOR0 TRUNC Hyperb . ACOSH ASINH ATANH COSH SINH TANH Integer DIVIS EULER FACTOR GCD IDIV2 IEGCD IQUOT IREMAINDER ISPRIME? LCM MOD NEXTPRIME PREVPRIME Modular ADDTMOD DIVMOD EXPANDMOD FACTORMOD GCDMOD INVMOD MODSTO MULTMOD POWMOD SUBTMOD hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
R-18 Polynom. EGCD FACTOR GCD HERMITE LCM LEGENDRE PARTFRAC PROPFRAC PTAYL QUOT REMAINDER TCHEBYCHEFF Real CEILING FLOOR FRAC INT MAX MIN Rewrite DISTRIB EPSX0 EXPLN EXP2POW FDISTRIB LIN LNCOLLECT POWEXPAND SINCOS SIMPLIFY XNUM XQ Solve DESOLVE ISOLATE LDEC LINSOLVE SOLVE SOLVEVX Tests ASSUME UNASSUME > ⥠< ⤠= = â AND OR NOT IFTE Trig ACOS2S ASIN2C ASIN2T ATAN2S HALFTAN SINCOS TAN2CS2 TAN2SC TAN2SC2 TCOLLECT TEXPAMD TLIN TRIG TRIGCOS TRIGSIN TRIGTAN Catego ry Fu nction (Con tinued) hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
R-19 Program commands The program commands are: Category Command Aplet CHECK SELECT SETVIEWS UNCHECK Branch IF THEN ELSE END CASE IFERR RUN STOP Drawing ARC BOX ERASE FREEZE LINE PIXOFF PIXON TLINE Graphic DISPLAY â â DISPLAY â GROB GROBNOT GROBOR GROBXOR MAKEGROB PLOT â â PLOT REPLACE SUB ZEROGROB Loop FOR = TO STEP END DO UNTIL END WHILE REPEAT END BREAK Matrix ADDCOL ADDROW DELCOL DELROW EDITMAT RANDMAT REDIM REPLACE SCALE SCALEADD SUB SWAPCOL SWAPROW Print PRDISPLAY PRHISTORY PRVAR Prompt BEEP CHOOSE CLRVAR DISP DISPXY DISPTIME EDITMAT FREEZE GETKEY INPUT MSGBOX PROMPT WAIT Stat-One DO1VSTATS RANDSEED SETFREQ SETSAMPLE hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
Status messages Stat-Two DO2VSTATS SETDEPEND SETINDEP Category Command (Continued) Message Meaning Bad Argument Type Incorrect input for this operation. Bad Argument Value The value is out of range for this operation. Infinite Result Math exception, such as 1/0. Insufficient Memory You must recover some memory to continue operation. Delete one or more matrices, lists, notes, or programs (using catalogs), or custom (not built- in) aplets (using MEMORY ). Insufficient Statistics Data Not enough data points for the calculation. For two-variable statistics there must be two columns of data, and each column must have at least four numbers. Invalid Dimension Array argument had wrong dimensions. Invalid Statistics Data Need two columns with equal numbers of data values. hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
R-21 Invalid Syntax The function or command you entered does not include the proper arguments or order of arguments. The delimiters (parentheses, commas, periods, and semi-colons) must also be correct. Look up the function name in the index to find its proper syntax. Name Conflict The | (where) function attempted to assign a value to the variable of integration or summation index. No Equ ation s Checked You must ente r and check a n equation (Symbolic view) before evaluating this function. (OFF SCREEN) Function value, root, extremum, or intersection is not visible in the current screen. Receive Error Problem with data reception from another calculator. Re- send the data. Too Few Arguments The command requires more arguments than you supplied. Undefined Name The global variable named does not exis t. Undefined Result The calculation has a mathematically undefined result (such as 0/0). Out of Memory You must recover a lot of memory to continue operation. Delete one or more matrices, lists, notes, or programs (using catalogs), or custom (not built- in) aplets (using MEMORY ). Message Meaning (Continued) hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
W-1 Limited W arranty HP 40gs Graphing Calculator; Warranty period: 1 2 months 1. HP warr ants to y ou, the end-user c ustomer , that HP hard war e, accessor ies and supplies w i ll be fr ee fr om defec ts in materi als and wo rkmanship after the date of pur chase , for the per iod spec ifi ed abov e. If HP recei ves notice of such defects during the warr ant y peri od, HP w ill , at its option, e ither repair o r replace produc ts whic h pro ve to be defecti ve . Replacement produc ts may be either ne w or lik e -new . 2 . HP war ran ts to you that HP so ftware w ill not fail to ex ec ute its pr ogr amming instruc tions after the date of pur chase , f or the period s pecif ied abo ve , due to defec ts in materi al and wor kmanship when pr operl y installed and used . If HP rece iv es notice of suc h defec ts during the w arr anty period , HP w ill replace softwar e media whic h does not ex ecute its progr amming instruc tions due to such de fects . 3 . HP does not w arr ant that the oper ation of HP produc ts will be uninter rupted or err or fr ee. If HP is unable , within a r easona ble time, to r epair or r eplace any pr oduct to a condition as w arr anted, y ou w ill be entitled to a r efund of the pur chas e pri ce upon pr ompt r eturn o f the pr oduct w ith pr oof of pur c hase . 4. HP pr oducts may con tain re manufactur ed parts equiv alent to ne w in perfor mance or may hav e been subj ect to inci dental u se . 5 . W a rr anty does not apply to defects r esulting fr om (a) impr oper or inadequate maintenance or calibr ation , (b) software , interfacing , par ts or suppl ies not supplied b y HP , (c) unauthori z ed modifi cation or mis use, (d ) o perat ion out sid e of th e pub li sh ed env ir onmental spec ifi cations f or the produc t, or (e) impr oper site prepar ation o r maintenance. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
W-2 6. HP MAKE S NO O THER EXP RE S S W ARRANTY OR CONDIT ION WHE THER WRITTEN OR ORAL. T O THE EXTENT ALL OWED B Y L OCAL L A W , ANY IMPLIED W ARRANTY OR CONDIT ION OF MERCHANT ABILITY , SA TI SF ACT OR Y QU ALITY , OR FITNE SS FOR A P AR TICULAR PURP OSE IS LIMI TED T O THE DURA TION OF THE EXPRE SS W ARRANTY SET F ORTH AB OVE . Some countri es, st ates or pro vinces do not allo w limitations o n the durati on of an implied warr anty , so th e abov e limitation or ex clusion mi ght not appl y to y ou . Th is war ran ty giv es yo u specif ic legal ri ghts and yo u might also hav e other ri ghts that v ary from co untry to country , state to state , or pro v ince to pro v ince. 7 . T O THE EXTENT ALL O WED B Y L OCAL LA W , THE REMEDIES IN THIS W ARRANTY ST A TEMENT ARE Y OU R S OLE AND EXCL US IVE REMEDIES . EX CEPT A S INDICA TED ABO VE , IN NO EVENT WILL HP OR I TS SUP PLIER S BE LIABLE FOR L OS S OF DA T A OR FOR DIRECT , SPEC IAL, INCIDENT AL , CONSE QUENTIAL (INCL UDING L O S T PROFI T OR D A T A) , OR O THER DA MA GE , WHETHER B A SED IN CONTRA CT , TOR T , OR O THERWI SE . Some countr ies , States or pr ov inces do not allo w the ex c lusion or limitati on of inc iden tal or consequen tial damages, so the abov e limitation o r ex clusion may no t apply to y ou . 8. The only w arr anties for HP pr oducts and services ar e set forth in the expres s warr anty statements accompany ing such pr oducts and serv ices . HP shall not be liable f or tec hnical or editor ial er ror s or omissions c ontaine d herein. FOR CONSUMER TRANSACTIONS IN AUSTRALIA AND NEW ZEALAND: THE WARRANTY TERMS CONTAINED IN THIS STATEMENT, EXCEPT TO THE EXTENT LAWFULLY PERMITTED, DO NOT EXCLUDE, RESTRICT OR MODIFY AND ARE IN ADDITION TO THE MANDATORY STATUTORY RIGHTS APPLICABLE TO THE SALE OF THIS PRODUCT TO YOU. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
W-3 Service Europe Country : T elephone numbers Austr ia 43-1-3 60 2 771203 Belgium 3 2 - 2 - 712 6 219 D e n m a r k 45 - 8 - 233 284 4 Ea st e r n Eu ro p e countr ies 4 20 -5- 414 2 2 5 2 3 Fi n l a n d 35 - 8964 0 0 0 9 Fr ance 3 3-1 - 4 9 9 3 9006 German y 49-6 9-9 5 30 7103 Gr eece 4 20 -5- 414 2 25 2 3 Holland 31- 2 -06 5 45 301 Italy 3 9-02 - 7 5419 7 82 Nor way 4 7 -6384 9 309 P ortugal 351- 2 2 9 5 7 0 200 Spain 34-915-64 209 5 S weden 46 -8519 9 206 5 Sw i t ze r l a n d 4 1 - 1 - 43953 58 (German) 41- 22 -8 2 7 8 7 80 (F renc h) 3 9-02 - 7 5419 7 82 (Italian) T urk ey 4 20 -5- 414 2 2 5 2 3 UK 44 - 20 7 - 45 80161 Cz ec h Repu blic 4 20 -5-414 2 2 5 2 3 South Af rica 2 7 -11- 23 7 6 2 00 Lu x embourg 3 2 - 2 - 712 6 219 Other Eur opean countr ies 4 20 -5- 414 2 2 5 2 3 Asia P acific Country : Telephone numbers Au str alia 61-3-9 841-5 211 Singapor e 61-3-98 41-5 211 hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
W-4 P lease logon to http://www .hp .com for th e la test ser vice and suppo rt informati on .h L.Ame ric a Country: T elephone numbers Ar gentina 0 -810 -55 5-5 5 20 Bra zil Sao P aulo 3 7 4 7 - 7 7 99; RO T C 0 -800 -15 77 51 M e xi c o M x C i t y 5258- 9922; RO T C 01-800 - 4 7 2 -6 68 4 Ven e z u e l a 0 8 0 0 - 47 4 6 - 8368 Chil e 8 00 - 360 999 C o l u m b i a 9 - 8 0 0 - 1 1 4726 P eru 0- 800 -10111 Central America & Caribbe an 1-800 - 711- 28 84 Guatemala 1-800 -99 9-5105 Pu e r t o R i c o 1 - 877-232- 0 5 89 Cos ta Ri ca 0 - 800 -011-05 2 4 N.America Country : Telephone numbers U .S . 1800 -HP INVENT Ca na d a (905 ) 2 0 6 - 4663 o r 800- HP INVENT RO T C = Rest of th e c ou ntr y hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
W-5 Regulatory Notices Federal Commu- nications Commission Notice This equipment has been tested and found to comply with the limits for a Class B digital device , pursuant to Part 15 of the FCC Rules. These limi ts are designed to provide reasonable protection agains t harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, i f not installed and used in accordance with th e instructions, may cause harmful interference to r adio communications. However, there is no guarantee that interference will not occur in a particular installa tion. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interfer ence by one or more of the following measures: ⢠Reorient or relocate the receiving antenna. ⢠Increase the separation be tween the equipment and the receiver. ⢠Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. ⢠Consult the dealer or an experien ced radio or television technician for help. Modifications The FCC requires the user to be notified that any changes or modifications made to this device that are not expressly approved by Hewlett-Packard Company may void the user's authority to operate the equipment. Cables Connections to this device mu st be made with shielded cables with metallic RFI/EMI connector hoods to maintain compliance with FCC rules and regulations. Declaration of Conformity for Products Marked with FCC Logo, United States Only This device complies with Pa rt 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. For questions regarding your product, contact: hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
W-6 Hewlett-Packard Company P. O. Box 692000, Mail Sto p 530113 Houston, Texas 77269-2000 Or, call 1-800-474-6836 For questions regarding this FCC declaration, co ntact: Hewlett-Packard Company P. O. Box 692000, Mail Sto p 510101 Houston, Texas 77269-2000 Or, call 1-281-514-3333 To identify this product, refer to the part, series, or model number found on the product. Canadian Notice This Class B digital apparatus meets all requirements of the Canadian Interference-Causing Equipment Regulations. Avis Canadien Cet appa reil numérique de la classe B respecte toutes les ex igences du Règlement sur le ma téri el brouilleur du Can ad a . European Union Regulatory Notice This product complies with the following EU Directives: ⢠Low Voltage Directive 73/23/EEC ⢠EMC Directive 89/336/EEC Compliance with these direct ives implies conformity to applicable harmonized Eur opean standards (European Norms) which are listed on the EU Declaration of Conformity issued by Hewlett- Packard for this product or product family. This compliance is indicated by the following conformity marking placed on the product: This marking is v alid for non-Tele com products and EU harmonize d Telecom products (e.g . Bluetooth). xxxx * This marking is valid f or EU non-harmonized Tel ecom products . *Notified body num ber (used only if applica ble - refer to the pr oduct label) hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
W-7 Japanese Notice ã ã®è£ ç½®ã¯ ã æ å ± å¦çè£ ç½®ç黿³¢é害èªä¸»è¦å¶åè° ä¼ ï¼VCCIï¼ ã®åºæº ã« åº ã¥ ã 㯠㩠㹠B æ å ±æè¡è£ ç½® ã§ ã ã ã ã®è£ ç½®ã¯ã å®¶åºç° å¢ ã§ ä½¿ç¨ ã ã ã 㨠ã ç®ç 㨠ã 㦠ã ã¾ ã ãã ã ã® è£ ç½®ã 㩠㸠㪠ã ã 㬠ã 㸠㧠㳠åä¿¡æ© ã«è¿ æ¥ ã ã¦ ä½¿ç¨ ã ã ã 㨠ã åä¿¡é害 ã å¼ ã èµ· ã ã ã 㨠ã ã ã ã¾ ãã å ã æ±ãèª¬æ æ¸ã«å¾ ã£ ã¦ æ£ ã ãå ã æ±ã ã ã 㦠ã ã ã ãã Korean Notice Disposal of Waste Equipment by Users in Private Household in the European Union This s y mbol on the produ ct or on its pack aging indi cates that this pr oduct m u s t n o t b e d i s p o s e d o f w i t h y o u r o t h e r household waste . Instead, it is your res ponsibil ity to dispose of your waste equipment b y handing it ov er to a designat ed collectio n point f or the rec yc ling of wa ste electr ical and electroni c equipm ent . The separate collection and r ecyc ling of y our waste equipment at the time of dispos al w ill help to conserv e natural r esource s and ensur e that it is r ecyc led in a manner that pro tects human health and the env ironment . F or more inf ormation about wher e y ou can drop off y our waste equipment for rec ycling , please contact your local c it y office , your household waste disposal service or the shop wher e you pur chased the produc t. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
I-1 Index A ABCUV 14-62 ABS 14-45 absolute value 13-6 ACOS2S 14-38 add 13-4 ADDTMOD 14-51 ALGB menu 14-10 algebraic entry 1-19 alpha characters typing 1-6 alphabetical sorting 22-6 angle measure 1-10 in statistics 10-12 setting 1-11 animation 20-5 creating 20-5 annunciators 1-3 Ans (last answer) 1-24 antiderivative 14-68 , 14-69 antilogarithm 13-4, 13-10 aplet attaching notes 22-4 clearing 22-3 copying 22-4 definition of R-1 deleting 22-6 Function 13-21 Inference 11-1 key 1-4 library 22-6 Linear Solver 8-1 opening 1-16 Parametric 4-1 Polar 5-1 receiving 22-5 resetting 22-3 sending 22-4, 22 -5 Sketch view 20-1 Solve 7-1 sorting 22-6 statistics 10-1 transmitting 22-5 Triangle Solver 9-1 aplet commands CHECK 21-14 SELECT 21-14 SETVIEWS 21-17 UNCHECK 21-17 aplet variables definition 17-1, 17-8 in Plot view 21-31 new 17-1 aplet views canceling operations in 1-1 changing 1-19 note 1-18 Numeric view 1-17 Plot view 1-16 sketch 1-18 split-screen 1-17 Symbolic view 1-16 approximation 14-32 arc cosecant 13-20 arc cosine 13-5 arc cotangent 13-20 arc secant 13-20 arc sine 13-4 arc tangent 13-5 area graphical 3-10 interactive 3-10 variable 21-31 ARG 13-7 arguments with matrices 18-10 ASIN2C 14-39 ASIN2T 14-39 ASSUME 14-61 ATAN2S 14-39 attaching a note to an aplet 20-1 a sketch to an aplet 20-3 auto scale 2-14 axes plotting 2-7 variable 21-31 B bad argument R-20 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
I-2 bad guesses error message 7-7 batteries R-4 Bernoulliâs number 14-65 box-and-whisker plot 10-16 branch commands CASE...END 21-18 IF...THEN...ELSE...END 21-18 IFERR...THEN...ELSE 21-18 branch structu res 21-17 build your own table 2-19 C calculus operation s 13-7 CAS 14-1, 15-1 configurat ion 15-3 help 15-4 history 14-8 in HOME 14-7 list of functions 14-9, R-17 modes 14-5, 15-3 online help 14-8 variables 14-4 catalogs 1-30 CFG 15-3 Chinese remainders 14-62, 14- 65 CHINREM 14-62 chronological sorting 22-6 circle drawi ng 20-4 clearing aplet 22-3 characters 1-22 display 1-22 display history 1-25 edit line 1-22 lists 19-6 plot 2-7 cobweb graph 6-1 coeffici ents polynomial 13-11 COLLECT 14-10 columns changing position 21-25 combinations 13-12 commands aplet 21-14 branch 21-17 definition of R-1 drawing 21-19 graphic 21-21 loop 21-23 print 21-25 program 21-4, R-19 stat-one 21-29 stat-two 21-30 with matrices 18-10 complex number functions 13-6, 13-17 conjugate 13-7 imaginary part 13-7 real part 13-8 complex numbers 1-29 entering 1-29 math functions 13-7 storing 1-29 computer algebra system Se e CAS confidence intervals 11-15 CONJ 13-7 conjugate 13-7 connecting data points 10-19 variable 21-31 via serial cable 22-5 via USB cable 22-5 connectivity kit 22-4 constant? error message 7-7 constants e 13-8 i 13-8 maximum real number 13-8 minimum real number 13-8 physical 1-8, 13-25, R-16 program R-15, R-16 contrast decreasing display 1-2 increasing display 1-2 conversions 13-8 coordinate display 2-9 copying display 1-22 graphics 20-6 notes 20-8 programs 21-8 correlation coefficient 10-17 CORR 10-17 statistical 10-15 cosecant 13-20 hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
I-3 cosine 13-4 inverse hyperbolic 13-9 cotangent 13-20 covariance statistical 10-15 creating aplet 22-1 lists 19-1 matrices 18-2 notes in Notepad 20-6 programs 21-4 sketches 20-3 critical value(s) displayed 11-4 cross product vector 18-11 curve fitting 10-12, 10-17 CYCLOTOMIC 14-63 D data set definition 10-8 date, setting 21-27 debugging programs 21-7 decimal changing format 1-10 scaling 2-14, 2-15 decreasing display con trast 1-2 DEF 14-10 definite integral 13-6 deleting aplet 22-6 lists 19-6 matrices 18-4 programs 21-9 statistical data 10-11 delimiters, programming 21-1 DERIV 14-16 derivative 14-16 derivatives definition of 13-6 in Function aplet 13-22 in Home 13-21 DERVX 14-16 DESOLVE 14-33 determinant square matrix 18-11 DIFF me nu 14-16 differential equations 14-33 , 14-35 , 14-57 differentiation 13-6 , 14-33 digamma function 14-67, 14-68 display 21-2 1 adjusting contrast 1-2 annunciator line 1-2 capture 21-21 clearing 1-2 date and time 21-27 element 18-5 elements 19-4 engineeri ng 1-10 fixed 1-10 fraction 1-10 history 1-22 line 1-23 matrices 18-5 parts of 1-2 printing contents 21-25 rescaling 2-13 scientific 1-10 scrolling through history 1-25 soft key labels 1-2 standard 1-10 DISTRIB 14-28 distributivity 14-12 , 14-28 , 14-30 divide 13-4 DIVIS 14-47 DIVMOD 14-52 DIVPC 14-17 drawing circles 20-4 keys 20-4 lines and boxes 20-3 drawing commands ARC 21-19 BOX 21-20 ERASE 21-20 FREEZE 21-20 LINE 21-20 PIXOFF 21-20 PIXON 21-20 TLINE 21-20 DROITE 14-45 E e 13-8 edit line 1-2 editing matrices 18-4 hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
I-4 notes 20-2 programs 21-5 Editline Program catalog 21-2 editors 1-30 EGCD 14-55 eigenvalues 18-11 eigenvectors 18-11 element storing 18-6 E-lessons 1-12 engineering number format 1-11 EPSX0 14-29 equals for equations 13-17 logical test 13-19 Equation Writer 14-2, 15-1, 16-1 selecting terms 15-5 equations solving 7-1 erasing a line in Sketch view 21-20 error messages bad guesses 7-7 constant? 7-7 Euclidean division 14-48, 14-49 EULER 14-47 exclusive OR 13-20 exiting views 1-19 EXP2HYP 14-63 EXP2POW 14-29 EXPAND 14-12 EXPANDMOD 14-52 expansion 14-25, 14-27 EXPLN 14-29 exponent fit 10-13 minus 1 13-10 of value 13-17 raising to 13-5 exponentials 14-30, 14-63 expression defining 2-1, R-1 entering in HOME 1-19 evaluating in aplets 2-3 literal 13-18 plot 3-3 extended greatest common divisor 14-55 extremu m 3-10 F FACTOR 14-12 , 14-47 , 14-56 factorial 13-13 factorization 14-12 FACTORMOD 14-53 FastRes variable 21-32 FDISTRIB 14-30 fit a curve to 2VAR data 10-17 choosing 10-12 defining your own 10-13 fixed number format 1-10 font size change 3-8, 15-2, 20-5 forecasting 10-20 FOURIER 14-17 fraction number format 1-11 full-precision display 1-10 function analyze graph with FCN tools 3-4 definition 2-2, R-1 entering 1-19 gamma 13-13 intersection point 3-5 math menu R-13, R-17 slope 3-5 syntax 13-2 tracing 2-8 Function aplet 2-20, 3-1 function variables area 21-31 axes 21-31 connect 21-31 fastres 21-32 grid 21-32 in menu map R-7 indep 21-33 isect 21-33 labels 21-34 Recenter 21-34 root 21-34 ycross 21-37 G GAMMA 14-64 GCD 14-47 , 14-56 GCDMOD 14-53 hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
I-5 glossary R-1 graph analyzing statistical data in 10-19 auto scale 2-14 box-and-wh isker 10-16 capture current display 21-21 cobweb 6-1 comparing 2-5 connected points 10-17 defining the independent variable 21-36 drawing axes 2-7 expressions 3-3 grid points 2-7 histogram 10-15 in Solve aplet 7-7 one-variable statistics 10-18 overlaying 2-15 scatter 10-15, 10-17 split-sc reen view 2-14 splitting into plot and close-up 2-13 splitting into plot and table 2-13 stairsteps 6-1 statistical data 10-15 t values 2-6 tickmarks 2-6 tracing 2-8 two-variable statistics 10-18 Graphic commands â GROB 21-21 DISPLAY â 21-21 GROBNOT 21-21 GROBOR 21-21 GROBXOR 21-22 MAKEGROB 21-22 PLOT â 21-22 REPLACE 21-22 SUB 21-22 ZEROGROB 21-22 graphics copying 20-6 copying into Sketch vi ew 20-6 storing and recalling 20-6, 21-21 greatest common divisor 14-56 H HALFTAN 14-40 HERMITE 14-56 histogram 10-15 adjusting 10-16 range 10-18 setting min/max values for bars 21-32 width 10-18 history 1-2, 14-8, 21-25 Home 1-1 calculating in 1-19 display 1-2 evaluating expressions 2-4 reusing lines 1-23 variables 17-1, 17-7, R-6 home 14-7 horizontal zoom 21-38 hyperbolic maths functions 13-10 hyperbolic trigonometry ACOSH 13-9 ALOG 13-10 ASINH 13-9 ATANH 13-9 COSH 13-10 EXP 13-10 EXPM1 13-10 LNP1 13-10 SINH 13-10 TANH 13-10 hypothes is alternative 11-2 inference tests 11-8 null 11-2 tests 11-2 I i 13-8 , 14-45 IABCUV 14-64 IBERNOULLI 14-65 IBP 14-18 ICHINREM 14-65 IDIV2 14-48 IEGCD 14-48 ILAP 14-65 IM 13-7 implied mu ltiplicati on 1-20 importing graphics 20-6 notes 20-8 increasing display contrast 1-2 indefinite integral hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
I-6 using symbolic variables 13-23 independent values adding to table 2-19 independent variable defined for Tracing mode 21-33 inference confidence intervals 11-15 hypothesis tests 11-8 One-Proportion Z- Interval 11-17 One-Sampl e Z-Interva l 11-15 One-Sampl e Z-Test 11-8 Two-Proportion Z-Interval 11-17 Two-Proportion Z-T est 11-11 Two-Sample T-Interval 11-19 Two-Sample Z-Interva l 11-16 infinite result R-20 initial guess 7-5 input forms resetting default values 1-9 setting Modes 1-11 insufficient memory R-20 insufficient statistics data R-20 integer rank matrix 18-12 integer scaling 2-14, 2-15 integral definite 13-6 indefinite 13-23 integration 13-6, 14-18, 14-24 interpreting intermediate guesses 7-7 intersection 3-11 INTVX 14-19 invalid dimension R-20 statistics data R-20 syntax R-21 inverse hyperbolic cosine 13-9 inverse hyperbolic functions 13-10 inverse hyperbolic sine 13-9 inverse hyperbolic tangent 13 -9 inverse Laplace transform 14-66 inverting matrices 18-8 INVMOD 14-53 IQUOT 14-49 IREMAINDER 14-49 isect variable 21-33 ISOLATE 14-34 ISPRIME? 14-50 K keyboard editing keys 1-5 entry keys 1-5 inactive keys 1-8 list keys 19-2 math functions 1-7 menu keys 1-4 Notepad keys 20-8 shifted keystrokes 1-6 L labeling axes 2-7 parts of a sketch 20-5 LAP 14-67 Laplace transform 14-65 Laplace transform, inverse 14-66 LCM 14-50, 14-57 LDEC 14-35 least common multiple 14-50, 14-57 LEGENDRE 14-57 letters, typing 1-6 library, managing aplets in 22-6 lim 14-21 limits 14-21 LIN 14-30 linear fit 10-13 Linear Solver aplet 8-1 linear systems 14-35 linearize 14-30 , 14-43 LINSOLVE 14-35 list arithmetic with 19-7 calculate sequence of elements 19-8 calculating product of 19-8 composed from differences 19-7 concatenating 19-7 counting elements in 19-9 creating 19-1, 19-3, 19-4, 19-5 deleting 19-6 deleting list items 19-3 displaying 19-4 displaying list elements 19-4 editing 19-3 hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
I-7 finding statistical values in list ele- ments 19-9 generate a series 19-8 list function syntax 19-6 list variables 19-1 returning position of element in 19-8 reversing order in 19-8 sending and receiving 19-6 sorting elements 19-9 storing elements 19-1 , 19-4 , 19-5 storing one element 19-6 LNCOLLECT 14-31 logarithm 13-4 logarithmic fit 10-13 functions 13-4 logarithms 14-31 logical operators AND 13-19 equals (logical test) 13-19 greater than 13-19 greater than or equal to 13-19 IFTE 13-19 less than 13-19 less than or equal to 13-19 NOT 13-19 not equal to 13-19 OR 13-19 XOR 13-20 logistic fit 10-13 loop commands BREAK 21-23 DO...UNTIL...END 21-23 FOR I= 21-23 WHILE...REPEAT...END 21-23 loop functions ITERATE 13-10 RECURSE 13-11 summation 13-11 low battery 1-1 lowercase letters 1-6 M mantissa 13-15 math functions complex number 13-7 hyperbolic 13-10 in menu map R-13, R-17 keyboard 13-3 logical operators 13-19 menu 1-7 polynomial 13-11 probability 13-12 real-number 13-14 symbolic 13-17 trigonometry 13-20 MATH menu 13-1 math operations 1-19 enclosing arguments 1-21 in scientific notation 1-20 negative numbers in 1-20 matric es adding rows 21-24 addition and subtrac tion 18-6 arguments 18-10 arithmetic operations in 18-6 assembly from vectors 18-1 changing row position 21-25 column norm 18-10 comma 19-7 commands 18-10 condition number 18-11 create identity 18-13 creating 18-3 creating in Home 18-5 deleting 18-4 deleting columns 21-24 deleting rows 21-24 determinant 18-11 display eigenvalues 18-11 displaying 18-5 displaying matrix elements 18-5 dividing by a sq uare matrix 18-8 dot product 18-11 editing 18-4 extracting a portion 21-25 finding the trace of a square ma- trix 18-13 inverting 18-8 matrix calculations 18-1 multiplying and divid ing by scalar 18-7 multiplying by vector 18-7 multiplying row by value and add- ing result to second row 21-25 multiplying row number by value 21-25 negating elements 18-8 opening Matrix Editor 21-28 raised to a power 18-7 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
I-8 redimension 21-24 replacing portion of matrix or vec- tor 21-25 sending or receiving 18-4 singular value decomposition 18-13 singular values 18-13 size 18-12 spectral norm 18-13 spectral radius 18-13 start Matrix Editor 21-24 storing elements 18-3, 18-5 storing matrix elements 18-6 swap column 21-25 swap row 21-25 transposing 18-13 variables 18-1 matrix functions 18-10 COLNORM 18-10 COND 18-11 CROSS 18-11 DET 18-11 DOT 18-11 EIGENVAL 18-11 EIGENVV 18-11 IDENMAT 18-11 INVERSE 18-11 LQ 18-11 LSQ 18-11 LU 18-12 MAKEMAT 18-12 QR 18-12 RANK 18-12 ROWNORM 18-12 RREF 18-12 SCHUR 18-12 SIZE 18-12 SPECNORM 18-13 SPECRAD 18-13 SVD 18-13 SVL 18-13 TRACE 18-13 TRN 18-13 maximum real number 1-22, 13-8 memory R-20 clearing all R-3 organizing 17-9 out of R-21 saving 1-25, 22-1 viewing 17-1 menu lists searching 1-9 minimum real number 13-8 mixed fraction format 1-1 1 modes angle measure 1-10 CAS 14-5 decimal mark 1-11 number format 1-10 MODSTO 14-53 modular arithmetic 14-51 multiple solutions plotting to find 7-7 multiplication 13-4, 14-28 implied 1-20 MULTMOD 14-54 N name conflict R-21 naming programs 21-4 natural exponential 13-4, 13-10 natural log plus 1 13-10 natural logarithm 13-4 negation 13-5 negative numbers 1-20 NEXTPRIME 14-51 no equations checked R-21 non-rational 14-6 Normal Z-distribution, confidence in- tervals 11-15 note copying 20-8 editing 20-2 importing 20-8 printing 21-26 viewing 20-1 writing 20-1 Notepad 20-1 catalog keys 20-7 creating notes 20-6 writing in 20-6 n th root 13-6 null hypothesis 11-2 number format engineering 1-11 fixed 1-10 fraction 1-11 in Solve aplet 7-5 hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
I-9 mixed fraction 1-11 scientific 1-10 Standard 1-10 numeric precision 17-9 Numeric view adding values 2-19 automatic 2-16 build your own table 2-19 display defining function for col- umn 2-17 recalculating 2-19 setup 2-16, 2-19 O off automatic 1-1 power 1-1 on/cancel 1-1 One-Proportion Z-Interval 11-17 One-Sample T-Interval 11-18 One-Sample T-Test 11-12 One-Sample Z-Interval 11-15 One-Sample Z-Test 11-8 online help 14-8 order of precedence 1-21 overlaying plots 2-15, 4-3 P Ï 13-8 PA2B2 14-67 paired columns 10-11 parametric variables axes 21-31 connect 21-31 grid 21-32 in menu map R-8 indep 21-33 labels 21-34 recenter 21-34 ycross 21-37 parentheses to close arguments 1-21 to specify order of operation 1-21 PARTFRAC 14-13, 14-57 partial derivative 14-16 partial fraction expansi on 14-13 partial integration 14-18 pause 21-29 permutations 13-13 pictures attaching in Sketch view 20-3 plot analyzing statistical data in 10-19 auto scale 2-14 box-and-whisker 10-16 cobweb 6-1 comparing 2-5 connected points 10-17, 10-19 decimal scaling 2-14 defining the independent variable 21-36 drawing axes 2-7 expressions 3-3 grid points 2-7 histogram 10-15 in Solve aplet 7-7 integer scaling 2-14 one-variable statistics 10-18 overlay plot 2-13 overlaying 2-15, 4- 3 scaling 2-13 scatter 10-15, 10-17 sequence 2-6 setting up 2-5, 3-2 split-screen view 2-14 splitting 2-14 splitting into plot and close-up 2-13 splitting into plot and table 2-13 stairsteps 6-1 statistical data 10-15 statistics parameters 10-18 t values 2-6 tickmarks 2-6 to capture current display 21-21 tracing 2-8 trigonometric scaling 2-14 two-variable statistics 10-18 plotting resolution and tracing 2-8 plot-view variables area 21-31 connect 21-31 fastres 21-32 function 21-31 grid 21-32 hmin/hmax 21-32 hwidth 21-33 isect 21-33 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
I-10 labels 21-34 recenter 21-34 root 21-34 s1mark-s5mark 21-34 statplot 21-35 tracing 21-33 umin/umax 21-35 ustep 21-35 polar variables axes 21-31 connect 21-31 grid 21-32 in menu map R-9 indep 21-33 labels 21-34 recenter 21-34 ycross 21-37 polynomial coefficients 13-11 evaluation 13-11 form 13-12 roots 13-12 Taylor 13-7 polynomial functions POLYCOEF 13-11 POLYEVAL 13-11 POLYFORM 13-12 POLYROOT 13-12 ports 22-5 position argument 21-21 power (x rai sed to y) 13-5 powers 14-6 POWEXPAND 14-31 POWMOD 14-54 precedence 1-22 predicted values statistical 10-20 PREVAL 14-23 PREVPRIME 14-51 prime factors 14-47 prime numbers 14-50, 14-51 primitive 14-23 , 14-24 print contents of display 21-25 name an d content s of varia ble 21-26 object in h istory 21-25 variables 21-26 probability functions ! 13-13 COMB 13-12 RANDOM 13-13 UTPC 13-13 UTPF 13-13 UTPN 13-13 UTPT 13-14 program commands 21-4 copying 21-8 creating 21-4 debugging 21-7 deleting 21-9 delimiters 21-1 editing 21-5 naming 21-4 pausing 21-29 printing 21-26 sending and receiving 21-8 structured 21-1 prompt commands beep 21-26 create choose box 21-26 create input form 21-28 display item 21-27 display me ssage box 21-29 halt program execution 21-29 insert line breaks 21-29 prevent sc reen display being up- dated 21-28 set date and time 21-27 store keycode 21-28 PROPFRAC 14-58 PSI 14-67 Psi 14-68 PTAYL 14-58 Q quadratic extremum 3-6 fit 10-13 function 3-4 QUOT 14-58 QUOTE 14-13 quotes in program names 21-4 R random numbers 13-13 hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
I-11 RE 13-8 real number maximum 13-8 minimum 13-8 real part 13-8 real-number functions 13-14 % 13-16 %CHANGE 13-16 %TOTAL 13-16 CEILING 13-14 DEGtoRAD 13-14 FNROOT 13-14 HMSto 13-15 INT 13-15 MANT 13-15 MAX 13-15 MIN 13-15 MOD 13-15 RADtoDEG 13-16 ROUND 13-16 SIGN 13-16 TRUNCATE 13-17 XPON 13-17 reatest common divisor 14-47 recalculation for table 2-19 receive error R-21 receiving aplet 22-5 lists 19-6 matrices 18-4 programs 21-8 redrawing table of numbers 2-18 reduced row echelon 18-12 regression analysis 10-17 fit models 10-13 formula 10-12 user-defined fit 10-13 relative error statistical 10-18 REMAINDER 14-59 REORDER 14-68 resetting aplet 22-3 calculator R-3 memory R-3 result copying to edit line 1-22 reusing 1-22 rigorous 14-6 RISCH 14-24 root interactive 3-10 n th 13-6 variable 21-34 root-finding displaying 7-7 interactive 3-9 operations 3-10 variables 3-10 S S1mark-S5mark variables 21-34 scaling automatic 2-14 decimal 2-10, 2-14 integer 2-10, 2-14, 2-1 5 options 2-13 resetting 2-13 trigonometric 2-14 scatter plot 10-15, 10-17 connected 10-17 , 10-19 SCHUR decomposition 18-12 scientific number format 1-10 , 1-20 scrolling in Trace mode 2-8 searching menu lists 1-9 speed searches 1-9 secant 13-20 Sending 22-5 sending aplets 22-4 lists 19-6 programs 21-8 sequence definition 2-2 sequence variables Axes 21-31 Grid 21-32 in menu map R-10 Indep 21-33 Labels 21-34 Recenter 21-34 Ycross 21-37 serial port connectivity 22-5 SERIES 14-24 setting hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
I-12 date 21-27 time 21-27 SEVAL 14-68 SIGMA 14-68 SIGMAVX 14-69 SIGN 14-46 sign revers al 7-6 SIMPLIFY 14-32 simplify 14-68, 14-70 SINCOS 14-31 , 14-40 sine 13-4 inverse hyper bolic 13-9 singular value decomposition matrix 18-13 singular values matrix 18-13 sketches creating 20-5 creating a blank graph ic 21-22 creating a set of 20-5 erasing a line 21-20 labeling 20-5 opening view 20-3 sets 20-5 storing in graphics variable 20-5 slope 3-10 soft key labels 1-2 SOLVE 14-37 solve error messages 7-7 initial guesses 7-5 interpreting intermediate guesses 7-7 interpreting results 7-6 plotting to find guesses 7-7 setting number format 7-5 solve variables axes 21-31 connect 21-31 fastres 21-32 grid 21-32 in menu map R-11 indep 21-33 labels 21-34 recenter 21-34 ycross 21-37 SOLVEVX 14-38 sorting 22-6 aplets in alphabetic order 22-6 aplets in chronological order 22-6 elements in a list 19-9 spectral norm 18-13 spectral radius 18-13 square root 13-5 stack history printing 21-25 stairsteps graph 6-1 standard number format 1-10 statistics analysis 10-1 analyzing plots 10-19 angle mode 10-12 calculate one-variable 21-30 calculate two-variable 21-30 data set variables 21-40 data structure 21-40 define one-var iable sample 21-30 define two-variable data setâs de- pendent column 21-30 define two-variable data setâs in- dependent column 21-30 defining a fit 10-12 defining a regression model 10-12 deleting data 10-11 editing data 10-11 frequency 21-30 inserting data 10-11 plot type 10-18 plotting data 10-15 predicted values 10-20 regression curve (fit) models 10-12 saving data 10-10 sorting data 10-11 specifying angle setting 10-12 toggling between one-variable and two-variable 10-12 tracing plots 10-19 troubleshooting with plots 10-19 zooming in plots 10-19 statistics variables Axes 21-31 Connect 21-31 Grid 21-32 Hmin/Hmax 21-32 Hwidth 21-33 in menu map R-12 Indep 21-33 hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
I-13 Labels 21-34 Recenter 21-34 S1mark-S5mark 21-34 Ycross 21-37 step size of independent variable 21-36 step-by-step 14-6 STORE 14-14 storing list elements 19-1, 19- 4 , 19-5 , 19-6 matrix elemen ts 18-3, 18-5, 18-6 results of calculation 17-2 value 17-2 strings literal in symbolic operations 13-18 STURMAB 14-69 SUBST 14-15 substitution 14-14 SUBTMOD 14-55 subtract 13-4 summation function 13-11 symbolic calculations in Function aplet 13-21 defining expressions 2-1 differentiation 13-21 displaying definitions 3-8 evaluating variables in view 2-3 setup view for statistics 10-12 symbolic calculations 14-1 symbolic functions | (where) 13-18 equals 13-17 ISOLATE 13-17 LINEAR? 13-18 QUAD 13-18 QUOTE 13-18 Symbolic view defining expressions 3-2 syntax 13-2 syntax errors 21-7 T table navigate around 3-8 numeric values 3-7 numeric view setup 2-16 TABVAR 14-27 TAN2CS2 14-40 TAN2SC 14-41 TAN2SC2 14-41 tangent 13-4 inverse hyperbolic 13-9 Taylor polynomial 13-7 TAYLOR0 14-27 TCHEBYCHEFF 14-59 TCOLLECT 14-41 tests 14-61 TEXPAND 14-15 , 14-42 tickmarks for plotting 2-6 time 13-15 setting 21-27 time, converting 13-15 times sign 1-20 TLIN 14-43 tmax 21-36 tmin 21-36 too few arguments R-21 TOOL menu 15-1 tracing functions 2-8 more than one curve 2-8 not matching plot 2-8 plots 2-8 transcendental expressions 14-42 transmitting lists 19-6 matrices 18-4 programs 21-8 transposing a matrix 18-13 Triangle Solver aplet 9-1 TRIG 14-43 TRIGCOS 14-44 trigonometric fit 10-13 functions 13-20 scaling 2-10, 2- 14 , 2-15 trigonometry functions ACOS2S 14-38 ACOT 13-20 ACSC 13-20 ASEC 13-20 ASIN2C 14-39 ASIN2S 14-39 ASIN2T 14-39 hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
I-14 COT 13-20 CSC 13-20 HALFTAN 14-40 SEC 13-20 SINCOS 14-40 TAN2CS2 14-40 TAN2SC 14-41 TAN2SC2 14-41 TRIGCOS 14-44 TRIGSIN 14-44 TRIGTAN 14-44 TRIGSIN 14-44 TRIGTAN 14-4 4 TRUNC 14-28 truncating values to decimal places 13-17 TSIMP 14-70 tstep 21-36 Two-Prop ortion Z-Interv al 11-17 Two-Prop ortion Z-Test 11-11 Two-Sample T-Interva l 11-19 Two-Sample T-test 11- 14 Two-Sample Z-Interval 11-16 typing letters 1-6 U UNASSIGN 14-15 UNASSUME 14-61 undefined name R-21 result R-21 un-zoom 2-11 upper-tail chi-squared probability 13-13 upper-tail normal probability 13-13 upper-tail Snedec orâs F 13-13 upper-tail studentâs t-probability 13-14 USB connectivity 22-5 user defined regression fit 10-13 V value recall 17-3 storing 17-2 variables aplet 17-1 CAS 14-4 categories 17-7 clearing 17-3 definition 17-1, 17-7, R-2 in equations 7-10 in Symbolic view 2-3 independent 14-6, 21-36 local 17-1 previous resu lt (Ans) 1-23 printing 21-26 root 21-34 root-finding 3-10 step size of independent 21-36 types 17-1, 17 -7 use in calculations 17-3 variation table 14-27 VARS menu 17-4 , 17-5 vectors column 18-1 cross product 18-11 definition of R-2 VER 14-70 verbose 14-6 version 14-70 views 1-18 configuration 1-18 definition of R-3 W warning symbol 1-8 where command ( | ) 13-18 X Xcross variable 21-36 XNUM 14-32 XQ 14-32 Y Ycross variable 21-37 Z Z-Interval 11-15 zoom 2-17 axes 2-12 box 2-9 center 2-9 examples of 2-11 factors 2-13 hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
I-15 in 2-9 options 2-9, 3-8 options within a table 2-18 out 2-9 redrawing table of numbers op- tions 2-18 square 2-10 un-zoom 2-11 within Numeric view 2-18 X-zoom 2-9 Y-zoom 2-10 hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Notice REG ISTER Y OUR PRODUCT A T: w ww .register . hp.com THI S MANUAL AND ANY EXAMPLES C ONT AINED HEREI N ARE PRO VI DED "AS I S" AND ARE SUBJECT TO CHANGE WITHOUT NO TICE. HEWLETT-P A CKARD COMP ANY MAKE S NO W AR- RANT Y O F ANY KIND WITH R EGARD T O THI S MANUAL , INCL UDING , BU T N O T LI MIT ED T O, TH E I MP LIE D W A RRAN T IES OF MERCHANT AB ILITY , NON -I NFRIN GEMENT AND FITNESS FOR A P ARTIC UL AR PUR POSE. HEWLET T-P ACKARD CO. SHALL NO T BE L IABLE FO R ANY ERRORS OR FOR INCI DENT AL OR CONSE QUENTIAL D AMAGES IN CONNECT ION WI TH TH E FUR NISHI NG, P ERF ORMANC E, OR USE OF THI S MANUAL OR THE EXAMPLES CONT AINED HEREIN. © Cop yr ight 19 9 4 -199 5, 19 9 9- 2000, 200 3, 2006 He w lett-P ack ar d Dev el- opment C ompan y , L. P . Repr oduction , adaptation , or tr anslation of this man ual is prohib ited w ithout pri or w ritten per missi on of Hew lett-P a ck ard Compan y , e x cept as allo wed under the cop yr ight law s. Hew lett- P ack ar d Compan y 499 5 M u rp hy Ca nyo n R d, Suite 3 01 San Dieg o, CA 9 212 3 Pr inting His to r y Ed i t io n 1 Ap r i l 2 0 05 title.fm Page i i Friday, February 1 7, 2006 9:48 AM
iii Contents Preface Manual conventions ................ ................ ................. ............. P-1 Notice ...... ................ ................ ................. ................ .......... P-2 1 Getting started On/off, cancel operatio ns ........... .................... ................ ....... 1-1 The display ...................... ................ ................ ................ .... 1-2 The keyboard ............................ ................. ................ .......... 1-3 Menus ............................. ................ ................ ............. ....... 1-8 Input forms ...... ................. ................ ................ ................ .... 1-9 Mode settings ............... ................. ................ ................ ..... 1-10 Setting a mode ................ ................ ................ ............... 1-11 Aplets (E-lessons) .. ................ ................ ................ ............... 1-12 Aplet library ......................... .................... ................ ..... 1-16 Aplet views .............. ................. ................ ................ ..... 1-16 Aplet view configuration ................ ................ ................ .. 1-18 Mathematical calculat ions .................. ................ ................ .. 1-19 Using fractions ........ ................ ................ ................. ........... 1 -25 Complex numbers ................ ................ ................ ............... 1-29 Catalogs and edito rs .. ................ ................. ................ ........ 1-3 0 2 Aplets and their views Aplet views ..... ................. ................ ................ ................ .... 2-1 About the Symbolic v iew .. ................ .................... ............. 2-1 Defining an expression (Symbo lic vie w) .......................... .... 2-1 Evaluating express ions ............... ................ ................ ....... 2-3 About the Plot view .......... ............. ................ ................ .... 2-5 Setting up the plot (Plot view setup) . ................... ................. 2-5 Exploring the graph ......... ................ ................ ................. 2-7 Other views for scaling and splitting the gr aph .................. 2-13 About the numeric view .... ................ ................ ............... 2 -16 Setting up the table (Nume ric view setup) ........... ............... 2 -16 Exploring the table of number s .............................. ........... 2 -17 Building your own table of numbers ...... .................... ........ 2-19 âBuild Your Ownâ menu k eys ............... ................. ........... 2 -20 Example: plotting a circ le .... ................ ................. ........... 2-20 3 Function aplet About the Function aple t .................... ................ ................ .... 3-1 Getting started with the Functi on aplet ....... ................ .......... 3-1 hp40g .book Page ii i Friday, December 9 , 2005 1:03 AM
iv Function aplet interactive a nalysis .............. ................ ............. 3-9 Plotting a piecewise -defined function ........ .................... .... 3-12 4 Parametric aplet About the Pa rametric aplet .......... ................ ................ .......... 4-1 Getting started with the Parame tric aplet ...... ................. ...... 4-1 5 Polar aplet Getting started with the Po lar aplet ..... ................. ................... 5-1 6 Sequence aplet About the Sequ ence aplet ..... ................. ................ ................ 6-1 Getting started with the Se quence aplet . ................... .......... 6-1 7 Solve aplet About the Solve aple t ..... ................... ................. ................ ... 7-1 Getting started with the So lve aplet ....... ................ ............. 7-2 Use an initial guess ........ ................... ................. ................ ... 7-5 Interpreting results ............ ................ ................. ................ ... 7-6 Plotting to find guesses ............. ................ ................ ............. 7-7 Using variables in e quations .............. ................. ................ . 7-10 8 Linear Solver aplet About the Linear S olver aplet ............. ................. ................ ... 8-1 Getting started with the Linear So lver aplet ............. ............. 8-1 9 Triangle Solve aplet About the Triangle Solver aplet ........................... ................ ... 9-1 Getting started with the Triangle So lver aplet .... ................... 9-1 10 Statistics aplet About the Statistics aplet .............. ................... ................. .... 10-1 Getting started with the Statistics aple t ................ .............. 1 0-1 Entering and editing statis tical data ........... ................ ........... 10-6 Defining a regression model . ................ ................ ......... 10-12 Computed statistics . ................. ................ ................ ......... 10-14 Plotting ........ ................. ................ ................ ................. .. 10-15 Plot types .... ................ ................ ................. ............... 10-16 Fitting a curve to 2VA R data ................ ................ ......... 10-17 Setting up the plot (Plo t setup view) .................... ............ 10 -18 Trouble-shoo ting a plot . ................ ................. ............. .. 10-19 Exploring the grap h ........ ................. ................ ............ 10 -19 Calculating predicted values ......... ................. ............... 10-20 11 Inference aplet hp40g .book Page iv Friday, December 9, 2005 1:03 AM
v About the Inference aplet ............................. ................ ........ 11-1 Getting started with the Infe rence aplet ........................... .. 11-1 Importing sample statistics from the S tatistics aplet ......... ..... 11-4 Hypothesis tests ...................... ................ ................. ........... 1 1-8 One-Sample Z-Test ........... ................ .................... ........... 1 1-8 Two-Sample Z-Test ........ ................ ................ ................ .. 11-9 One-Proportio n Z-Test ................. ............. ................ ...... 11-10 Two-Proportion Z-Test .......... ................ ................. ......... 11 -11 One-Sample T-Test ........... ................ ................ ............. 1 1-12 Two-Sample T-Test ..................... ................ ................ ... 11-14 Confidence intervals .......................... ................ ................ 11-15 One-Sample Z-Interval ......... ................ ................. ......... 11 -15 Two-Sample Z-Interval ... ................ ................ ................ 11-16 One-Proportio n Z-Interval ........ ................. ................ ...... 11-1 7 Two-Proportion Z-Interval ............ ................ ................ ... 11-17 One-Sample T-Interval ...... ................ .................... ......... 11 -18 Two-Sample T-Interval.... ................ ................ ................ 11-19 12 Using the Finance Solver Background ............ ................ ............. ................ ............... 12-1 Performing TVM calculations .............. ................ .................. 1 2-4 Calculating Amortizatio ns. ................ ................ ............... 1 2-7 13 Using mathematical functions Math functions ........... ................ ................. ................... ..... 13-1 The MATH menu ............................. ................ ............... 13-1 Math functions by category ......... ................. ................ ........ 13-2 Keyboard functions ... ................. ................ ................ ..... 13-3 Calculus functions ..... ................. ................ ................ ..... 13-6 Complex number function s............. ................ ................ .. 13-7 Constants ................ ................. ................ ................ ..... 13-8 Conversions .......... ................ ................. ................ ........ 13-8 Hyperbolic trigonomet ry ...... .................... ................ ........ 13-9 List functions ................ ................ ............. ................ ... 13-10 Loop functions .................... ................ ................. ......... 13-1 0 Matrix functions ....... ................. ................ ................ ... 13-11 Polynomial functions ..... ................... ................ ............. 13-11 Probability functions ......... ................ ................ ............. 1 3-12 Real-number functions ............................. ................ ...... 13-14 Two-variable statistics ............. ................. ................ ...... 13-17 Symbolic functions ........................... ................ ............. 1 3-17 Test functions .. ................ ................ ................ ............. 13-19 Trigonometry functions ..................... ................ ............. 1 3-20 hp40g .book Page v Friday, December 9, 2005 1:03 AM
vi Symbolic calculations ........ ................ ................. ............... 13-20 Finding derivatives .............. ................ ................ ......... 13-21 Program constants and physical constants ......................... .. 13-24 Program constants ........ ................ .................... ............ 13 -25 Physical constants ..................... ................ ................. .. 13-25 14 Computer Algebra System (CAS) What is a CAS? ............ ................ ................ ................. .... 14-1 Performing symbolic calculations ............... ................ ........... 14-1 An example ............................. ................ ................. .... 14-2 CAS variables ............ ................ ................ ................ ........ 14-4 The current variable ............................... ................ ........ 14-4 CAS modes . ................. ................ ................ ................. .... 14-5 Using CAS functio ns in HOME ............... ................ .............. 14-7 Online Help ............... ................ ................ ................ ........ 14-8 CAS functions in the Equation W riter ............ ................ ........ 14-9 ALGB menu .... ................ ................. ................ ............ 14-10 DIFF menu ... ................ ................ ................. ............... 14-16 REWRI menu .. ................ ................. ............. ............... 14-28 SOLV menu .............. ................ ................ ................. .. 14-33 TRIG menu ............... ................ ................ ................. .. 14-38 CAS Functions on the MATH menu ............ ................ ......... 14-45 Algebra menu ................ ................. ................ ............ 14 -45 Complex menu ......................... ............. ................ ...... 14-45 Constant menu ................... ................ ................ ......... 14-46 Diff & Int menu .. ................. ................ ................ ......... 14-46 Hyperb menu .............. ................ ................. ............... 14-46 Integer menu ............ ................ ................ ................. .. 14-46 Modular menu ....... ................ ................ ................ ...... 14-51 Polynomial menu ...................... ................ ................. .. 14-55 Real menu ......... ................. ................ ................ ......... 14-60 Rewrite menu ........... ................ ................ ................. .. 14-60 Solve menu . ................ ............. ................ ................. .. 14-60 Tests menu ..... ............. ................ ................. ............... 14-61 Trig menu ................... ................ ................. ............... 14-61 CAS Functions on the CMDS menu ..... ................. ............... 14-62 15 Equation Writer Using CAS in the Equation Write r ...................... ................ . 15-1 The Equation Writer me nu bar .............. ................ ........... 15-1 Configuration menu s ........... ................ ................... ........ 15-3 Entering expressions and s ubexpressions .............. ................ . 1 5-5 How to modify an expres sion . ................ ................ ...... 15-11 hp40g .book Page vi Friday, December 9, 2005 1:03 AM
vii Accessing CAS function s ............. ................. ................ ...... 15-12 Equation Writer variable s . ................ ................ ................ 1 5-16 Predefined CAS variables ................ ................ ............. 15 -16 The keyboard in the Eq uation Writer ........ ................ ...... 15-17 16 Step-by-Step Examples Introduction . ................ ................. ................ ................ ..... 16-1 17 Variables and memory management Introduction ..... ................. ................ ................ ................ .. 17-1 Storing and recalling variables ........................... .................. 17-2 The VARS menu ......... ................ .................... ................ ..... 17-4 Memory Manager ......... ................. ................... ................ .. 17-9 18 Matrices Introduction ..... ................. ................ ................ ................ .. 18-1 Creating and storing matrices ................ ................ ............... 18-2 Working with matrices ... ................. ................ ................... .. 18-4 Matrix arithmetic ........ ................ ................. ................ ........ 18-6 Solving systems o f linear equations . ................... ............... 1 8-8 Matrix functions and commands ................ .................... ...... 18-10 Argument conventions ...... ................ ................ ............. 1 8-10 Matrix functions ....... ................. ................ ................ ... 18-10 Examples ............ ................ ................ ................ ............. 1 8-13 19 Lists Displaying and editing lists.... ................ ................ ............... 1 9-4 Deleting lists ......................... ................. ................ ........ 19-6 Transmitting lists ................. ................ ................. ........... 19-6 List functions ........ ................ ................ ................ ............... 19-6 Finding statistical values for list elements ........ ................... ..... 19-9 20 Notes and sketches Introduction ..... ................. ................ ................ ................ .. 20-1 Aplet note view ................. ................ ................... ............... 20-1 Aplet sketch view .......... ................. ................... ................ .. 20-3 The notepad ........... ................ ................ .................... ........ 20-6 21 Programming Introduction ..... ................. ................ ................ ................ .. 21-1 Program catalog ...... ................. ................ ................ ..... 21-2 Creating and editing prog rams .............. .................... ........... 2 1-4 Using programs ... ................ ................ .................... ........... 2 1-7 Customizing an aplet ............... ................ ................. ........... 2 1-9 hp40g .book Page vi i Friday, December 9 , 2005 1:03 AM
viii Aplet naming convention ........ ................ ................ ...... 21-10 Example .................. ................ ................ ................. .. 21-10 Programming commands ................... ................. ............... 21-13 Aplet commands ............. ................. ................ ............ 21 -14 Branch commands ................. ................... ................. .. 21-17 Drawing commands ............... ................ ................ ...... 21-19 Graphic commands ......... ................. ................ ............ 21 -21 Loop commands ................. ................ ................ ......... 21-23 Matrix commands .. ................ ................ ................ ...... 21-24 Print commands . ................. ................ ................ ......... 21-25 Prompt commands........ ................ ................. ............... 21-26 Stat-One and Stat-Two commands ......... ................ ......... 21-29 Stat-Two commands ........ ................. ................ ............ 21 -30 Storing and retrieving variables in programs ............. ...... 21-31 Plot-view variable s .... ................ ................ ................. .. 21-31 Symbolic-view variab les ............. ................ ................. .. 21-38 Numeric-view variables ... ................. ................ ............ 21 -40 Note variables ............. ................ ................. ............... 21-43 Sketch variables .......... ................ ................. ............... 21-43 22 Extending aplets Creating new aplets based on exis ting aplets.... .................... . 22-1 Using a custom ized aplet .............. ................. ................ . 22-3 Resetting an aplet .................... ................ ................ ........... 22-3 Annotating an aplet with notes ............... ................ .............. 2 2-4 Annotating an aplet with ske tches ................. ................ ........ 22-4 Downloading e-less ons from the web ................... ................ . 22-4 Sending and receiving aplets .......... ................ .................... . 22-4 Sorting items in the aplet library menu list ... ................ ........... 22-6 Reference information Glossary ................ ................. ................ ................ ............. R-1 Resetting the HP 4 0gs .... ................ ................ ................. ...... R-3 To erase all memory and res et defaults ..... ................ .......... R-3 If the calculator does no t turn on . .................... ................ ... R-4 Operating details ................ ................. ................ ................ R-4 Batteries .................. ................ ................ ................. ...... R-4 Variables ......... ................ ................ ................. ................ ... R-6 Home variables ........................ ................ ................. ...... R-6 Function aplet variables ....... ................... ................ .......... R-7 Parametric aplet variables ............. ................. ................... R-8 Polar aplet variables ........... ................... ................ .......... R-9 Sequence aplet variables . ................. ................ .............. R-10 hp40g .book Page vi ii Friday, December 9, 2005 1:03 AM
ix Solve aplet variables ........... ................ ................. ........... R-11 Statistics aplet variables ............. ................... ................ .. R -12 MATH menu categ ories . ................. ................ ................ ..... R-13 Math functions ... ................ ................ ................. ........... R-13 Program constants . ................ ................. ................ ........ R-15 Physical Constants .............. ................ ................. ........... R-16 CAS functions .................... ................ ................. ........... R-17 Program commands ......... ................ ................ ............... R-19 Status messages ... ................ ................ ................ ............... R-2 0 Limited Warranty Service .... ............. ................ ................. ................ ........ W-3 Regulatory Notices .......... ................ ................ ............... W-5 Index hp40g .book Page ix Friday, December 9, 2005 1:03 AM
hp40g .book Page x Friday, December 9, 2005 1:03 AM
P-1 Preface The HP 40gs is a feature-rich graphing calculator. It is also a powerful mathematics learning tool, with a built-in computer algebra system (CAS). The HP 40gs is designed so that you can use it to explore mathematical functions and their properties. You can get more information on the HP 40gs from Hewlett-Packardâs Calcula tors web site. You can download customized aplets from the web site and load them onto your calculator. Customized aplets are special applications developed to perform certa in functions, and to demonstrate mathematical concepts. Hewlett Packardâs Calculators web site can be found at: http://www.hp.com/calcula tors Manual conventions The following conventions are used in this manual to represent the keys that you pres s and the menu options that you choose to perform the described operations. ⢠K e y pr esse s ar e repr esented a s follo w s: , , , etc . ⢠Shift k ey s, that is the ke y fu nctions that y ou acce ss b y pres sing the ke y first , are r epres ented as follo ws: CLEAR , MODES , ACOS , etc. ⢠Numbers and letters are r epr esented normally , as follo ws: 5, 7 , A, B, etc . ⢠Menu opti ons, that is , the functio ns that you s elect using the menu ke y s at the top of the k e ypad ar e repr esented as follo ws: , , . ⢠Input form fi elds an d choose list items are repr esented as fo llow s: Function , Polar , Parametric ⢠Y our entr ies as the y appear on the command line or w ithin input forms ar e repr esented as f ollo ws: 2*X 2 -3X 5 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
P-2 Notice This manual and any examples contained herein are provided as-is and are subject to change without notice. Except to the extent prohibit ed by law, Hewlett-Packard Company makes no express or implied warranty of any kind with regard to this manu al and specifically di sclaims the implied warranties and conditions of merchantability and fitness for a part icular purpose and Hewlett-Packard Company shall not be liable for any errors or for incidental or consequential damage in connection with the furnishing, performance or use of this manual and the examples herein. © Cop y r ight 199 4 -199 5, 19 9 9- 2000, 200 3, 2006 Hew lett-P ackar d Dev elopment C ompan y , L. P . The programs that control your HP 40gs a re copyrighted and all rights are reserved. Reproduction, adaptation, or translation of those programs without prior written permission from Hewlett-Packard Company is also prohib ited. Preface.fm Page 2 Friday, February 17, 2006 9:47 AM
Getting started 1-1 1 Get ting star ted On/off, cancel operations To turn on Press to turn on the calculator. To cancel When the calculator is on, the key cancels the current operation. To turn off Press OFF to turn the calculator off. To save power, the calculat or turns itself off after several minutes of inactivity. All stored and displayed information is saved. If you see the (( ⢠)) annunciator or the Low Bat message, then the calculator needs fresh batteries. HOME HOME is the calculatorâs home view and is common to all aplets. If you want to perform calculations, or you want to quit the current activity (such as an aplet, a program, or an editor), press . All mathematical functions are available in the HOME. The name of the current aplet is displayed in the title of the home view. Protective cover The calculator is provided with a slide cover to protect the display and keyboard. R emove the cover by grasping both sides of it and pulling down. You can revers e the slide cover and slide it onto the back of the calculator. this will help prevent you losing the cover while you are using the calculator. To prolong the life of the calculator, always place the cover over the display and k eyboard when you are not using the calculator. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
1-2 Getting started The display To adjust the contrast Simultaneously press and (or ) to increase (or decrease) the contrast. To clear the display ⢠Pres s CANCEL to clear the edit line . ⢠Pres s CLEAR to cle ar the edit line and the display history . Parts of the display Menu key or soft key labels. The la bels for the menu k ey s â cur r ent meanings . is the label f or the f irst menu k ey in this pi ctur e. âPr ess â means to press the fir st menu k ey , that is, the leftmost t op-ro w k ey on the calculator k e yboar d. Edit line. The line of current en try. History. The HOME display ( ) shows up to four lines of history: the most r ecent input and output. Older lines scroll off the top of the display but are retained i n memory. Title. The name of the current aplet is displayed at the top of the HOME view. RAD, GRD, DEG specify whether Radians, Grad s or Degrees a ngle mode i s set for HOME. The T and S symbols indicate whether there is more history in the HOME displa y. Press the and to scroll in the HOME display. Title Edit lin e History Menu k ey labels hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Getting started 1-3 Annunciators . Annunciators are sy mbo ls that appear above the title bar and give you important status information. The keyboard Annunciator Description Shift in effect for next keystroke. To cancel, press again. α Alpha in effect for next keystroke. To cancel, press again. (( ⢠)) Low battery power. Busy. Data is being transferred. HP 4 0 g s Gr a phing C alc ulator Menu Key Labels Menu Keys Cursor Aplet Control Alpha Key Shift Key Enter Keys Key Keys hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
1-4 Getting started Menu keys ⢠On the calculato r ke yboar d , the top ro w of k ey s ar e called menu k ey s. T heir meanings depend on the conte xtâthatâs w hy the y ar e blank. T he menu k e y s are so metimes called â soft k ey sâ . ⢠The bo ttom line of the displa y sho ws the labels f or the menu k ey s â cur rent meanings . Aplet control keys The aplet control keys are: Ke y Meaning Displays the Symbolic view for the current aplet. See âSymbolic viewâ on page 1-16. Displays the Plot view for the current aplet. See âPlot viewâ on page 1-16. Displays the Numeric view fo r the current aplet. See âNumeric viewâ on page 1-17. Displays the HOME view. See âHOMEâ on page 1-1. Displays the Aplet Library menu. See âAplet libraryâ on page 1-16. Displays the VIEWS menu. See âAplet viewsâ on page 1-16. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Getting started 1-5 Entry/Edit keys The entry and edit keys are: K ey Meaning ( CANCEL ) Cancels the current operation if the calculator is on by pressing . Pressing , then OFF turns the calculator off. Accesses the function printed in blue above a key. Returns to the HOME view, for performing calculations. Accesses the alphabetical characters printed in orange below a key. Hold down to enter a string of characters. Enters an input or executes an operation. In calculations, acts like â=â. When or is present as a menu key, acts the same as pressing or . Enters a negative number. To enter â25, press 25. Note: this is not the same operation that the subtract button performs () . Enters the independent var iable by inserting X , T, θ, or N into the edit line, depending on the current active aplet. Deletes the character under the cursor. Acts as a backspac e key if the cursor is at the end of the line. CLEAR Clears all data on the screen. On a settings screen, for example Plot Setup, CLEAR returns all settings to their default values. , , , Moves the cursor around the display. Press first to move to the beginning, end, top or bottom. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
1-6 Getting started Shifted keystr okes There are two shift keys that you use to access the operations and characters printed above the keys: and . CHARS Displays a menu of all available characters. To type one, use the arrow keys to highlight it, and press . To select multiple characters, select each and press , then press . Ke y Meaning (Continued) Key De s c r ip t i o n Press the key to access the operations printed in blue above the keys. Fo r instance, to access the Modes screen, press , then press . ( MODES is labeled in blue above the key). You do not need to hold down when you press HOME. This action is depicted in this manual as âpress MODES .â To cancel a shift, press again. The alphabetic keys are also shifted keystrokes. For instance, to type Z, press Z. (The letters are printed in orange to the lower right of each key.) To cancel Alpha, pres s again. For a lower case letter, press . For a string of letters, hold down while typing. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Getting started 1-7 HELPWITH The HP 40gs built-in help is available in HOME o nly. It provides syntax help for bu ilt-in math functions. Access the HELPWITH command by pressing SYNTAX and then the math key for which you require syntax help. Example Pres s SYNTAX Note: R emov e the left paren thesis fr om built-in functi ons suc h as sine, co sine, and ta ngent bef ore inv oking the HELPWI TH command . Note: In the CA S s ys tem, pr essing the S YNT AX w ill sho w the CAS help men u . Math keys HOME ( ) is the place to do non-symbolic calculations. (For symbolic ca lculations, use the computer algebra system, referred throug hout this manual as CAS). Keyboard keys. The most common operations ar e available from the keyboard, such as the arithmetic (like ) and trigonometric (lik e ) functions. Press to complete the operation: 256 displays 16. . MATH menu. Press to open the MATH menu. The MATH menu is a comprehensive list of math functions that do not appear on the keyboard. It also includes categories for all other functions and c onstants. The functions are grouped by category, ranging in alphabetical order from Calculus to Trigono metry. ⢠The ar r ow k e y s scr oll thr ough the list ( , ) and mov e fr om the category list in the left column to the item lis t in the righ t column ( , ). ⢠Pres s to insert the selected command onto the edit line . ⢠Pre ss to dismiss the MA TH menu w ithout selecting a co mmand. chapter-1.fm Page 7 Friday, Decembe r 16, 2005 2:20 PM
1-8 Getting started ⢠Pr essing display s the list of Pr ogr am Const ants. Y ou c an use thes e in progr ams that you d eve l op. ⢠Pr essing display s a menu of ph ys ical constants fr om the fields of c hemistry , physi cs, and quantum mechani cs. Y ou can use these constan ts in calculati ons . (pSee âPh y sical constants â on page 13- 25 f or mor e infor mation .) ⢠Pr essing takes y ou to the beginning of the MA TH menu . See âMath functions by categoryâ on page 13-2 for details of the math functions. HINT When using the MA TH menu , or an y menu on the HP 40gs , pressing an alpha ke y takes y ou straight to the fir st menu optio n beginning with that alpha ch arac ter . With this method, y ou do n ot need to pr ess fir st. Just pr ess the k ey that corr esponds t o the commandâs beginning alpha charac ter . Note that when the MATH menu is open, you can also access CAS commands. You do this by pressing . This enables you to use CAS commands on the HOME screen, without opening CAS. See Chapter 14 for details of CAS commands. Program commands Pressing CMDS displays the list of Program Commands. See âProgramming commandsâ on page 21-1 3. Inactive keys If you press a key that does not operate in the current context, a warning symbol like this appears. There is no beep. Menus A menu offers you a choice of items. Menus are displayed in one or two columns. ⢠Th e a rrow i n t h e display means mor e items belo w . ⢠Th e a rrow i n t h e display means mor e items abov e. ! hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Getting started 1-9 To search a menu ⢠Pres s or to scr oll through the list. If y ou pres s or , y ouâll go all the w ay to the end or the beginning of the list . Hi ghlight the item y ou want to s elect , then pres s (or ). ⢠If there ar e two columns , the left column shows gener al categor ies and the r ight column sho ws spec ifi c conte nts within a catego ry . Hi ghlight a gener al category in the left column , then highlight an item in the r ight column . The list in the r ight column change s when a diff eren t category is highligh ted. Pres s or w hen y ou hav e highlight ed your select ion. ⢠T o speed-sear ch a list , t ype the f irst lette r of the w ord . F or e xample , to f ind the Matri x category in , pr ess , the A lpha âMâ k ey . ⢠T o go up a page, yo u can press . T o go dow n a page , press . To cancel a menu Press (for CANCEL ) or . This cancels the current operation. Input forms An input form shows several fields of information for you to examine and specify. After highlighting the field to edit, you can enter or edit a number (or expression). You can also select options from a list ( ). Some input forms include items to check ( ). See below for examples input forms. Reset input form values To reset a field to its default values in an input form, move the cursor to that field and p ress . To reset all default field values in the input form, press CLEAR . hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
1-10 Getting started Mode settings You use the Modes input form to set the modes for HOME. HINT Although the numeric setting in Modes affects only HOME, the angle setting controls HOME and the current aplet. The angle setting selected in Modes is the angle setting used in both HOME and current aplet. To further configure an aplet, you use the SETUP keys ( and ) . Press MODES to access the HOME MODES input form. Setting Options Angle Measure Angle values are: Degrees . 360 degrees in a circle. Radians . 2 Ï radians in a circle. Grads . 400 grads in a circle. The angle mode you set is the angle setting used in both HOME and the current aplet. This is done to ensure that trigonometric calculations done in the current aplet and HOME give the same result. Number Format The number format mode you set is the number format used in both HOME and the current aplet. Standard . Full-precision display. Fixed . Displays results rounded to a number of decimal places. Example: 123.456789 becomes 123.46 in Fixed 2 format. Scient ific . Displays results with an exponent, one digit to the left of the decimal point, and the specified number of decimal places. Example: 123.456789 becomes 1.23E2 i n Scientific 2 format. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Getting started 1-11 Setting a mode This example demonstrates how to change the angle measure from the default mode, radians, to degrees for the current aplet. The procedure is the same for changing number format and decimal mark modes. 1. Pres s MODES t o o p e n t h e H O M E M O D E S i n p u t form. Engineering . Displays result with an exponent that is a multiple of 3, and the specified number of significant digits beyond the first one. Example: 123.456E7 becomes 1.23E9 in Engineering 2 format. Fraction . Displays results as fractions based on the spec ified number of decimal places. Examples: 123.456789 becomes 123 in Fraction 2 format, and .333 becomes 1/3 and 0.142857 beco mes 1/7. See âUsing fractionsâ on page 1-25. Mixed Fraction . Displays results as mixed fractions based on the specified number of decimal places. A mi xed fraction has an in teger part and a fractional part. Examples: 123.456789 becomes 123 16/ 35 in Fraction 2 format, and 7÷ 3 returns 2 1/3. See âUsing fractionsâ on page 1-25. Decimal Mark Dot or Comma . Displays a number as 12456.98 (Dot mode) or as 12456,98 (Comma mode). Dot mode uses commas to separate elements in lists and matrices, and to separate function arguments. Comma mode uses periods (dot) as separators in these contexts. Setting Options (Continued) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
1-12 Getting started The c ursor (hi ghlight) is in the firs t fie ld, Angle Measure . 2 . Pres s to display a lis t of choices. 3. Pre s s to select Degrees , and press . The angle measur e changes to degrees. 4. Pres s to return to HOME . HINT Whenever an input form has a list of choices for a field, you can press to cycle through them instead of using . Aplets (E-lessons) Aplets are the application environments where you explore different classes of mathematical operations. You select the aplet that you want to work with. Aplets come from a variety of sources: ⢠Built-in the HP 40gs (initial pur chas e) . ⢠Aplets cr eated by sa ving e x isting aplets, whi ch ha ve been modified , with spec if ic confi gurati ons. See âCreating ne w aplets based on e xisting aplets â on page 2 2-1. ⢠Do wnloaded f rom HPâs C alculat ors w eb site . ⢠Copi ed fr om another calc ulator . Aplets are stored in the Aplet library. See âAplet libraryâ on page 1-16 for further information. You can modify configuration settings for the graphical, tabular, and chapter-1.fm Page 1 2 Friday, Decemb er 9, 2005 1:26 AM
Getting started 1-13 symbolic views of the aplets in the following table. See âAplet view configurationâ on page 1-18 for further information. In addition to these aplets, wh ich can be used in a variety of applications, the HP 40 gs is supplied with two teaching aplets: Quad Explorer and Trig Explorer. You cannot modify configuration settings for these apl ets. A great many more teaching ap lets ca n be found at HPâs web site and other web sites created by educators, together with accompanying documentation, often with student work sheets. These ca n be downloaded free of Aplet name Use this aplet to explor e: Function Real-valued, rectangular functions y in terms of x . Example: . Inference Confidence intervals and Hypothesis tests based on the Normal and Students-t distributions. Parametric Parametric relations x and y in terms of t . Example: x = cos(t ) and y = sin(t ). Polar Polar functions r in terms of an angle θ . Example: . Sequence Sequence functions U in terms of n , or in terms of previous terms in the same or another sequence, such as and . Example: , and . Solve Equations in one or more real-valued variables. Example: . Finance Time Value of Money (TVM) calculations. Linear Solver Solutions to sets of two or three linear equations. Triangle Solver Unknown values for the lengths and angles of triangles. Statistics One-variable ( x ) or two-variable ( x and y ) statistical data. y 2 x 2 3 x 5 = r 24 θ () cos = U n 1 â U n 2 â U 1 0 = U 2 1 = U n U n 2 â U n 1 â = x 1 x 2 x â2 â = hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
1-14 Getting started charge and transferred to the HP 40gs using the provided Connectivity Kit. Quad Explorer aplet The Quad Explorer aplet is used to investigate the behaviour of as the values of a , h and v change, both by manipulati ng the equation and seeing the change in the graph, and by manipulating the graph and seeing the change in the equat ion. HINT More detailed documentation, and an accompanying student work sheet can be found at HPâs web site. Pres s , select Quad Explorer , and then press . The Quad Explore r aplet opens in mode, in which the arrow keys, the and keys, and the ke y are used to change the shape of the graph. This changing shape is reflected in the equation displayed at the top right corner of the screen, while the original graph is retained for compar ison. In this mode the graph controls the equation. It is also possible to have the equation control the graph. Pressing displays a sub-expression of your equation. Pressing the and key moves between sub- expressions, while pressing the and key changes their values. Pressing allows the use r to select whether all three sub-expressions will be explored at once or only one at a time. A button is provided to evaluate the studentâs knowledge. Pressing displays a target quadr atic graph. The student must manipulate the equationâs parameters to make the equation match the target graph. When a student feels that they have correctly chosen the parameters a button eval uates th e answer and provide feedb ack. An button is provided for those who give up! ya x h () 2 v = hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Getting started 1-15 Trig Explorer aplet The Trig Explorer aplet is used to investigate the behaviour of the graph of as the values of a , b , c and d change, both by manipulating the equation and seeing the change in the graph, or by manipulating the graph and seeing the change in the equation. Press , select Trig Explorer , and then press to display the screen shown right. In this mode, the graph controls the equation. Pressing the and keys transforms the graph, with these transformations reflected in the equation. The button labelled is a toggle between and . When is chosen, the âpoint of controlâ is at the origin (0,0) and the and keys control vertical and horizontal transformations. When is chosen the âpoint of controlâ is on the first extremum of th e graph (i.e. for the sine graph at . The arrow keys change the amplitude and frequency of the graph. This is most easily seen by experimenting. Pressing displays the equation at the top of the screen. The equat ion is controlled by the graph. Pressing the and keys moves from parameter to parameter. Pressing the or key changes the parameterâs values. The default angle setting for this aplet is radians. The angle setting can be changed to degrees by pressing . ya b x c () d sin = Origin Ï 21 , â () Extremum hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
1-16 Getting started Aplet library Aplets are stored in the Aplet library. To open an aplet Press to display the Aplet library menu. Select the aplet and press or . From within an aplet, you can return to HOME any time by pressing . Aplet views When you have configured an aplet to define the relation or data that you want to explore, you can display it in different v iews. Here a re illu strations of the three major aplet views (Symbolic, Plot, and Numeric), the six supporting aplet views (from the VIEWS menu), and the two user-defined views (Note and Sketch). Note : some apletsâsuch as the Linear Solver aplet and the Triangle Solver apletâonly have a single view, the Numeric view. Symbolic view Pr ess to display the apletâs Sy mbolic v iew . Y ou use this v ie w to define the functi on(s) or equati on(s) that yo u want to e xplore . See âAbout the Symbolic viewâ on page 2-1 for further information. Plot view Pres s to display the apletâs P lot vie w . In this v ie w , the functi ons that you ha ve def ined are display ed gr aphicall y . See âAbout the Plot viewâ on page 2-5 for further information. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Getting started 1-17 Numeric view Press to display the apletâs Numeric view. In this view, the functions that you have defined are displayed in tabular format. See âAbout the numeric viewâ on page 2-16 f or further information. Plot-Table view The VIEWS menu contains the Plot-Table view. Select Plot-Table Splits the screen into the plot and the data table. See âOther views for scaling and splitting the graphâ on page 2-13 for futher information. Plot-Detail view The VIEWS menu contains the Plot-Detail view. Select Plot-Detail Splits the screen into the plot and a close-up. See âOther views for scaling and splitting the graphâ on page 2-13 for further information. Overlay Plot view The VIEWS menu contains the Overlay Plot view. Select Overlay Plot Plots the current expression(s) without erasing any pre-existing plot(s). See âOther views for scaling and splitting the graphâ on page 2-13 for further information. hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
1-18 Getting started Note view Press NOTE to display the apletâs note view. This note is transferred with the aplet if it is sent to another calculator or to a PC. A note view contains text to supplement an aplet. See âNotes and sketchesâ on pa ge 20-1 for further information. Sketch view Press SKETCH to disp lay the ap letâs sket ch view. Displays pictures t o supplement an aplet. See âNotes and sketchesâ on page 20-1 for further information. Aplet view configuration You use the SETUP keys ( , an d ) to configure the aplet. For example, press SETUP - PLOT ( ) to display the input form for setting the apletâs plot settings. Angle measure is controlled using the MODES view. Plot Setup Press SETUP - PLOT . Sets parameters to plot a graph. Numeric Setup Press SETUP - NUM . Sets parameters for building a table of numeric values. Symbolic Setup This view is only available in the Statistics aplet in mode, where it plays an important role in choosing data models. Press SETUP - SYMB . hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Getting started 1-19 To change views Each view is a separate environment. To change a view, select a different view by pressing , , keys or select a view from the VIEWS menu. To change to HOME, press . You do not explicitly close the current view, you just ente r another oneâlike passing from one room into another in a house. Data that you enter is automatically saved as you enter it. To save aplet configuration You can save an aplet config uration that you have used, and transfer the aplet to other HP 40gs calculators. See âCreating new aplets based on existing apletsâ on page 22-1. Mathematical calculations The most commonly used math operations are available from the keyboard. Access to other math functions is via the MATH menu ( ). You can also CAS for symbolic calculations. See âComputer Algebra System (CAS)â on page 14-1 for further information. To access programming commands, press CMDS . See âProgramming commandsâ on page 21-13 for further information. Where to start The home base for the calculator is the HOME view ( ). You can do all non-sym bolic calculations here, and you can access all operations. (Symbolic calculations are done using CAS.) Entering expressions ⢠In the HOME view, you enter an e xpr essio n in the same left-to -right or der that y ou would w r ite the expr ession . This is called algebrai c entry . (In CAS you enter expressions using the Equation Writer, explained in detail in Chap ter 15, âEquation Writerâ.) ⢠T o enter functions, select the key or MA TH menu i tem for that f unction . Y ou can also enter a func tion b y using the Alpha k e ys t o spell out its name . ⢠Pres s to evaluate the expr ession y ou have in the edit line (w here the blinking c ursor is). An exp res s io n can contain numbers , functi ons, and varia bl es. hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
1-20 Getting started Example Calculate : Long results If the result is too long to fit on the display line, or if you want to see an expression in textbook format, press to highlight it and then press . Negative numbers Type to start a negative number or to insert a negative sign. To raise a negative number to a power, enclose it in parentheses. For example, (â5) 2 = 25, whereas â5 2 = â25. Scientific notation (powers of 10) A number like or is written in scientific notation , that is, in terms of powers of ten. This is simpler to work with than 50000 or 0.00000 0321. To enter numbers like these, use EEX . (This is easier than using 10 .) Example Calculate 4 EEX 13 6 EEX 23 3 EEX 5 Explicit and implicit multiplication Implied multiplication takes pl ace when two operands appear with no operator in between. If you enter AB , for example, the result is A*B . 23 2 14 8 â 3 â --------------------------- - 45 () ln 23 14 8 3 45 51 0 4 Ã 3.21 10 7 â Ã 41 0 13 â Ã () 61 0 23 Ã () 31 0 5 â Ã ---------------------------------------------------- hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Getting started 1-21 However, for clarity, it is better to include the multiplication sign where you expect multiplication in an expression. It is clearest to enter AB as A*B . HINT Implied multiplication will not always work as expected. For example, entering A(B 4) will not give A*(B 4) . Instead an error message is displayed: âInvalid User Functionâ. This is because the calculator interprets A(B 4) as meaning âevaluate function A at the value B 4 â, and fun ction A does not exist. When in doubt, insert the * sign manually. Parentheses You need to use parentheses to enclose arguments for functions, such as SIN(45). You can omit the final parenthesis at the end of an edit line. The calculator inserts it automatically. Parentheses are also important in specifying the order of operation. Without parentheses, the HP 40gs calculates according to the order of algebraic precedence (the next topic). Following are some examples using parentheses. Entering... Calculates... 45 Ï sin (45 Ï) 45 Ï sin (45) Ï 85 9 85 9 85 9 Ã 85 9 Ã hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
1-22 Getting started Algebraic precedence order of evaluation Functions within an expression are evaluated in the following order of precedence. Functions with the same precedence are evaluated in order from left to right. 1. Ex pressions within p arentheses. Neste d parenth eses are e valuated fr om inner to outer . 2 . Pr efi x func tions, suc h as SIN and L OG . 3 . P ostfi x func tions , such as ! 4. P ow er functi on , ^, NTHROO T . 5 . Negation , multiplicati on, and di v ision . 6 . Additi on and subtr acti on. 7. A N D a n d N O T . 8. OR and XOR . 9 . Le ft argument o f | (w here). 10. Eq uals, =. Largest and smallest numbers The smallest number the HP 40gs can represent is 1Ã1 0 â499 (1Eâ499). A smaller result i s displayed as zero. The largest number is 9.9 9999999999 à 10 499 (1E499). A greater result is displayed as this number. Clearing numbers ⢠clears the c harac ter under the c ursor . When the cur sor is positi oned after the last c haract er , deletes the c har acter to the le ft of the cur sor , that is, it performs the same as a backspace k ey . ⢠CANCEL ( ) clears the edit line . ⢠CLEAR clear s all input and outpu t in the display , including the di splay history . Using previous results The HOME display ( ) shows you four lines of input/output history. An un limited (except by memory) number of previous lines ca n be displayed by scrolli ng. You can retrieve and reuse any of these values or expressions. Output Last output Input Last input Edit line hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Getting started 1-23 When you highlight a previous input or result (by pressing ), the and menu labels appear. To copy a previous line Highlight the line (press ) and press . The number (or expression) is co pied into the ed it line. To reuse the last result Press ANS (last answer) to put the last result from the HOME display into an expression. ANS is a varia ble that is updated each time you press . To repeat a previous line To repeat the very last line, just press . Otherwise , highlight the line (press ) first, and then pres s . The highlighted expression or numbe r is re-entered. If the previous line is an expression containing the ANS , the calculation is re peated iteratively. Example See how ANS retrieves and reuses the last result (50), and updates ANS (from 50 to 75 to 100). 50 25 You can use the las t result as the first expression in the edit line without pressing ANS . Pressing , , , or , (or other operators th at require a preceding argument) automatically enters ANS before the operator. You can reuse any other ex pression or value in the HOME display by highlighting the expression (using the arrow keys), then pressing . See âUsing previous resultsâ on page 1-22 for more details. The variable ANS is different from the numbers in HOMEâs display history. A value in ANS is stored internally with the full precision of the calculated result, whereas the displayed numbers match the display mode. hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
1-24 Getting started HINT When you retrieve a number from ANS , you obtain the result to its full precision. When you retrieve a number from the HOMEâs display history, you obtain exactly what was displayed. Pressing evaluates (or re-evaluates) the last input, whereas pressing ANS copies the last result (as ANS ) into the edit line. Storing a value in a variable You can save an answer in a variable and use the variable in later calculation s. There are 27 variables available for storing real values. These are A to Z and θ . See Chapter 17, âVariables and memory managementâ for more information on variables. For example: 1. P erform a calculati on. 45 8 3 2 . Stor e the re sult in the A va ria bl e. A 3 . P erform ano ther calculatio n using the A var iable . 95 2 A hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Getting started 1-25 Accessing the display history Pressing enables the highlight bar in the display history. While the highlight bar is active, the following menu and keyboard keys are very useful: Clearing the display history Itâs a good habit to cl ear the display history ( CLEAR ) whenever you have finish ed working in HOME. It saves calculator memory to clear the display history. Remember that all your previous inputs and results are saved until you clear them. Using fractions To work with fractions in HOME, you set the number format to Fraction or Mixed Fraction , as follows: Setting Fraction mode 1. In HOME , open the HOME MODES input f orm . MODES Key Fu n c t i o n , Scrolls through the display history. Copies the highlighted expression to the position of the cursor in the edit line. Displays the current expression in standard mathematical form. Deletes the highlighted expression from the display history, unless there is a cursor in the edit line. CLEAR Clears all lines of display history and the edit line. hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
1-26 Getting started 2 . Select Number Format , press to display the options , and highlight Fraction or Mixed Fraction . 3 . Press to selec t the Number F ormat option, then mov e to the precisi on value field . 4. Enter the prec ision v alue that you w ant to use , and pre ss to set the pr ec ision . Pr ess to r etur n to HOME . See âSetting fr action pr ec ision â belo w for mor e infor mation . Setting fraction precision The fraction precision setting determines the prec ision in which the HP 40gs converts a decimal value to a fraction. The greater the precision value that is set, the closer the fraction is to the decim al value. By choosing a precision of 1 you are saying th at the fraction only has to match 0.234 to at least 1 decimal place (3/13 is 0.23076...). The fractions used are found using the technique of continued fractions. When converting recurring decimals this can be important. For example, at precision 6 the decimal 0.6666 becomes 3333/5000 (6666/10000) wherea s at precision 3, 0.6666 becomes 2/3, whi ch is probably what you would want. For example, when converting .234 to a fraction, the precision value has th e following effect: hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Getting started 1-27 ⢠Prec ision set to 1: ⢠Prec ision set to 2 : ⢠Prec ision set to 3: ⢠Prec ision set to 4 Fraction calculations When entering fractions: ⢠Y ou use the ke y to separate the numerator part and the denominator par t of the fr action . ⢠T o enter a mi xed f rac tion , fo r ex ample , 1 1 / 2 , you enter it in the for mat (1 1 / 2 ). For example, to perform the following calculation: 3(2 3 / 4 5 7 / 8 ) 1. Set the Number f ormat mode to Fraction or Mixed Fraction and spec ify a pr ec ision v alue of 4. In this example , we âll select Fraction as our form at. ) MODES Select Fraction 4 hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
1-28 Getting started 2. E n t e r t h e c a l c u l a t i o n . 32 3 45 7 8 Note: Ensur e y ou ar e in the HOME v ie w . 3 . Ev aluate the calc ulation. Note that if you had selected Mixed Fraction instead of Fraction as the Number format, the answer would have been expressed as 25 7/8. Converting decimals to fractions To convert a decimal value to a fraction: 1. Set the number format mode to Fraction or Mixed Fraction . 2 . E ither r etri ev e the value f r om the History , or ent er the value on the command line . 3 . Pr ess to con ve rt the number to a fr acti on. When converting a decimal to a fraction, keep the following points in mind: ⢠When con verting a rec urr ing dec imal to a frac tion , set the fr acti on pr ecisi on to about 6 , and ensur e that y ou include mor e than six dec imal places in the rec urring dec imal that y ou ente r . In this ex ample , the fr acti on prec ision is set to 6. The top calculati on r eturns the corr ect r esult . The bottom one does not . ⢠T o con vert an ex act dec imal to a fracti on, set the fr acti on prec ision t o at least two mor e than the number of dec imal places in the decimal . hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Getting started 1-29 In this ex ample , the fr action pr ec ision is set to 6. Complex numbers Complex results The HP 40gs can return a complex number as a result for some math functions. A comp lex number appears as an ordered pair ( x, y ), where x is the real part and y is the imaginary part. For example, entering returns (0,1). To enter complex numbers Enter the number in either of these forms, where x is th e real part, y is the imaginary part, and i is the im aginary constant, : ⢠( x, y ) or ⢠x iy . To enter i : ⢠pres s or ⢠pres s , or keys t o se l e ct Constant , to mov e to the r ight column of the menu , to select i , and . Storing comple x numbers There are 10 variables available for storing complex numbers: Z0 to Z9. To store a complex number in a variable: ⢠Enter the complex number , press , enter the var iable to s tor e the number in, and pr ess . 45 Z 0 1 â 1 â hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
1-30 Getting started Catalogs and editors The HP 40gs has several catalogs and editors. You use them to create and manipulate objects. They acc ess features and stored values (numbe rs or text or other items) that are independent of aplets. ⢠A catalog lists items, w hich y ou can delete or trans mit , for e xam ple an aplet . ⢠An editor lets you c reate or modify items and numbers, f or ex ample a not e or a matri x. Catalog/Editor Contents Aplet library () Aplets. Sketch editor ( SKETCH ) Sketches and diagrams, See Chapter 20, âNote s and sketchesâ. List ( LIST ) Lists. In HOME, lists are enclosed in {}. See Chapter 19, âListsâ. Matrix ( MATRIX ) One- and two-dimensional arrays. In HOME, arrays are enclosed in []. See Chapter 18, âMatricesâ. Notepad ( NOTEPAD ) Notes (short text entries). See Chapter 20, âNote s and sketchesâ. Program ( PROGRM ) Programs that you create, or associated with user-defined aplets. See Chapter 21, âProgrammingâ. Equation Writer () The editor used for creating expressions and equations in CAS. See Chapter 15, âEquation Writerâ. hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-1 2 Aplets and th eir vie ws Aplet views This section examines the options and functionality of the three main views for the Functio n, Polar, Parametric, and Sequence aplets: Symbolic, Plot, and Numeric views. About the Symbolic view The Symbolic view is the defining view for the Function, Parametric, Polar, and Seque nce aplets. The other views are derived from the symbolic expr ession. You can create up to 10 different definitions for each Function, Parametric, Polar, and Sequence aplet. You can graph any of the relations (in the same aplet) simultaneously by selecting them. Defining an expression (Symbolic view) Choose the aplet from the Aplet Library. Pres s or to select an aplet . The F unction, P arametr ic, P olar , and Sequence aplets start in the S ymboli c vi ew . If the highligh t is on an ex isting e xpr essio n, sc ro ll to an empty lin eâunless you don â t mind wr iting over the ex pre ssionâ or , clear one line ( ) or all lines ( CLEAR ). Expre ssions ar e selec ted (chec k mark ed) on entry . T o deselect an e xpres sion, pr ess . All selected expr essions ar e plotted. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
2-2 Aplets and their views â F or a Func tion definition , en ter an ex pre ssion t o def ine F(X) . The only independent variab le in th e exp re ss io n i s X. â For a P arametric definition , en ter a pair of expr essi ons to def ine X(T) and Y(T) . The onl y independent var iable in the e xpre ssions is T . â For a Pol a r definition , en ter an ex pre ssion t o def ine R ( θ ). T he only independent variab le in th e exp re ss io n i s θ . â For a S eq u e n ce definition , either enter the f irst te rm , or the fir st and second terms, for U (U1 , or ... U9 , or U0 ). Then define the n th term o f the sequence in ter ms of N or of the pri or ter ms, U(Nâ1) and/or U(Nâ2) . The expr essions should pr oduce real-valued sequences with in teger domains. Or def ine the n th term a s a non-rec ursi v e expr es sion in ter ms of n only . In this case, the calc ulator inserts the f irst two ter ms based on the e xpre ssion that y ou def ine . â Note : Y o u will hav e to enter the second term if the hp40gs is una ble to calculate it a utomaticall y . T ypi cally if U x(N) depends on U x(Nâ2) then yo u must enter Ux(2). hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-3 Evaluating expressions In aplets In the Symbolic view, a variable is a symbol only, and does not represent one specif ic value. To evaluate a function in Symbolic view, press . If a function calls another function, then resolves all references to other functions in terms of their independent variab le. 1. Choos e the F unction aplet. Select Function 2 . Enter the e xpressi ons in the F uncti on apletâs S ymboli c view . A B F1 F2 3 . Highli ght F3(X). 4. Pres s Note ho w the v alues for F1(X) and F2(X) ar e substitu ted into F3(X). hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
2-4 Aplets and their views In HOME You can also evaluate any expression in HOME by entering it into the edit line and pressing . For example, define F4 as below. In HOME, type F4(9) and press . This evaluates the expression, substituting 9 in place of X into F4 . SYMB view keys The following table details the menu keys that you use to work with the Symbolic view. Ke y Meaning Copies the highlighted expression to the edit line for editing. Press when done. Checks/unchecks the current expression (or set of expressions). Only checked expression(s) are evaluated in the Plot and Numeric views. Enters the independent variable in the Function aplet. Or, you can use the key on the keyboard. Enters the independent variable in the Parametric aplet. Or, you can use the key on the keyboard. Enters the independent variable in the Polar aplet. Or, you can use the key on the keyboard. Enters the independent variable in the Sequence aplet. Or, yo u can use the key on the keyboard. Displays the current expression in text book form. Resolves all references to other definitions in terms of variab les and evaluates all arithmetic expressions. Displays a menu for entering variable names or contents of variables. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-5 About the Plot view After entering and selecting (check marking) the expression in the Symbolic view, press . To adjust the appearance of the graph or the interval that is displayed, you can change the Plot view settings. You can plot up to ten expressions at the same time. Select the expressions you want to be plotted together. Setting up the plot (Plot view setup) Press SETUP - PLOT to define any of the settings shown in the next two tables. 1. Highli ght the fi eld to edit . â If ther e is a number to enter , type it in and pr ess or . â If ther e is an option to ch oose , pre ss , highligh t your c hoi ce, and pr ess or . As a shortcut to , jus t highlight the field to change and pr ess to cyc le thro ugh the options . â If there is an option to select or deselect , press to ch ec k o r u n che ck i t. 2 . Pr ess to vie w mor e settings. 3 . When done , pr ess to vie w the ne w plot. Displays the menu for enteri ng math operations. CHARS Displays special characters. To enter one, place the cursor on it and press . To remain in the CHARS menu and enter another special character, press . Deletes the highlighted expression or the current character in the edit line. CLEAR Deletes all expressions in the list or clears the edit line. K ey Meaning (Continued) hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
2-6 Aplets and their views Plot view settings The plot view settings are: Those items with space for a checkmark are settings you can turn on or off. Press to display the second page. Field Meaning XRNG, YRNG Specifies the minimum and maximum horizontal ( X ) and vertical ( Y ) values for the plotting window. RES For function plots: Resolution; âFasterâ plots in alternate pixel columns; âDetailâ plots in every pixel column. TRNG Parametric aplet: Specifies the t- values ( T ) for the graph. θ RNG Polar aplet: Specifies the angle (θ ) value range for the graph. NRNG Sequence aplet: Specifies the index ( N ) values for the graph. TSTEP For Parametric plots: the increment for the independent variable. θ STEP For Polar plots: the increment value for the independent variable. SEQPLOT For Sequence a plet: Stairstep or Cobweb types. XTICK Horizontal spacing for tickmarks. YTICK Vertical spacing for tickmarks. Field Meaning SIMULT If more than one relation is being plotted, plots them simultaneously (otherwise sequentially). INV. CROSS Cursor crosshairs invert the status of the pixels they cover. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-7 Reset plot settings To reset the default values for all plot settings, press CLEAR in the Plot Setup view. To reset the default value for a field, highlight the field, and press . Exploring the graph Pl ot v ie w gi v es yo u a s e le c ti on o f k e ys a nd me n u k e ys t o explore a graph further. The options vary from aplet to aplet. PLOT view keys The following table details the keys that you use to work with the graph. CONNECT Connect the plotted points. (The Sequence aplet always connects them.) LABELS Label the axes with XRNG and YRNG values. AXES Draw the axes. GRID Draw grid points using XTICK and YTICK spacing. Field Meaning (Continued) K ey Meaning CLEAR Erases the plot and axes. Offers additional pre-defined views for splitting the screen and for scaling (âzoomingâ) the axes. Moves cursor to far left or far right. Moves cursor between relations. or Interrupts plotting. Continues plotting if interrupted. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
2-8 Aplets and their views Trace a graph You can trace along a function using the or key which moves the cursor along the graph. The display also shows the current coordinate position ( x, y ) of the cursor. Trace mode and the coordinate disp lay are automatically set when a plot is drawn. Note: Tracing might not appe ar to exactly follow your plot if the resolution (in Plot Setup view) is set to Faster. This is because RES: FASTER plots in only every other column, whereas tracing al ways uses every column. In Function and Sequence Aplets: You c an also scroll (move the cursor) left or right beyond the edge of the display window in trace mode, giving you a view of more of the plot. To move between relations If there is more than one relation displayed, press or to move between relations. Turns menu-key labels on and off. When the labels are off, pressing turns them b ack on. ⢠Pres sing once displays the full r o w of labels. ⢠Pres sing a second time remo ves the r o w of labels to displa y only the gr aph. ⢠Pres sing a third time display s the coordinat e mode. Displays the ZOOM menu list. Turns trace mode on/off. A white box appears over the on . Opens an input form for you to enter an X (or T or N or θ ) value. Enter the value and press . The curs or jumps to the point on the graph that you entered. Function aplet only: turns on menu list for root-finding functions (see âAnalyse graph with FCN functionsâ on page 3-4). Displays the current, defining expression. Press to restore the menu. Ke y Meaning (Continued) hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-9 To jump directly to a value To jump straight to a value rather than using the Trace function, use the menu key. Press , then enter a value. Press to jump to the value. To turn trace on/off If the menu labels are no t displayed, press first. ⢠T urn off trace mode b y pres sing . ⢠T urn on trace mode by pr essing . ⢠T o turn the coordinate display off, pr ess . Zoom within a graph One of the menu key options is . Zooming redraws the plot on a larger or smaller sc ale. It is a shortcut for changing the Plot Setup. The Set Factors... option enables you to set the factors by which you zoom in or zoom out, and whether the zoom is centered about the cursor. ZOOM options Press , select an option, and press . (If is not displayed, press .) Not all options are available in all aplets. Option Meaning Center Re-centers the plot around the current position of the cursor without changing the scale. Box... Lets you draw a box to zoom in on. See âOther views for scaling and splitting the graphâ on page 2-13. In Divides horizontal and vertical scales by the X-factor and Y-fac tor. For instance, if zoom factors are 4, then zooming in results in 1/4 as many units depicted per pixel. (see Set Factors... ) Out Multiplies horizontal and vertical scales by the X-factor and Y-fac tor (see Set Factors... ). X-Zoom In Divides horizontal scale only, using X-factor. X-Zoom Out Multiplies horizontal scale, using X-factor. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
2-10 Aplets and their views Y-Zoom In Divides vertical scale only, using Y-factor. Y-Zoom Out Multiplies vertical scale only, using Y-factor. Square Changes the vertical scale to match the horizontal scale. (Use this after doing a Box Zoom, X-Zoo m, or Y-Zoom.) Set Factors... Sets the X-Zoom and Y-Zoom factors for zooming in or zooming out. Includes option to recenter the plot before zooming. Auto Scale Rescales the vertical axis so that the display shows a representative piece of the plot, for the supplied x axis settings. (For Sequence and Statistics aplets, autoscaling rescales both axes.) The autoscale process uses the first selected function only to determine the best scale to use. Decimal Rescales both axes so each pixel = 0.1 units. Re sets default v alues for XRNG (â6.5 to 6.5) and YRNG (â3.1 to 3.2). (Not in Sequence or Statistics aplets.) Integer Rescales horizontal axis only, making each pixel =1 unit. (Not available in Sequence or Statistics aplets.) Trig Rescales horizontal axis so 1 pixel = Ï /24 radians, 7.58, or 8 1 / 3 grads; rescales vertical axis so 1 pixel = 0.1 unit . (Not in Sequence or Statistics aplets.) Option M eaning (Continued) hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-11 ZOOM examples The following screens show the effects of zooming options on a plot of . Plot of Zoom In : In Un-zoom : Un-zoom Note: Press to move to the bottom of the Zoom list. Zoom Out : Out Now un- zoom. X-Zoom In : X-Zoom In Now un- zoom. X-Zoom Out : X-Zoom Out Now un- zoom. Un-zoom Ret urns the display to the previous zoom, or if there has been only one zoom, un-zoom displays the graph with the original plot settings. Option Meaning (Continued) 3 x sin 3 x sin hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
2-12 Aplets and their views Y-Zoom In: Y-Zoom In Now un-zoom. Y-Zoom Out: Y-Zoom Out Zoom Square: Square To box zoom The Box Zoom option lets you draw a box around the area you want to zoom in on by selecting the endpoints of one diagonal of the zoom rectangle. 1. If necessary , press to turn on the menu-k ey labels . 2. P r e s s a n d s e l e c t Box... 3 . P osition the c ursor on one corner of the r ectangle . Pres s . 4. Use the cursor k ey s ( , etc.) to drag to the opposi te corner . 5 . Pres s to z oom in on the box ed area . hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-13 To set zoom factors 1. In the P lot vi ew , pres s . 2. P r e s s . 3. Se l e c t Set Factors... and pr ess . 4. Enter the z oom fac tors . Ther e is one z oom facto r for the horiz onta l scal e ( XZOOM ) and one for the v ertical scal e ( YZOOM ). Z ooming out m ultiplies the scale b y the fa ctor , so that a greater s cale distance appears on the scr een. Z ooming in di vi des the s cale by the f actor , so that a shorter s cale distance appear s on the scr een. Other views for scaling and splitting the graph The preset viewing options menu ( ) contains options for drawing the plot using certain pre-defined configurations. This is a shortcut for changing Plot view settings. For instance, if you have defined a trigonometric function, then you could select Trig to plot your function on a trigonometric scale. It also contains split-screen options. In certain aplets, for example those that y ou download from the world wide web, the preset viewing options menu can also contain options that relate to the aplet. VIEWS menu options Press , select an option, and press . Option Meaning Plot- Detail Splits the screen into the plot and a close-up. Plot-Table Splits the screen into the plot and the data table. Overlay Plot Plots the current expression(s) without erasing any pre-existing plot(s). hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
2-14 Aplets and their views Split the screen The Plot-Detail view can give you two simultaneous views of the plot. 1. Pres s . Select Plot-Detai l and press . The gr aph is plotted t wi ce. Y ou can now z oom in on the ri ght side . 2. P r e s s , select the z oom method and press or . This z ooms the ri ght side . Her e is an ex ample o f split scr een w ith Zoom In . â T he Plot men u ke y s are a vailable as for the f ull plot (for tr acing, coor dinate displa y , equation displa y , and so on) . Auto Scale Rescales the vertical axis so that the display shows a representative piece of the plot, for the supplied x axis settings. (For Sequence and Statistics aplets, autoscaling rescales both axes.) The autoscale process uses the first selected function only to determine the best scale to use. Decimal Rescales both axes so each pixel = 0.1 unit. Resets default values for XRNG (â6.5 to 6.5) and YRNG (â3.1 to 3.2). (Not in Sequence or Statistics aplets.) Integer Rescales horizontal axis only, making each pixel = 1 unit. (Not available in Sequence or Statistics aplets.) Trig Rescales horizontal axis so 1 pixel = Ï /24 radian, 7. 58, or 8 1 / 3 grads; rescales vertical axis so 1 pixel = 0.1 unit. (Not in Sequence or Statistics aplets.) Option M eaning (Continued) hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-15 â mov es the leftmost cur sor to the scr eenâs le ft edge and mov es the ri ghtmost c urs or to the scr eenâs r ight edge . â T he menu k e y copie s the ri ght plot to the le ft plot . 3 . T o un -split the sc reen , pr ess . The left si de tak es ov er the whole scr een. The Plot-Table view gives you two simultaneous views of the plot . 1. Pres s . Select Plot-Table and pres s . The scr een displays the plot on th e left side and a table of numbers on the right side. 2 . T o mov e up and do w n the table , us e the and cur sor k ey s. T hese k ey s mo ve the tr a.ce point le ft or ri ght along the plot , and in the table, the corr espo nding value s are hi ghlighted . 3 . T o move betw een functi ons, us e the and cur sor k ey s to mo ve the c urso r fr om one gr aph to another . 4. T o return t o a full Numer ic (or P lot) v ie w , pr ess (or ). Overlay plots I f you want to plot over an ex isting plo t without erasing that plot, then use Overlay Plot instead of . Note that tracing follows only the current functions from the current aplet. Decimal scaling Decimal scaling is the default scaling. If you have changed the scaling to Trig or Integer, you can change it back with Decimal. Integer scaling Integer scaling compresses the axes so that each pixel is and the origin is near the screen center. Trigonometric scaling Use trigonometric scaling whenever you are plotting an expression that includes trigonometric functions. Trigonometric plots are more likely to intersect the axis at points factored by Ï . 11 Ã hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
2-16 Aplets and their views About the numeric view After entering and selecting (check marking) the expression or expressions that you want to explore in the Symbolic view, press to view a table of data values for the independent variable ( X , T, θ , or N ) and dependent variables. Setting up the table (Numeric view setup) Press NUM to define any of the table settings. Use the Numeric Setup input form to configure the table. 1. Highli ght the fi eld to edit. Us e the arr o w ke y s to mov e from fiel d to fie ld. â If ther e is a number to ent er , type it in and pre ss or . T o modi fy an ex isting number , press . â If ther e is an option to c hoose , pr ess , highligh t your c hoi ce , and pre ss or . â Shortcut : Pr ess the ke y to cop y values from the P lot Setup into NUMSTART and NUMSTEP . Effecti vel y , the menu k e y allo ws yo u to make the table match the p ix el columns in the graph v ie w . 2 . When done , press to vi ew the table o f numbers. Numeric view settings The following table details the fields on the Numeric Setup input form. Field Meaning NUMSTART The independent variableâs starting value. NUMSTEP The size of the increment from one independent variable value to the next. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-17 Reset numeric settings To reset the default values for all table settings, press CLEAR . Exploring the table of numbers NUM view menu keys The following table details the menu keys that you use to work with the table of numbers. NUMTYPE Type of numeric table: Automatic or Build Your Own. To build your own table, you must type each independent value into the table yourself. NUMZOOM Allows you to zoom in or out on a selected value of the independent variable. Field Meaning (Continued) K ey Meaning Displays ZOOM menu list. Toggles between two character sizes. Displays the defining function expression for the highlighted column. To cancel this display, press . hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
2-18 Aplets and their views Zoom within a table Zooming redraws the table of numbers in greater or lesser detail. ZOOM options The following table lists the zoom options: The display on the right is a Zoom In of the display on the left. The ZOOM factor is 4. HINT To jump to an independent va riable value in the table, use the arrow keys to place the cursor in the independent variable column, then enter the value to jump to. Option Meaning In Decreases the intervals for the independent variable so a narrower range is shown. U ses the NUMZOOM factor in Numeric Setup. Out Increases the intervals for the independent variable so that a wider range is shown. Uses the NUMZOOM factor in Numeric Setup. Decimal Changes intervals for the independent variable to 0.1 units. Starts at zero. (Shortcut to changing NUMSTART and NUMSTEP .) Integer Changes intervals for the independent variable to 1 unit. Starts at zero. (Shortcut to changing NUMSTEP .) Trig Changes intervals for independent variable to Ï /24 radian or 7.5 degrees or 8 1 / 3 grads. Starts at zero. Un-zoom Retu rns the display to the previous zoom. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-19 Automatic recalculation You can enter any new value in the X column. When you press , the values for the dependent variables are recalculated, and the entire table is regenerated with the same interval between X values. Building your own table of numbers The default NUMTYPE is âAutomaticâ, which fills the table with data for regular intervals of the independent ( X , T , θ , or N ) variable. With the NUMTYPE option set to âBuild Your Ownâ, you fill the table yourself by typing in the independent-variable values you want. Th e dependent values are then calculated and displayed. Build a table 1. S tart with an expr essi on defined (in S ymboli c vie w) in the apl et of your choice. Note: Func tion , P olar , P arametri c, and Sequence aplets onl y . 2 . In the Numer ic Setu p ( NUM ) , choose NUMTYPE: Build Your Own . 3 . Open the Numeric v ie w ( ) . 4. Clear e xis ting data in the table ( CLEAR ). 5 . Enter the independent v alues in the left-hand column. T ype in a number and pr ess . Y ou do not hav e to enter them in or der , because the functi on can rearr ange them. T o insert a number between two others , use . Clear data Press CLEAR , to erase the data from a table. F1 and F2 entries are generated automatically You enter numbers into the X column hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
2-20 Aplets and their views âBuild Your Ownâ menu keys Example: plotting a circle Plot the circle, x 2 y 2 = 9 . First rearrange it to read . To plot both the positive and negative y values, you need to define two equations as follows: and 1. In the F unctio n aplet, s pecify the f uncti ons. Ke y Meaning Puts the highlighted independent value ( X , T , θ , or N ) into the edit line. Pressing replaces this variable with its current value. Inserts a zero value at the position of the highlight. Replace a zero by typing the number you want and pressing . Sorts the independent variable values into ascending or descending order. Press and select the ascending or descending option from the menu, and press . Toggles between two character sizes. Displays the defining function expression for the highlighted column. Deletes the highlighted row. CLEAR Clears all data from the table. y 9 x 2 â ± = y 9 x 2 â = y 9 x 2 â â = hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Aplets and their views 2-21 Select Function 9 9 2 . R eset the gr aph se tup to the def ault settings . SETUP - PLOT CLEAR 3 . P lot the two func tions and hide the menu so that yo u can see all the ci rcl e. 4. Re set the numer ic setu p to the default s ettings. SETUP - NUM CLEAR 5 . Display the functi ons in numer ic for m. hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Function aplet 3-1 3 Function aplet About the Function aplet The Function aplet enables you to explore up to 10 real-valued, rectangular functions y in terms of x . For example . Once you have defined a function you can: ⢠cr eate gr aphs to find r oots, in ter cepts, slope , signed area , and extr ema ⢠cr eate tables to ev aluate functi ons at par tic ular val u es. This chapter demonstrates the basic tools of the Function aplet by stepping you through an example. See âAplet viewsâ on page 2-1 for further information about the functionality of the Symbolic, Numeric, an d Plot views. Getting started with the Function aplet The following example involves two functions: a linear function and a quadratic equation . Open the Function aplet 1. Open the Function aplet . Select Function The F unction aplet st arts in the S ymbo lic v ie w . The Symbolic view is the defining view for Function, Parametric, Polar, and Seq uence aplets. The other views are derived from the symbolic expression. y 2 x 3 = y 1 x â = yx 3 () 2 2 â = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
3-2 Function aplet Define the expressions 2 . T here ar e 10 func tion de finition f ields o n the F unction apletâs S ymbolic v ie w scr een . The y ar e labeled F1(X) to F0(X). Highlight the f unction de finiti on fi eld yo u wan t to us e , and ente r an ex pre ssio n. ( Y ou can pr ess to delete an ex isting line , or CLEAR to clear all lines.) 1 3 2 Set up the plot You can change the scales of the x and y axes, grap h resolution, and the spacing of the axis ticks. 3 . Displa y plot settings. SETUP - PLOT Note: F or our e xam ple, y ou can lea ve the plot settings at their default values since we will be using the Auto Scale f eature to c hoose an appropr iate y axis f or our x ax is settings. If y our settings do not matc h this ex ample , pr ess CLEAR to re store the defau lt va lu es. 4. Spec if y a grid for the gr aph . Plot the functions 5 . P lot the functi ons. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Function aplet 3-3 Change the scale 6. Y ou ca n change the sc ale to see more or less of your gra phs. In this e xample , choose Auto Scale . (See âVIEW S menu options â on page 2-13 f or a descrip tio n of Auto Sc al e) . Select Auto Scale Trace a graph 7 . T race the linear f unctio n. 6 times Note: B y def ault, the trace r is activ e . 8. Jump f rom the linear functi on to the quadr atic functi on. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
3-4 Function aplet Analyse graph with FCN functions 9. Display the Plot view menu. From the Plot view menu, you can use the functions on the FCN menu to find roots, intersections, slopes, and areas for a function defined in the Function aplet (and any Function-based ap lets). The FCN functions act on the currently selected graph. See âFCN functi ons â on page 3-10 for f urther informati on. To find a root of the quadratic function 10. Mov e the cu rsor to the gr aph of the q uadrati c equation b y pr essing the or k ey . Then mo ve the cur sor so that it is near by pre ssing the or key . Select Root The r oot value is display ed at the bottom of the sc reen . Note: If ther e is more than one root (as i n our exam p le ) , th e coor dinates of the r oot c losest t o the cur re nt cur sor position ar e displayed . To find the intersection of the two functions 11. F ind the intersec tion of the tw o func tions. x 1 â = hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Function aplet 3-5 12 . Choose the linear f unctio n whos e inter secti on w ith the quadr atic func tion y ou w ish to find . The coo rdinate s of the intersec tion po int are display ed at the bottom of the screen . Note: If ther e is mor e than one inters ection (as in our e xam ple), the coordinates o f the inters ection po int clo sest to the cur ren t cur sor positi on are dis play ed. To find the slope of the quadratic functio n 13 . Find the slope o f the quadrati c functi on at the intersec tion po int. Select Slope The slope value is display ed at the bottom of the screen. To find the signed area of the two functio ns 14. To find the area between the two functions in the range â2 ⤠x ⤠â1, first mo ve the cur sor to and select the si gned area opti on. Select Signed area 15 . Mov e the c ursor to x = â2 by pr essing the or key . F 1 x () 1 x â = hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
3-6 Function aplet 16. Pr ess to accept using F2(x) = (x 3) 2 â 2 as the other boundar y for the integr al. 17 . Choos e the end v alue for x . 1 The cu rso r jum ps to x = â 1 on the linear functi on. 18. Display the numerical value of the integral. Note: See âShading ar eaâ o n page 3-11 for another method of calculating ar ea. To find the extremum of the quadratic 19 . Mov e the c ursor t o the quadra tic equati on and find the extr emum of the quadrati c. Select Extremum The coordina tes of th e ext re mu m are display ed at the bottom of the scr een. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Function aplet 3-7 HINT The Root and Extremum functions return one value only even if the fun ction has more than one root or extremum. The function finds the value closest to the position of the cursor. You need to re-locate the cursor to find other roots or extrema that may exist. Display the numeric view 20. Display the numer ic v iew . Set up the table 21. Display the numer ic setup . SETUP - NUM See âSetting up the tabl e (Numeric v iew s etup)â on page 2 -16 fo r more inf ormation . 2 2 . Match the table s ettings to the pi xe l columns in the gra ph vi ew . Explore the table 2 3. Display the table of value s. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
3-8 Function aplet To navigate around a table 2 4. Move t o X = â5.9 . 6 times To go directly to a value 2 5 . Move dir ectl y to X = 10. 1 0 To access the zoom options 2 6. Zoom in on X = 10 b y a factor of 4. Note: NUMZOOM has a setting of 4 . In To change font size 2 7 . Display table n umbers in lar ge fo nt. To display the symbolic definition of a column 2 8. Display the s y mbolic def inition f or the F1 column . The symbolic definition of F1 is displayed a t the bottom of the screen. hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Function aplet 3-9 Function aplet interactive analysis From the Plot view ( ), you can use the functions on the FCN menu to find roots, intersections, slopes, and areas for a function defined in the Function aplet (and any Function-based aplets). See âFCN functionsâ on page 3- 10. The FCN operations act on the currently selected graph. The results of the FCN function s are saved in the following variables: ⢠Area ⢠Extrem um ⢠Isec t ⢠Root ⢠Slope For example, if you use the Root function to find the root of a plot, you can use the result in calculations in HOME. Access FCN variables The FCN variables are cont ained on the VARS menu. To access FCN variables in HOME: Select Plot FCN or to choose a vari ab le To access FCN variable in th e Function apletâs Symbolic view: Select Plot FCN or to choose a v ariable hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
3-10 Function aplet FCN functions The FCN functions are: Function Description Root Se lect Root to find the root of the current function nearest the cursor. If no root is fo und, but only an extremum, then the result is labeled EXTR: instead of ROOT: . (The root-finder is also used in the Solve aplet. See also âInterpreting resultsâ on page 7-6.) The cursor is moved to the root value on the x-axis and the resulting x -value is saved in a variable named ROOT. Extremum Select Extremum to find the maximum or minimum of the current function nearest the cursor. This displays the coordinate values and moves the cursor to the extremum. The resulting value is saved in a variable named EXTREMUM. Slope Select Slope to find the numeric derivative at the current position of the cursor. The result is saved in a variable named SLOPE. Signed area Se lect Signed area to find the numeric integral. (If there are two or more expressions checkmarked, then you will be asked to choose the second expression from a list that includes the x -axis.) Select a starting point, then move the cursor to selection ending point. The result is saved in a variable named AREA. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Function aplet 3-11 Shading area You can shade a selected area between functions. This process also gives yo u an approximate measurement o f the area shaded. 1. Open the Function aplet . The F unction aplet opens in the S ymboli c vi ew . 2 . Se lect the ex pre ssio ns who se c urves y ou w ant to study . 3 . Pre ss to plot the functi ons. 4. Pr ess or to position the c urs or at the starting point of the ar ea y ou want to shade . 5. P re s s . 6. Press , then select Signed area and press . 7 . Press , choose the f unction that w i ll act as the boundary of the shaded ar ea , and pr ess . 8. Pres s the or ke y to shade in the area . 9 . Pr ess to calculate the ar ea. The ar ea measur ement is display ed near the bottom of the screen. To remove the shading, press to re-draw the plot. Intersection Select Intersection to find the intersection of two graphs neare st the cursor. (You need to have at least two selected expressions in Symbolic view.) Display s the coordinate values and moves the cursor to the intersection. (Uses Solve function.) The resulting x - value is saved in a variable named ISECT. Function Description (Continued) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
3-12 Function aplet Plotting a piecewise-defined function Suppose you wanted to plot the following piecewise- defined function. 1. Open the F unctio n aplet. Select Function 2 . Highli ght the line y ou wan t to use , and enter the expr ession . (Y ou can press to d elete an ex isting line , or CLEAR to clear all line s.) 2 CHARS ⤠1 CHARS > 1 AND CHARS ⤠1 4 CHARS > 1 Note: Y ou can use the menu k ey to as sist in the entry of equations . It has the same effec t as pressing . fx () x 2 x 1 â ⤠; x 2 1 â x 1 ⤠< ; 4 xx 1 ⥠; â ⩠⪠⨠⪠⧠= hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Parametric aplet 4-1 4 Pa r a m e t r i c a p l e t About the Parametric aplet The Parametric aplet allows you to explore parametric equations. These are equations in which both x and y are defined as functions of t . They take the forms and . Getting started with the Parametric aplet The following example uses the parametric equations Note: This example wi ll produce a circle. For this example to work, the angle measure must be set to degrees. Open the Parametric aplet 1. Open the P arametr ic aplet. Select Parametric Define the expressions 2 . Def ine the expr essions . 3 3 xf t () = yg t () = xt () 3 t yt () 3 t cos = sin = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
4-2 Parametric aplet Set angle measure 3 . Set the ang le measure to degrees. MODES Select Degrees Set up the plot 4. Display the graphing options. PLOT The P lot Se tup input f orm has tw o fi elds not inc luded in the Functi on aplet, TRNG and TSTEP . TRNG spec if ies the r ange of t val u es . TSTEP specifi es the step value between t values. 5 . Set the TRNG and TSTEP so that t steps from 0 ° to 360 ° in 5 ° steps. 360 5 Plot the expression 6. Plot the expr ession . 7 . T o see all the c ir cle , pr ess twice . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Parametric aplet 4-3 Overlay plot 8. Plot a triangle graph over the existing circle graph. PLOT 120 Select Overlay Plot A triangle is dis play ed ra ther than a cir cle (w ithout ch anging the equation) because the c hanged value of TSTEP ensur es that points being plotted are 120 ° apart ins tead of near ly continuous . Y ou ar e able to explor e the graph u sing trace , z oom, split sc ree n, and sc aling functi onality available in the F unction aple t. S ee âExploring the gr aph â on page 2 - 7 fo r f ur t he r in form a tio n. Display the numbers 9 . Display the ta ble of values . Y ou can highli ght a t -value, type in a replacement value , and see the table j ump to that value . Y ou can also z oom in or z oom out on any t -val ue in the ta ble . You are able to explore the table using , , build your own table, and split screen functionality available in the Function aplet. See âExploring the table of numbersâ on page 2-17 for further information. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Polar aplet 5-1 5 Po l a r a p l e t Getting started with the Polar aplet Open the Polar aplet 1. Open the P olar aplet. Se lect Polar Li ke the F uncti on aplet , the P olar aplet opens in the S ymbo lic v ie w . Define the expression 2 . Def ine the polar equati on . 2 Ï 2 Specify plot settings 3 . Spec ify the plot settings . In this exam ple, w e w ill use the defa ult settings, e xcept f or the θ RNG fie ld s. SETUP - PLOT CLEAR 4 Ï Plot the expression 4. P lot the expr ession . r 2 Ïθ 2 â () θ () 2 cos cos = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
5-2 Polar aplet Explore the graph 5 . Displa y the Plot v ie w menu k e y labels. Th e Pl o t view o p t io n s av ailable ar e the same as those fo und in the F unction aplet . See âExplor ing the gr aph â on page 2 - 7 for f urther information . Display the numbers 6. Displa y the table o f values f or θ and R1. The N u me ric view options a vaila ble ar e the same as those found in the F unction aplet . See âExplor ing the table of nu mbers â on pa g e 2-17 fo r fu r t he r i n form a tio n. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Sequence aplet 6-1 6 Sequence aplet About the Sequence aplet The Sequence aplet allows you to explore s equences. You can define a sequence named, for example, U1: ⢠in terms of n ⢠in terms of U1( nâ1) â¢i n ter ms of U1 ( nâ2) ⢠in terms o f another sequence , for e xample , U2 ( n) ⢠in an y combination of the a bov e . The Sequence aplet allows you to create two types of graphs: â A Stairsteps gr aph pl ots n on the hor i z ontal axis and U n on the vertical ax i s. â A Cob web gr aph plots U nâ 1 on the hor iz ontal axis and U n on the ve rtical axis . Getting started with the Sequence aplet The following example defines and then plots an expression in the Sequence aplet. The sequ ence illustrated is the well-known Fibonacci sequence where each term, from the third term on, is the sum of the preceding two terms. In this example, we specify three sequence fields: the first term, the second term and a rule for generating all subsequent terms. However, you can also define a sequence by specifying just the first term and the rule for generating all subsequent terms. Y ou w ill, tho ugh,hav e to ente r the second ter m if the hp40gs is unable to calc ulate it automatically . T ypi cally if the n th term in the seq uence depends on n â 2 , then you must enter the second term. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
6-2 Sequence aplet Open the Sequence aplet 1. Open the Sequence apl et. Select Sequence The Sequence apl et starts in the S ymboli c view . Define the expression 2 . Define the F ibonacc i sequence, in w hich eac h term (after the fir st two) is the sum of the pr eceding two terms: , , for . In the S ymboli c v ie w of the Sequ ence aplet, highlight the U 1 (1) field and begin def ining y our sequence . 1 1 Note: Y ou can use the , , , , and menu k ey s to assist in the entry of equations . Specify plot settings 3. In Plo t Setup , fir st set the SEQPLOT opti on to Stairstep . Re set the defa ult plot settings b y clear ing the P lot Setup v ie w . SETUP - PLOT CLEAR 8 8 U 1 1 = U 2 1 = U n U n 1 â U n 2 â = n 3 > hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Sequence aplet 6-3 Plot the sequence 4. Plot the F ibonacci seque nce. 5. In Plot Setup, set the SEQPLOT option to Cobweb. SETUP - PLOT Select Cobweb Display the table 6. Di splay the table of va lues for this ex ample. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Solve aplet 7-1 7 Solve aplet About the Solve aplet The Solve aplet solves an equation or an expression for its unknown variable . You define an equation or expression in the symbolic view, then supply values for all the variables except one in the numeric view. Solve works only with real numbers. Note the differences between an equation and an expression: ⢠An equation contains an eq uals sign . Its solutio n is a value f or the unkno wn v ari able that mak es both sides hav e the same value . ⢠An ex pre ss io n does not contain an eq uals sign. Its soluti on is a r oot , a value f or the unkno wn v ar iable that make s the expr ession ha ve a v alue of z er o . You can use the Solve aplet to solve an equation for any one of its variables. When the Solve aplet is started, it opens in the Solve Symbolic view. ⢠In S ymboli c vie w , y ou spec ify the expre ssion or equation to solve . Y ou can d efine up to ten equat ions (or e xpre ssions), named E0 to E9 . Eac h equation can contain up to 2 7 real var ia bles, named A to Z and θ. ⢠In Numeric v ie w , you spec ify t he values of the know n var iable s, highli ght the var iable that y ou w ant to solv e fo r , and press . You can solv e the equa tion as many times as you want, using new values for the knowns and highlighting a different unknown. Note: It is not possible to solv e for more than one variable at once. Simultaneous linear equations, for example, should be solved using the Li near Solver aplet,matrices or graphs in the Function aplet. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
7-2 Solve apl et Getting started with the Solve aplet Suppose you want to find th e acceleration needed to increase the speed of a car from 1 6.67 m/sec (60 kph) to 27.78 m/sec (100 kph) in a distance of 100 m. The equation to solve is: Open the Solve aplet 1. Open the Solve aplet . Select Solve The S olv e aplet starts in the s ymboli c vie w . Define the equation 2. Define the equat ion. V U 2 A D Note: Y ou can use the menu k ey to as sist in the entry of equati ons. Enter known variables 3 . Display the Solve numer ic vie w scr een. V 2 U 2 2 A D = hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Solve aplet 7-3 4. Enter the value s for the kno wn v ari ables . 2 7 7 8 1 6 6 7 1 0 0 HINT If the Decimal Mark setting in the Modes input form ( MODES ) is set to Comma, use instead of . Solve the unknown variable 5. Solv e for the unkno wn var iable ( A ). Ther efor e, the accele rati on needed to incr ease the speed of a car fr om 16.6 7 m/sec (60 kph) to 2 7 .7 8 m/sec (100 kph) in a distance of 100 m is appro ximatel y 2 .4 7 m/s 2 . Because the var iable A in the equati on is linear we kno w that we need no t look for an y other so lutions . Plot the equation The P lot vie w sho w s one graph f or each si de of the selected equation. Y ou can choose an y of the var iab les to be the independent v ari able . The c urr ent eq uation is . One of these is , w ith , that is, . This gr aph w ill be a hor i z ontal line . The other gr aph w ill be , w ith and , that is, . This gr aph is also a line. T he desir ed soluti on is the value o f A wher e these two lines intersect. V 2 U 2 2 A D = YV 2 = V 27.78 = Y 771.7284 = Y U 2 2 A D = U 16.67 = D 100 = Y 200 A 277.8889 = hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
7-4 Solve apl et 6. Plo t the equation f or var iable A . Sele ct Auto Scale 7 . T race along the graph repr ese nting the left side o f the equation until the c ursor near s the inters ectio n. 20 times Note the v alue of A displa yed near the bottom left corner of the scr een. The P lot vi ew pr ovi des a conv enient w ay t o find an appr ox imatio n to a solutio n instead of u sing the Numeri c vi ew S olv e option . See âP lotting to find guess esâ on pa ge 7 - 7 for more in format ion. Solve apletâs NUM view keys The Solve apletâs NUM view keys are: Key M e a n i n g Copies the highlighted value to the edit line for editing. Press when done. Displays a message about the solution (see âInterpreting resultsâ on page 7-6). Displays other pages of variables, if any. Displays the symbolic definition of the current expression. Press when done. Finds a solution for the highlighted variable, based on the values of the other varia bles. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Solve aplet 7-5 Use an initial guess You can usually obtain a fa ster and more accurate solution if you supply an estimated value for the unknown variable before pressing . Solve starts looking for a solution at the initial guess. Bef ore plo tting, mak e sure the unknow n var iable is highligh ted in the numer ic v ie w . Plo t the equation t o help y ou selec t an initial guess when y ou don ât know the r ange in whi ch to look f or the solution . See âP lotting to find guesses â on page 7 - 7 for further information . HINT An initial guess is especially important in the case of a curve that could have more than one solution. In this case, only the solution closest to the initial guess is returned. Number format You can change the number fo rmat for the Solve aplet in the Numeric Setup view. The options are the same as in HOME MODES: Standard, Fixed, Scientific, Engineering, Fraction and Mi xed Fraction. Fo r all except Standard, you also specify ho w many digits of accuracy you want. See âMode setting sâ on page 1-10 for more information. You might find it handy to set a different number format for the Solve aplet if, for example, you define equations to solve for the value of money. A number format of Fixed 2 would be appropriate in this ca se. Clears highlighted variable to zero or deletes current character in edit line, if edit line is active. CLEAR Resets all variable values to zero or clears the edit line, if cursor is i n edit line. K e y Meaning (Continued) hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
7-6 Solve apl et Interpreting results After Solve has returned a solution, press in the Numeric view for more information. You will see one of the following three messages. Press to clear the message. Messag e Condition Zero The Solve aplet found a point where both sides of the equation were equal, o r wher e the expression was zero (a root), within the calculator's 12-digit accuracy. Sign Reversal Solve found two points where the difference between the two sides of the equation has opposite signs, but it cannot find a point in between where the value is zero. Similarly, for an expression, where the value of the expression has different si gns but is not precisely zero. This might be because either the two points are neighbours (they differ by one in the twelfth digit), or the equation is not real-valued between the two points. Solve returns the point where the value or difference is closer to zero. If the equation or expression is continuously real, this point is Solveâs best approximation of an actual solution. Extremum Solve found a point where the value of the expression approximates a local minimum (for positive values) or maximum (for negative values). This point may or may not be a solution. Or: Solve st opped searchin g at 9.99999999999E499, the largest number the calculator can represent. Note that the value returned is probably not valid. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Solve aplet 7-7 If Solve could not find a solution, you will see one of the following two messages. HINT It is important to check the information relating to the solve process. For example, the solution that the Solve aplet finds is not a solution, but the closest that the function gets to zero. Only by checking the i nformation will you know that this is the case. The Root-Finder at work You can watch the process of the root-finder c alculating and searching for a root. Immediately after pressing to start the root-finder, press any key except . You will see two intermediate guesses and, to the left, the sign of the expression evaluated at each guess. For example: 2 2.219330555745 â 1 21.31111111149 You can watch as the root-finder either finds a sign reversal or converges on a local extrema or does not converge at all. If there is no convergence in process, you might want to cancel the operation (press ) and start over with a different initial guess. Plotting to find guesses The main reason for plotting in the Solve aplet is to help you find initial guesses and so lutions for those equations that have difficult-to-find or multiple solutions. Consider the equation of motion for an accelerating body: Message Condition Bad Guess(es) The initial guess lies outside the domain of the equation. Therefore, the solution was not a real number or it caused an error. Constant? The value of the equation is the same at every point sampled. 2 2 0 AT T V X = hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
7-8 Solve apl et where X is distance, V 0 is initial velocity, T is time, and A is acceleration. This is actually two equations, Y = X and Y = V 0 T (AT 2 ) / 2 . Since this equation is quadratic for T , there can be both a positive and a negative solution. However, we are concerned only with positive so lutions, since only positive distance makes sense. 1. Select the S olv e aplet and enter the eq uation . Select Solve X V T A T 2 2. Find the solution for T (time) when X = 30, V =2 , and A =4 . Enter the values for X , V , and A ; then highlight the independent variable, T . 30 2 4 to highlight T 3. Use the Plot view to find an initial guess for T . First set appropriate X and Y ranges in the Plot Setup. With equation X = V x T A x T 2 /2 , the plot will produce two graphs: one for and one for X = V x T A x T 2 /2 . Since we have set in this example, one of the graphs will be . Therefore, make the YRNG â 5 to 35. Keep the XRNG default of â 6.5 to 6.5. SETUP- PLOT 5 35 4. P lot the gra ph. YX = X 30 = Y 30 = hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Solve aplet 7-9 5. Move the cursor near the positive (right-side) intersection. This cursor value will be an initial guess for T . Pres s until the cur sor is at the intersec tion. The t wo po in ts o f inters ection sh ow that ther e are tw o solutio ns for this equati on. Ho w ev er , on ly p os i tive va lu es fo r X m ake s ense , so we w ant to find the so lution f or the inte rsecti on on the r ight side of the y -ax is. 6. Re turn to the Numer ic view . Note: the T -value is f illed in with the po sition of the cursor fr om the Plot view . 7. Ensure that the T v alue is highli ghted , and solv e the equati on. Use this equation to solve fo r another variable, such as velocity. How fast must a bodyâs initial velocity be in order for it to travel 50 m within 3 seconds ? Assume the same acceleration, 4 m/s 2 . Leave the last value of V as the initial guess. 3 50 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
7-10 Solve apl et Using variables in equations You can use any of the real variable names, A to Z and θ . Do not use variable nam es defined for other types, such as M 1 (a matrix variable). Home variables All home variables (othe r than those for aplet settings, like Xmin and Ytick ) are global , which means they are shared throughout the different aplets of the calculator . A value that is assigned to a home variable anywhere remains with that variable wh erever its name is used. Therefore, if you have defined a value for T (as in the above example) in another aplet or even another Solve equation, that value shows up in the Numeric view for this Solve equation. When you th en redefine the value for T in this Solve equation, that value is applied to T in all other contexts (until it is changed agai n). This sharing allows you to work on the same problem in different places (such a s HOME and the Solve aplet) without having to update the value whenever it is recalculated. HINT As the Solve aplet uses existing variable values, be sure to check for existing variable values that may affect the solve process. (You can use CLEAR to reset all values to zero in the Solve apletâs Numeric view if you wish.) Aplet variables Functions defined in other aplets can also be referenced in the Solve aplet. For example, if, in the Function aplet, you define F1(X)=X 2 10 , you can enter F1(X)=50 in the Solve aplet to solve the equation X 2 10=50 . hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Linear Solver ap let 8-1 8 Li n e a r S ol ve r a p l e t About the Linear Solver aplet The Linear Solver aplet allows you to solve a set of linear equations. The set can contain two or three linear equations. In a two-equation set, each equation must be in the form . In a three-equation set , each equation must be in the form . You provide values for a , b , and k (and c in three- equation sets) for each equation, and the Linear Solver aplet will attempt to solve for x and y (and z in three- equation sets). The hp40gs will alert you if no solution can be found, or if there is an infinite number of solutions. Note that the Linear Solver aplet only has a numeric view. Getting started with th e Linear Solver aplet The following example defines a set of three equations and then solves for the unkno wn variables. Open the Linear Solver aplet 1. Open the Linear Sequence ap let. Select Linear Solver The L inear E quati on Solv er opens. Choose the equation set 2 . If the last ti me you used the Linear S olv er aplet you s o lve d f or t wo equatio ns, the tw o - equatio n input f orm is display ed (as in the ax by k = ax by cz k = hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
8-2 Linear Solver aplet ex ample in the pr ev io us step). T o sol ve a thr ee - equation s et, pr ess . No w the input for m displa ys thr ee eq uations . If the three-equation input fo rm is displayed and you want to solve a two-equation set, press . In this example, we are going to solve the following equation set: Hence we need the three-equation input form. Define and solve the equations 3 . Y ou def ine the equati ons y ou w ant to sol ve b y enter ing the co-effic ients of eac h var iable in eac h equation and the constant te rm. No tice that the c ursor is immediately positioned at the co-effic ient of x in the fir st equati on. Ente r that co -effi ci ent and pr ess or . 4. The c ursor mo ve s to the next co-effic ient . Enter that co - eff ic ient , pr ess or , and continue do ing lik ew ise until y ou have de fined all the equati ons. Note : y ou can enter the name of a var iable f or any co -effi ci ent or constant . Pr ess and begin enter ing the name. T he menu ke y appears. Pres s that ke y to lock alphabetic entry mode. Pr ess it again to cancel the lock . Once yo u hav e entere d enough values for the solv er to be able to gener ate soluti ons, those solutions appear on the display . In the ex ample at the r ight , the sol ver was a ble to f ind soluti ons f or x , y , and z as soon as the f irst co-effic ie nt of the last equati on wa s entered . 6 x 9 y 6 z 5 = 7 x 10 y 8 z 1 0 = 6 x 4 y 6 = hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Linear Solver ap let 8-3 As you enter each of the re maining know n value s, the soluti on change s. T he e x ample at the ri ght sho ws the final so lution once all the co -e fficients an d constants ar e enter e d for the s et of equati ons we se t out to solve. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Triangle S olve aplet 9-1 9 T riangle Solv e aplet About the Triangle Solver aplet The Triangle Solver aplet a llows you to determine the length of a side of a triangle, or the angle at the vertex of a triangle, from information you supply about the other lengths and/or other angles. You need to specify at leas t three of the six possible valuesâthe lengths of the three sides and the size of the three angle sâbefore the solver can ca lculate the other values. Moreover, at least one value you specify must be a length. For example, you could specify the lengths of two sides and one of the angl es; or you could specify two angles and one length; or all three lengths. In each case, the solver will calculate the remaining lengths or angles. The HP 40gs will alert you if no solution can be found, or if you have provided insufficient data. If you are determining the properties of a right-angled triangle, a simpler input form is available by pressin g the menu key. Note that the Triangle Solver aplet only has a numeric view. Getting started with th e Triangle Solver aplet The following example solves for the unknow n length of the side of a triangle whose two known sidesâof lengths 4 and 6âmeet at an angle of 30 degrees. Before you begin : You should make sure that your angle measure mode is appropriate. If the angle inf ormation you have is in degrees (as in this example) and your current angle measure mode is radians or grad s, change the mode to degrees before ru nning the solver. (See âMode settingsâ on page 1-10 for instructions.) Because the angle measure mode is associated with the aplet, you should start the aplet first and then change the setting. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
9-2 Triangle So lve aplet Open the Triangle Solver aplet 1. Open the T riangle Sol ver a plet. Select Triangle Solver The T riangle Solver aplet o pens. Note : if y ou hav e alr eady u sed the T r iangle Sol ver , the entries and results from the pre v ious use will still be displayed . T o start the T riangle Sol ver afr esh, c lear the pre v ious entr ies and results b y pr essing CLEAR . Choose the triangle type 2 . If the last time y ou u sed the T riangle Sol ver aplet you used the ri ght-angled triangle input f orm , that input form i s d i sp la yed again (as in the ex ample at the r ight). If the tri angle you ar e inv esti gating is not a ri ght-angled triangle , or y ou ar e not sur e what type it is, y ou should use the gener al input f orm (illus trate d in the pre v ious s tep). T o sw itc h to the gener al input f orm , pre ss . If the general input f orm is displa yed and y ou are inv esti gating a righ t-angled triangle , pr ess to displa y the simpler input f or m. Specify the known values 3 . Using the arr ow k e ys , mov e to a f ield w hose v alue you kno w , enter the value and press or . Repeat f or each kno wn v alue . Note that the lengths o f the sides ar e labeled A , B , and C , and the angles are labeled α , β , and δ . It is important that y ou ent er the kno wn value s in the appr opriate f ields. In our e x ample, w e kno w the length of tw o sides and the angle at w hich th ose sides mee t. He nce if we s pec ify the lengths of side s A and B, w e must enter the angle as δ (since δ is the angle wher e A and B meet) . If instead w e entered the hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Triangle S olve aplet 9-3 lengths as B and C, w e wo uld need to spec ify the angle as α . The illus trati on on the displa y will help yo u determine where to enter the known values . Note: if you need to c hange the angle neasure mode , pres s MODES , change the mode , and then pres s to r eturn to t he aplet. 4. Pres s . The solver calculat es the v alues of the unkno w n var ia bles and display s. As the illustr ation at the r ight sho ws , the length of the unkno wn side in our e xam ple is 3.2 29 6. (T he other two angles ha ve als o been calculated .) Note: if two side s and an adjacent ac ute angle are enter ed and ther e are tw o soluti ons, onl y one will be display ed initiall y . In this case , an menu k ey is displa yed (as in this ex ample). Yo u p r e s s t o display the second soluti on, and again to r eturn to the fir st soluti on. Errors No solution with given data If you are using the general input form and you enter more than 3 values, the values might not be consistent, that is, no triangle could possibly ha ve all the values you specified. In these cases, No sol with given data appears on the screen. The situation is similar if you are using the simpler input form (for a right-angled tria ngle) and you enter more than two values. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
Not enough data If you are using the general input form, you need to specify at least three values for the Triangle Solver to be able to calculate the remaining attributes of the triangle. If you specify less than three, Not enough data appears on the screen. If you are using the simplified input form (for a right- angled triangle), you must specify at least two values. In addition, you cannot specify only angles and no lengths. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-1 10 Statist ic s apl et About the Statistics aplet The Statistics aplet can store up to ten data sets at one time. It can perform one- variable or two-vari able statistical analysis of one or more sets of data. The Statistics aplet starts with the Numeric view which is used to enter data. The Symbol ic view is used to specify which columns contain data and which column contai ns frequencies. You can also compute statistics valu es in HOME and recall the values of specif ic statistics variables. The values computed in the Statistics aple t are saved in variables, and many of these variables are listed by the function accessible from the Statistics apletâs Numeric view screen. Getting started with the Statistics aplet The following example asks you to enter and a nalyze the advertising and sales data (i n the table below), compute statistics, fit a curve to the data, and predict the effect of more advertising on sales. Advert ising min utes (independent, x) Resulting Sales ($) (dependent, y) 21 4 0 0 1 9 2 0 31 1 0 0 52 2 6 5 52 8 9 0 42 2 0 0 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
10-2 Statistics aplet Open the Statistics aplet 1. Open the St atistics a plet and clear e x isting data b y pres sing . Select Statistics The St at i st ic s ap le t starts in the Numer ical view . At an y time the Statisti cs aplet is conf igur ed for onl y one of t wo types of stat istical explorations: on e - var iable ( ) or t wo- var iable ( ) . The 5th menu k e y label in the Numeric v ie w toggles betw een these tw o options and sho ws the c urr ent option . 2 . Select . Y ou need to selec t becaus e in this ex ample we ar e analyzing a dataset compr ising two var ia bles: adv ertising minu tes and r esulting sales . Enter data 3 . Enter the data into the columns . 2 1 3 5 5 4 to mo ve to the next column 1400 9 20 1100 2 2 65 2 8 90 2 200 1VAR/2VAR menu k ey la bel hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-3 Choose fit and data columns 4. Select a f it in the S ymboli c setup vi ew . SETUP - SYMB Select Linear Y o u c an cre a t e u p t o f ive exp l o rat i on s of t wo - va ria b le data, named S1 to S5 . I n t h is exa m pl e, we wil l cre a te just on e : S1 . 5 . Spec ify the columns that hold the data y ou w ant to analyz e . Yo u c o u l d h a v e e n t e r e d y our data into columns other than C1 and C2 . Explore statistics 6 . Find the mean ad vertising time ( MEANX ) and the mean sales ( MEANY ). MEANX is 3 .3 min utes and MEANY is abou t $17 96 . 7 . Scr oll do wn to dis play the v alue for the corr elation coeffi ci ent ( CORR ). T he CORR value indicates how we ll the linear model fits the data . 9 times The v alue is .8 99 5. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
10-4 Statistics aplet Setup plot 8. Change the plotting range to ensur e all the data points ar e plotted (and select a differ ent point mark , if yo u wi s h ) . SETUP - PLOT 7 100 400 0 Plot the graph 9 . P lot the gr aph. Draw the regression curve 10. Dra w the r egre ssion c urve (a c urve to f it the data points). This dr aw s the regr ession line f or the best linear f it. Display the equation for best linear fit 11. Retur n to the S ymbo lic v ie w . 12 . Display the equati on for the be st linear fit . to mov e to the FIT1 fie l d The f ull FIT1 expr ession is sho wn . The slope ( m ) i s 425.87 5. T h e y -intercept ( b ) is 37 6. 25. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-5 Predict values 13 . T o find the pr edic ted sales f igur e if ad vertising w er e to go up to 6 minute s: S ( to highlight Stat-Two ) (to highli ght PREDY ) 6 14. Retur n to the P lot vie w . 15 . Jump to the indi cated point on the r egr essi on line. 6 Observe the pr edic ted y -value in the left bottom corner of the screen. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
10-6 Statistics aplet Entering and editing statistical data The Numeric view ( ) is used to enter data into the Statistics aplet. Each column represents a variable named C0 to C9 . After entering the data, you must define the data set in the Symbolic view ( ). HINT A data column must have at least four data points to provide valid two-vari able statistics, or two data points for one-variab le statist ics. You can also store statistical data values by copying lists from HOME into Statistics data columns. For example, i n HOME, L1 C1 stores a copy of the list L1 into the data-column variab le C1 . Statistics apletâ s NUM view keys The Statistics apletâs Numeric view keys are: Key M e a n i n g Copies the highlighted item into the edit line. Inserts a zero value above the highlighted cell. Sorts the specified independent data column in ascending or descending order, and rearranges a specified dependent (or frequency) data column accordingly. Switches between larger and smaller font sizes. A toggle switch to select one- variable or two-variable statistics. This setting affects the statistical calculations and plots. T he label indicates which setting is current. Computes descriptive statistics for each data set specified in Symbolic view. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-7 Example You are measurin g the height of students in a classroom to find the mean height. The first five students have the following measurements 160cm, 165cm, 170cm, 175cm, 180cm. 1. Open the Statistics apl et. Select Statistics 2 . Enter the measurement data. 160 16 5 17 0 17 5 180 Deletes the currently highlighted value. CLEAR Clears the current column or all columns of data. Pregss CLEAR to display a menu list, then select the current column or all columns option, and press . cursor key Moves to the first or last row, or first or last column. K e y Meani ng (Continued) hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
10-8 Statistics aplet 3 . F ind the mean of the sample. Ensur e the / menu ke y label reads . Pr ess to see the statistic s calculated fr om the sample data in C1 . Note that the title o f the column of st atist ics is H1 . Ther e are 5 data set de finitions av ailable for one- var iable stat ist ics: H1âH5 . If data is entered in C1 , H1 i s automatically set to use C1 for dat a, and the fr equency of each data point is set to 1. Y ou can select other columns of data f rom the Statis tics S ymboli c setup v ie w . 4. Pre ss to c lose the statistic s windo w and pre ss k ey t o see the data set definitions . The f irst column indicates the assoc iated column of data fo r each data set def inition , and the second column indicates the constant f requenc y , or the column that holds the frequ encies. The k ey s y ou can use f r om this windo w are: Key M e a n i n g Copies the column variable (or variable expression) to the edit line for editing. Press when done. Checks/unchecks the current data set. Only the checkmarked data set(s) are computed and plotted. or Ty ping aid for the column variables ( ) or for the Fit expressions ( ). hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-9 To continue our example, supp ose that the heights of the rest of the students in the class are measured, but each one is rounded to the nearest of the five values first recorded. Instead of entering all the new data in C1 , we shall simply add another column, C2 , that holds the frequencies of our five data points in C1 . Displays the current variable expression in standard mathematical form. Press when done. Evaluates the variables in the highlighted column (C1, etc.) expression. Displays the menu for entering variable names or contents of variables. Displays the menu for entering math operations. Deletes the highlighted variable or the current character in the edit line. CLEAR Resets default specifications for the data sets or clears the edit line (if it was acti ve). Note: If CLEAR is used the data sets will need to be selected again before re-use. K e y Meani ng (Continued) Height (cm) Freq uen cy 160 5 165 3 170 8 175 2 180 1 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
10-10 Statistics aplet 5 . Mov e the highli ght bar into the ri ght column of the H1 definiti on and replace the frequency value o f 1 w ith the name C2 . 2 6. Re turn to the numer ic v ie w . 7 . Enter the fr equency data show n in the abo ve t able . 5 3 8 2 1 8. Displa y the computed stat ist ics. The mean height is approximately 167.63cm. 9 . Setup a histogr am plot for the data . SETUP - PLOT Enter se t up infor mation appropriate to your data. 10. Plo t a histogra m of the data. Save data The data that you enter is automatically saved. Wh en you are finished entering data values, you can press a key for another Statistics view (like ), or you can switch to another aplet or HOME. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-11 Edit a data set In the Numeric view of the Statistics aplet, highlight the data value to change. Type a new va lue and press , or press to copy the value to the edit line for modification. Press after modifying the value on the edit line. Delete data ⢠T o delete a single data item, highli ght it and pres s . The v alues belo w the deleted cell wi ll scr oll up one row . ⢠T o delete a column of data , highlight an entry in that column and press CLEAR . Select the co lumn name. ⢠T o delete all columns of data , pr ess CLEAR . Select All columns . Insert data Highlight the entry following the point of insertion. Press , then enter a number. It will write over the zero that was inserted. Sort data values 1. In Numeri c vi ew , highli ght the column you w ant to sort, and pre ss . 2 . Spec ify the Sort Order . Y ou can choose either Ascending or Descending . 3 . Spec if y the INDEPENDENT and DEPENDENT data columns. So rting is b y the independent column. F or instance, if A ge is C1 and Income is C2 and yo u want to so rt by Income, then y ou mak e C2 the independent column f or the sorting and C1 the dependent column. â T o sort just one column , choo se None for the dependent column. â F or one-vari able statisti cs with tw o data columns, spec ify the fr eque ncy column as the depe ndent column. 4. Pres s . hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
10-12 Statistics aplet Defining a regression model The Symbolic view includes an expression (Fit1 through Fit5) that defines the regression model, or âfitâ, to use for the regression analysis of each two-variable data set. There are three ways to select a regression model: ⢠Accept the default option to fit the d ata to a straight line. ⢠Select one of the av ailable fi t options in S ymbo lic Setup vi ew . ⢠Enter y our o wn mathematical e xpres sion in S ymbolic vi ew . This expr ession w ill be plotted, but it w ill not be fitted t o the data points . Angle Setting You can ignor e the angle measurement mode unless your Fit definition (in Symbolic v iew) involves a trigonometric function. In this case, you should specify in the mode screen whether the trigonometric units are to be interpreted in degrees, radians, or grads. To choose the fit 1. In Numer ic v iew , make sur e is set . 2. P r e s s SETUP - SYMB to display the Sy mbolic Setup vi ew . Highlight the F it number ( S1FIT to S5FIT ) yo u want to de fine . 3 . Pre ss and select f r om the list . Pres s when done . The r egre ssion f orm ula for the fit is display ed in S ymbo lic v ie w . Fit models Ten fit models are available: Fit model Meaning Linear (Default.) Fits the data to a straight line, y = mx b . Uses a least-squares fit. Logarithmic Fits to a logarithmic curve, y = m ln x b . Exponential Fits to an exponential curve, y = be mx . Power Fits to a power curve, y = bx m . hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-13 To define your own fit 1. In Numeri c vi ew , mak e sur e is set. 2 . Display the S ymbolic v iew . 3 . Highli ght the F it e xpres sion ( Fit1 , etc .) for the desired data set . 4. T ype in an e xpr ess ion and pr ess . The independent variable must be X , and the expr ession mus t not contain any unkn ow n var iables . Example: . This automatically changes the Fit type ( S1FIT , etc.) in the Symbolic Setup view to User Defined. Quadratic Fits to a quadratic curve, y = ax 2 bx c . Needs at least three points. Cubic Fits to a cubic curve, y = ax 3 bx 2 cx d . Needs at least four points. Logistic Fits to a logistic curve, , where L is the saturation value for growth. You can store a positive real value in L , orâif L = 0âlet L be computed automatically. Exponent Fits to an exponent curve, . Trigonometric Fits to a trigonometric curve, . Needs at least three points. User Defined Define your own expr ession (in Symbolic view.) Fit model Meaning (Co ntinued) y L 1 ae bx â () ------------------------- - = ya b x = ya b x c () sin â d = 1.5 x cos à 0.3 x sin à hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
10-14 Statistics aplet Computed statistics One-variable When the data set contains an odd number of values, the data setâs median value is no t used when calculating Q1 and Q3 in the table abo ve. For example, for the following data set: { 3,5,7,8,15,16,17} only the first three items, 3, 5, and 7 are used to calculate Q1, and only the last three terms, 15, 16, and 17 are used to calculate Q3. Statistic Definition N Σ Number of data points. TOT Σ Sum of data values (with their frequencies). MEAN Σ Mean value of data set. PVAR Σ Population variance of data set. SVAR Σ Sample varianc e of data set. PSDEV Populati on standard deviation of data set. SSDEV Sample stan dard deviation of data set. MIN Σ Minimum data value in data set. Q1 First quartile: median of values to left of median. MEDIAN Median value of data set. Q3 Third quartile: media n of values to right of median. MAX Σ Maximum data value i n data set. hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-15 Two-variable Plotting You can plot: ⢠histogr ams ( ) ⢠box -a nd-whisk er plots ( ) ⢠scat ter p lots ( ). Once you have entere d your data ( ), defined your data set ( ), and defined your Fit mod el for two- variable statistics ( SETUP - SYMB ), you can plot your data. You can plot up to five scatter or box-and-whisker plots at a time. You can plot only one histogram at a time. Statistic Definition MEANX Mean of x - (independent) values. Σ X Sum of x -values. Σ X2 Sum of x 2 -values. MEANY Mean of y - (dependent) values. Σ Y Sum of y -values. Σ Y2 Sum of y 2 -values. Σ XY Sum of each xy . SCOV Sample covariance of independent and dependent data columns. PCOV Population covariance of independent and dependent data columns CORR Correlation coeffici ent of the independent and dependent data columns for a linear fit only (regardless of the Fit chosen). Returns a value from 0 to 1, where 1 is the best fit. RELERR The relative error for the selec ted fit. Provides a measure of accuracy for the fit. hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
10-16 Statistics aplet To plot statistical data 1. In S ymbo lic v ie w ( ) , select ( ) the data sets y ou w ant to plot . 2 . F or one-vari able data ( ) , select the plo t type in Plot Setup ( SETUP - PLOT ) . Highli ght ST A TPLOT , pres s , select either Histogram or BoxWhisker , and pr ess . 3 . F or any plot , but espec iall y for a histogr am, adj ust the plottin g scale and range in the Plot Setup vie w . If you find histogr am bars too fat or too thin, y ou can adjus t them by adj usting the HWIDTH settin g. 4. Pr ess . If you ha v e not adjus ted the P lot Setup y ourself , you can try sel ect Auto Scale . Auto Scale can be relied upon to give a good starting scale which can then be adjusted in the Plot Setup view. Plot types Histogram One-variable statistics . The numbers below the plot mean that the current bar (where the cursor is) starts at 0 and ends at 2 (not including 2), and the frequency for this column, (that is, the number of data elements that fall between 0 and 2) is 1. You can see information about the next bar by pressing the k ey. Box and Whisker Plot One-variable statistics . The left whisker marks the minimum data value. The box marks the first quartile, the median (where the cursor is), and the third quartile. The right whisker marks the maximum data value. The numbers below the plot mean that this column has a median of 13. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-17 Scatter Plot Tw o-variable statistics . The numbers below the plot indicate that the cursor is at the first data point for S2, at (1, 6). Press to move to the next data point and display information about it. To connect the data points as they are plotted, checkmark CONNECT in the second page of the Plot Setup. This is not a regression curve. Fitting a curve to 2VAR data In the Plot view, press . This draws a curve to fit the checked two-variable data set(s). See âT o choose the fitâ on page 10-12. The e xpre ssion in Fit2 sho ws that the slope = 1.98 08 21917 81 and the y - i n t e r c e p t = 2. 2657 . Correlation coefficient The correlation coeffici ent is stored in the CORR variable. It is a measure of fit to a linear curve only. Regardless of the Fit model you have chosen, CORR relates to the linear model. hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
10-18 Statistics aplet Relative Er ror The relative error is a measure of the error between predicted values and actual va lues based on the specified Fit. A smaller number means a better fit. The relative error is stored in a variable named RELERR . The relative error provides a measure o f fit accuracy for all fits, and it does depend on the Fit model you have chosen. HINT In order to access the CORR and RE LERR variables after you plot a set of statistics, you must press to access the numeric view and then to display the correlation values. The values are store d in the variables when you access the Symbolic view. Setting up the plot (Plot setup view) The Plot Setup view ( SETUP - PLOT ) sets most of the same plotting parameters as it does for the other built-in aplets. See âSetting up the plot (Plot view setup)â on page 2-5. Settings unique to the Statistics aplet are as follows: Plot type (1VAR) STATPLOT enables you to specify either a histogram or a box-and-whisker plot for one-variable statistics (when is set). Press to change the highlighted setting Histogram width HWIDTH enables you to specify the width of a histog ram bar. This determines how many bars will fit in the display, as well as how the data is di stributed (how many values each bar represents). Histogram range HRNG enables you to specify th e range of values for a set of histogram bars. The range runs from the left edge of the leftmost bar to the right edge of the rightmost bar. You can limit the range to exclude any values you suspect are outliers. Plotting mark (2VAR) S1MARK through S5MARK enables you to specify one of five symbols to use to plot each data set. Press to change the highlighted setting. Connected points (2VAR) CONNECT (on the second page), when checkmarked, connects the data points as they are plotted. The re sulting line is not the regression curve. The order of plotting i s according to the ascending order of independent values. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-19 For instance, the data set (1,1 ), (3,9), (4,16), (2,4) would be plotted and traced in the order (1,1), (2,4), (3,9), (4,16). Trouble-shooting a plot If you have problems plotting, check that you have the following: ⢠The co rr ect or menu label o n (Numeri c view ) . ⢠The cor rec t fit (r egre ssion model), if the data set is tw o -var iable . ⢠Only the data sets to compute or plot are chec kmark ed (S ymbolic vie w). ⢠The cor re ct plotting r ange. T ry using Aut o Scale (instead of ), or adjust the plotting paramet ers (in P lot Setup) fo r the ranges of the ax es and the w idth of histogr am bars ( HWIDTH ). In mode, ensure that both paired columns contain data, and that they are the same length. In mode, ensure that a paired colu mn of frequency values is the same length as th e data column that it refers to. Exploring the graph The Plot view has menu keys for zooming, tracing, and coordinate display. There are also scaling options under . These options are desc ribed inâExploring the graphâ on page 2 -7. Statistics apletâs PLOT view keys K ey Meaning CLEAR Erases the plot. Offers additional pre-defined views for splitting the screen, overlaying plots, and autoscaling the axes. Moves cursor to far left or far right. hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
10-20 Statistics aplet Calculating predicted values The functions PREDX and PREDY estimate (predict ) values for X or Y given a hypothetical value for the other . The estimation is made based on the curve that has been calculated to fit the data a ccording to the specified fit. Find predicted values 1. In P lot vi ew , draw the r egr ession c ur ve f or the data set. 2 . Pr ess to mov e to the r egr essi on cu rve . 3 . Pr ess and en ter the va lue of X . The c ursor jumps to the specifi ed point on the curve and th e coor dinate displa y sho ws X and the pr edicted v alue of Y . In HOME: ⢠Enter PREDX ( y-value ) to find the predi cted value f or the independent v ari able gi ven a hy potheti cal dependent v alue . Displays ZOOM menu. Turns trace mode on/off. The white box appears next to the option when Trace mode is active. Turns fit mode on or off. Turning on draws a curve to fit the data points according to the current regression model. (2var statistics only) Enables you to specify a value on the line of best fit to jump to or a data point number to jump to. Displays the equation of the regression curve. Hides and displays the menu key labels. When the la bels are hidden, any menu key displays the (x,y) coordinates. Pressing redisplays the menu labels. Ke y Meaning (Continued) hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Statistics aplet 10-21 ⢠Enter P RED Y( x-value ) to find the pr edic ted value o f the dependent var iable gi ven a h ypothetical independent vari ab le. You can type PREDX and PREDY into the edit line, or you can copy these function names from the MATH menu under the Stat-Two category. HINT In cases where more than one fit curve is displayed, the PRED Y function uses the most recently calculated curve. In order to avoid errors with th is function, uncheck all fits except the one that you want to work with, or use the Plot View method. hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Inference aplet 11-1 11 Inference aplet About the Inference aplet The Inference capabilities include calculation of confidence intervals and hy pothesis tests based on the Normal Z-distribution or Studentâs t-distribution. Based on the statistics from one or two samples, y ou can test hypotheses and find confidence intervals for the following quantities: ⢠mean ⢠proporti on ⢠difference between two means ⢠differenc e between two proportions Example data When you first access an input form for an Inference test, by default, the input form contains ex ample data. This example data is designed to return me aningful results that relate to the test. It is useful for gaining an understanding of what the test does, and for demonstrating the test. The calculatorâs on-line help provides a description of what the example data represents. Getting started with the Inference aplet This example describes the Inference apletâs options and functionality by stepping you through an example using the exampl e data for th e Z-Test o n 1 mean. Open the Inference aplet 1. Open the Inference aplet. Select Inference . The Inference aplet opens in the Symbolic view. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
11-2 Inference apl et Inference apletâs SYMB view keys The table below summarizes the options available in Symbolic view. If you choose one of the hypoth esis tests, you can choose the alternative hypothesis to test against the null hypothesis. For each test, th ere are three possible choices for an alternative hypothesis based on a quantitative comparison of two quantiti es. The null hy pothesis is always that the two quantities are equal.Thus, the alternative hypotheses cover th e various cases for the two quantities being unequal: <, >, and â . In this section, we will u se th e example data for the Z-Test on 1 mean to illustrate how the aplet works and what features the various views present. Hypothesis Tests Confidence Intervals Z: 1 μ , the Z-Te st on 1 mean Z-Int: 1 μ , the confidence interval for 1 mean, based on the Normal distribution Z: μ 1 â μ 2 , the Z-Test on the difference of two means Z-Int: μ 1 â μ 2 , the confidence interval for the difference of two means, based on the Normal distribution Z: 1 Ï , the Z-Test on 1 proportion Z-Int: 1 Ï , the confidence interval for 1 proportion, based on the Normal distribution Z: Ï 1 â Ï 2, the Z-Test on the difference in two proportions Z-Int: Ï 1 â Ï 2, the confi dence interval for the difference of two proportions, based on the Normal distribution T: 1 μ , the T-Test on 1 mean T-Int: 1 μ , the confidence interval for 1 mean, based on the Studentâs t-distribution T: μ 1 â μ 2 , the T- Test on the difference of two means T-Int: μ 1 â μ 2 , the confidence interval for the difference of two means, based on the Studentâs t-distribution hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Inference aplet 11-3 Select the inferential method 2. Select the Hypothesis Test inferential method. Select HYPOTH TEST 3. Define the type of test. ZâTest: 1 μ 4. Select an alternative hypothesis. μ< μ0 Enter data 5. Enter the sample statistics and population parameters. setup-NUM The table below lists the fields in this view for our current Z-Test: 1 μ example. Field name Definition μ 0 Assumed population mean Ï Population standard dev iation Sample mean n Sample size α Alpha level for the test x hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
11-4 Inference apl et By default, each field already contains a value. These values constitute the example database and are explained in the feature of this aplet. Display on-line help 6. To display the on-line help, press 7. To close the on-line help, press . Display test results in numeric format 8. Display the test results in numeric format. The test distri bution value and its associated probability are displayed, along with the critical value(s) of the test and the associated critical value(s) of the statistic. Note: You can access the on-line help in Numeric view. Plot test results 9. Display a graphic view of the test results. Horizontal axes are presented for both the distribution variable and the test statistic. A generic bell curve repre sents the probability distribution function. Vertical lines mark the critical value(s) of the test, as well as the value of the test statistic. The rejection region is marked and the test numeric results are displayed between the horizontal axes. Importing sample statistics from the Statistics aplet The Inference aplet supports th e calculation of confidence intervals and the testing of hypotheses based on data in the Statistics aplet. Computed statistics for a sample of data in a column in any St atistics-based aplet can be imported for use in the Infe rence aplet. The following example illustrates the process. R hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Inference aplet 11-5 A calculator produces the following 6 random numbers: 0.529, 0.295, 0.952, 0.2 59, 0.925, and 0.592 Open the Statistics aplet 1. Open the Statistics aplet and reset the current settings. Select Statistics The Statistics aplet opens in the Numeric view. Enter data 2. In the C1 column, enter the random numbers produced by the calculator. 529 295 952 259 925 592 HINT If the Decimal Mark setting in the Modes input form ( modes ) is set to Comma, use instead of . 3. If necessary, select 1-vari able statistics. Do thi s by pressing the fifth menu key until is displayed as its menu label. Calculate statistics 4. Calculate statistics. The mean of 0.592 seems a little large compared to the expected value of 0.5. To see if the difference is statistically significant, we will use the statistics computed here to construct a confidence interval for the true mean of the population of random numbers and see whether or not this interval contains 0.5. 5. Press to close the computed statistics window. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
11-6 Inference apl et Open Inference aplet 6. Open the Infere nce aplet and cle ar current settings . Select Inference Select inference method and type 7. Select an inference method. Select CONF INTERVAL 8. Select a distribution statistic type. Select T-Int: 1 μ Set up the interval calculation 9. Set up the interval calculation. Note: The default values are derived from sample data from the on-line help example. Setup-NUM hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Inference aplet 11-7 Import the data 10. Import the data from the Statistics aplet. Note: The data from C1 is displayed by default. Note: Press to see the statistics before importing them into the Numeric Setup view. Also, if there is more than one aplet base d on the Statistics aplet, you are prompted to choose one. 11. Specify a 90% confidence interval in the C: field. to move to the C: field 0.9 Display Numeric view 12. Display the confidence interval in the Numer ic view. Note: The interval setting is 0.5. Display Plot view 13. Display the confidence interval in the Plot view. You can see, from the second text row, that the mean is contained within the 90% confidence interval (CI) of 0.3469814 to 0 .8370186. Note: The graph is a simple, generic bell-curve. It is not meant to accurately represent the t-distribution with 5 degrees of freedom. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
11-8 Inference apl et Hypothesis tests You use hypothesis tests to test the validity of hypotheses that relate to the statistical parameters of one or two populations. The tests are base d on statistics of samples of the populations. The HP 40gs hypothesis tests use the Normal Z-distribution or Studentâs t-distribution to calculate probabilities. One-Sample Z-Test Menu name Z-Test: 1 μ On the basis of statistics from a single sample, the One-Sample Z-Test measures th e strength of the evidence for a selected hypothesis against the nu ll hypothesis. The null hypothesis is that the population mean equals a specified value Î 0 : μ = μ 0 . You select one of the following alternative hypotheses against which to test the null hypothesis: Inputs The inputs are: H 1 : μ 1 μ 2 < H 1 : μ 1 μ 2 > H 1 : μ 1 μ 2 â Field name Definition Sample mean. n Sample size . μ 0 Hypothetical population mean. Ï Population standard deviation. α Significance level. x hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Inference aplet 11-9 Results The resu lts are: Two-Sample Z-Test Menu name Z-Test: μ 1â μ 2 On the basis of two samples, each from a separate population, this test measures t he strength of the evidence for a selected hypothesis against the null hypothesis. The null hypothesis is that the mean of the two populations are equal (H 0 : μ 1= μ 2). You select one of the following alternative hypotheses against which to test the null hypothesis: Inputs The inputs are: Result Description Test Z Z-test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary values of Z associated with the α level that you supplied. Critical Boundary values of required by the α value that you supplied. x x H 1 : μ 1 μ 2 < H 1 : μ 1 μ 2 > H 1 : μ 1 μ 2 â Field name Definition Sample 1 mean. Sample 2 mean. n1 Sample 1 size. n2 Sample 2 size. Ï 1 Population 1 standard deviation. x 1 x 2 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
11-10 Inference apl et Results The results are: One-Proportion Z-Test Menu name Z-Test: 1Ï On the basis of statistics from a single sample, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis. The null hypothesis is that the proportion of su ccesses in the two populations is equal: H 0 : Ï = Ï 0 You select one of the following alternative hypotheses against which to test the null hypothesis: Ï 2 Population 2 standard deviation. α Significance level. Field name Definition Result Description Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary value of Z associated with the α level that you supplied. H 1 : ÏÏ 0 < H 1 : ÏÏ 0 > H 1 : ÏÏ 0 â hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Inference aplet 11-11 Inputs The inputs are: Results The resu lts are: Two-Proportion Z-Test Menu name Z-Test: Ï 1 â Ï 2 On the basis of statistics from two samples, each from a different population, the Two-Proportion Z-Test measures the strength of the evide nce for a selected hypothesis against the null hypothesis. The null hypothesis is that the proportion of successes in th e two populations is equal H0: Ï 1 = Ï 2 . You select one of the following alternative hypotheses against which to test the null hypothesis: Field name Definition x Number of successes in the sample. n Sample size. Ï 0 Population proportion of successes. α Si gnificance level. Result Description Test P Proportion of successes in the sample. Test Z Z-Test st atistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary value of Z associated with the level you supplie d. H 1 : Ï 1 Ï 2 < H 1 : Ï 1 Ï 2 > H 1 : Ï 1 Ï 2 â hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
11-12 Inference apl et Inputs The inputs are: Results The results are: One-Sample T-Test Menu name T-Test: 1 μ The One-sample T-Test is used when the population standard deviation is not know n. On the basis of statistics from a single sample, this test measures the strength of the evidence for a se lected hypothesis against the null hypothesis. The null hypothesis is that the sample mean has some assumed value, Î 0 :μ = μ 0 You select one of the following alternative hypotheses against which to test the null hypothesis: Field name Definition X1 Sample 1 mean. X2 Sample 2 mean. n1 Sample 1 size. n2 Sample 2 size. α Significance level. Result Description Test Ï 1â Ï 2 Difference between the proportions of successes in the two samples. Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary values of Z associated with the α level that you supplied. H 1 : μμ 0 < H 1 : μμ 0 > H 1 : μμ 0 â hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Inference aplet 11-13 Inputs The inputs are: Results The resu lts are: Field name Definition Sample mean. Sx Sample standard deviat ion. n Sample size. μ0 Hypothetical population mean. α Significance level. x Result Description Test T T-Test statistic. Prob Probability associated with the T-Test statistic. Critical T Boundary value of T associated with the α level that you supplied. Critical Boundary value of required by the α value that you supplied. x x hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
11-14 Inference apl et Two-Sample T-Test Menu name T-Test: μ 1 â μ 2 The Two-sample T-Test is used when the population standard deviation is not know n. On the basis of statistics from two samples, each sample from a different population, this test measures the strength of the evidence for a selected hypothesis against the nu ll hypothesis. The null hypothesis is that the two populations means are equal H 0 : μ 1 = μ 2 . You select one of the following alternative hypotheses against which to test the null hypothesis Inputs The inputs are: H 1 : μ 1 μ 2 < H 1 : μ 1 μ 2 > H 1 : μ 1 μ 2 â Field name Definition Sample 1 mean. Sample 2 mean. S1 Sample 1 standard deviation. S2 Sample 2 standard deviation. n1 Sample 1 size . n2 Sample 2 size . α Sign ificance level. _Pooled? Check this option to pool samples based on their standard deviati ons. x1 x2 hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Inference aplet 11-15 Results The resu lts are: Confidence intervals The confidence interval calc ulations that the HP 40gs can perform are based on the Normal Z-distribution or Studentâs t-distribution. One-Sample Z-Interval Menu name Z-INT: μ 1 This option uses the Normal Z-distribution to calculate a confidence interval for m, the true mean of a population, when the true population standard deviation, s, is known. Inputs The inputs are: Result Description Test T T-Test statistic. Prob Probability associated with the T-Test statistic. Critical T Boundary values of T associated with the α level that you supplied. Field name Definition Sample mean. Ï Population standard deviation . n Sample size. C Confidence level. x hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
11-16 Inference apl et Results The results are: Two-Sample Z-Interval Menu name Z-INT: μ1 â μ2 This option uses the Normal Z- distribution to calculate a confidence interval for the difference between the means of two populations, μ 1 â μ 2 , when the population standard deviations, Ï 1 and Ï 2 , are known. Inputs The inputs are: Results The results are: Result Description Critical Z Critical value for Z. μ min Lower bound for μ . μ max Upper bound for μ . Field name Definition Sample 1 mean. Sample 2 mean. n1 Sample 1 size . n2 Sample 2 size . Ï 1 Population 1 standard devi ation. Ï 2 Population 2 standard devi ation. C Confidence level. x1 x2 Result Description Critical Z Critical value for Z. μ Min Lower bound for μ 1 â μ 2 . μ Max Upper bound for μ 1 â μ 2 . Î Î hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Inference aplet 11-17 One-Proportion Z-Interval Menu name Z-INT: 1 Ï This option uses the Normal Z-distribution to calculate a confidence interval for the proportion of successes in a population for the case in which a sample of size, n , has a number of successes, x . Inputs The inputs are: Results The resu lts are: Two-Proportion Z-Interval Menu name Z-INT : Ï 1 â Ï 2 This option uses the Normal Z-distribution to calculate a confidence interval for the difference between the proportions of successes in two populations. Inputs The inputs are: Field name Definition x Sample success count. n Sample size. C Confidence level. Result Description Critical Z Critical value for Z. Ï Min Lower bound for Ï . Ï Max Upper bound for Ï . Field name Definition Sample 1 success count. Sample 2 success count. x 1 x2 hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
11-18 Inference apl et Results The results are: One-Sample T-Interval Menu name T-INT: 1 μ This option uses the Studentâs t-distribution to calculate a confidence interval for m, the true mean o f a population, for the case in which the true population standard deviation, s, is unknown. Inputs The inputs are: n1 Sample 1 size . n2 Sample 2 size . C Confidence level. Field name Definition (Continued) Result Description Critical Z Critical value for Z. Ï Min Lower bound for the difference between the proportions of successes. Ï Max Upper bound for the difference between the proportions of successes. Î Î Field name Definition Sample mean. Sx Sample standard deviation. n Sample size. C Confidence level. x 1 hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Inference aplet 11-19 Results The resu lts are: Two-Sample T-Interval Menu name T-INT: μ 1 â μ 2 This option uses the Studentâs t-distribution to calculate a confidence interval for the difference between the means of two populations, μ 1 â μ 2, when the population standard deviations, s1and s2, are unk nown. Inputs The inputs are: Result Description Critical T Critic al value for T. μ Min Lower bound for μ . μ Max Upper bound for μ . Field name Definition Sample 1 mean. Sample 2 mean. s1 Sample 1 standard deviation. s2 Sample 2 standard deviation. n1 Sample 1 size. n2 Sample 2 size. C Confidence level. _Pooled Whether or not to pool the samples based on their standard devi ations. x1 x2 hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
11-20 Inference apl et Results The results are: Result Description Critical T Critical value for T. μ Min Lower bound for μ 1 â μ 2 . μ Max Upper bound for μ 1 â μ 2 . Î Î hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-1 12 Using the Finance Solver The Finance Solver, or Finance a plet , is available by using the APLET key in your calculator. Use the up and down arrow keys to select the Finance aplet. Your screen should look as follows: Press the key or the soft menu key to activate the aplet. The result ing screen shows the diff erent elements involved in the solution of fi nancial problems with your HP 40gs calculator. Background information on and applications of financial calculations are provided next. Background The Finance Solver application provides you with the ability of solving time-value-of-money (TVM) and amortization problems. Th ese problems can be used for calculations involving compound interest applic ations as well as amortization tables. Compound interest is the process by which earned interest on a given principal amount is ad ded to the principal at specified compounding periods, and then the hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
12-2 Using the Finance Solv er combined amount earns interest at a certain rate. Financial calculations involving compound interest include savings accounts, mo rtgages, pension funds, leases, and annuities. Time Value of Money (TVM) calculations, as the name implies, make use of the notion that a dollar today will be worth more than a dollar sometime in the future. A dollar today can be invested at a c ertain interest rate and generate a return that the same dollar in the future cannot. This TVM princip le underlies the notion of interest rates , compound interest and rates of return. TVM transactions can be represented by using cash flow diagrams . A cash flow diagram is a time line divid ed into equal segments representing the compounding periods. Arrows represent the cash flow s, which could be positive (upward arrows) or negati ve (downward arrows), depending on the poin t of vi ew of the lender or borrower . The following cash flow diagram shows a loan from a borrower's point of view: On the other hand, the following cash flow diagram shows a load from the lender's point of view: In addition, cash flow diagrams specify when payments occur relative to the compounding periods: at the beginning of each period or at th e end . The Finance Solver application provides both of these payment modes: Begin mode and End mode. The follo wing cash Present value (PV) (Loan) Money recei ved is a positi ve number Money paid out is a negativ e number Equal periods 1 23 4 5 (P MT) Futur e value (FV) Equal payments Pay m e n t (P MT) Pay m e n t (P MT) Pay m e n t (P MT) Pay m e n t (P MT) } } } } } FV Equal payments 1 23 4 5 } } } } PM T } PM T PM T PM T PM T Equal periods PV Loan } hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-3 flow diagram shows lease payments at the beginning of each period. The following cash flow diagram shows deposits into an account at the end of each period. As these cash-flow diagrams imply, there are five TVM variables: PV 1 23 4 5 FV Capitalized value o f lease } PM T PMT PM T PM T PM T PV 1 23 4 5 FV PM T PMT PM T PMT PM T N The total number of compoundi ng periods or payments. I%YR The nominal annual interest rate (or investment rate). This rate is divided by the number of paymen ts per year (P/YR) to compute the nominal interest rate per compounding period -- which is the interest rate actually used in TVM calculations. PV The present value of the initial cash flow. To a lender or borrower, PV is the amount of the loan; to an investor, PV is the in itial investment. PV always occurs at the beginning of the first period. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
12-4 Using the Finance Solv er Performing TVM calculations 1. Launc h the F inanc ial Sol ver as indi cated at the beginning of this secti on. 2 . Use the arr o w ke y s to highligh t the differ ent f ields and enter the kno wn v aria bles in the T VM calculati ons, pres sing the soft-menu ke y after enter ing each kno wn va lue. Be sur e that v alues are ente red f or at least f our of the fi v e T VM var iable s (namely , N, I%YR , PV , PMT , and FV). 3 . If necessar y , enter a di ffer ent value for P/YR (default value is 12 , i.e ., monthly pa yments). 4. Pr ess the k e y t o change the P ay ment mode (Beg or End) as requir ed. 5 . Use the arr ow k ey s to highli ght the TVM vari able you w ish to solv e for and pr ess the soft -menu k ey . PMT The periodic payment amount. The payments are the same amount each period and the TVM calcu lation assumes that no payments are skipped. P ayments can occur at the beginning or the end of each compounding period -- an option you control by setting the Payment mode to Beg or End. FV The future value of the transaction: the amount of the final cash flow or the compounded value of the series of previous cash flows. For a loan, this is the size of the final balloon payment (beyond any regular payment due). For an investment this is the cash value of an investment at the end of the investment period. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-5 Example 1 - Loan calculations Suppose you finance the purcha se of a car with a 5-year loan at 5.5% annual intere st, compounded monthly. The purchase price of the car is $19,500 , and the down payment is $3,000. What are the required month ly payments? What is the largest loan you can afford if your maximum monthly payment is $300? Assume that the payments start at the end of the first period. Solution. The fo llowing cash fl ow diagram illu strates th e loan calculations: Start the Finance Solver, selecting P/YR = 12 and End payment option. ⢠Enter the kno wn TVM var iables a s show n in the diagram abo ve . Y our input form should look as follo ws: ⢠Highli ghting the P MT field , pr ess the soft menu k ey to obta in a paymen t of -315.17 (i .e ., P MT = -$315.17). ⢠T o determine the maxim um loan possible if the monthly pa ymen ts are onl y $300, type the value â300 in the P MT field , highli ght the PV field , and pre ss the soft menu k ey . The r esulting v alue is PV = $15, 7 05 .8 5 . PV = $1 6,500 1 2 59 60 FV = 0 l%YR = 5 .5 N = 5 x 12 = 60 P/YR = 12 ; End mode PMT = ? hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
12-6 Using the Finance Solv er Example 2 - Mortgage with balloon payment Suppose you have taken out a 30-year, $150, 000 house mortgage at 6.5% annual interest. You expect to sell the house in 10 years, repay ing the loan in a balloon payment. Find the size of the balloon payment, the value of the mortgage after 10 years of payment. Solution. The following cash flow diagram illustrates the case of the mortgage with balloon payment: ⢠Start the F inance Sol ver , selecting P/YR = 12 and End pay ment option . ⢠Enter the kno wn TVM var iables as sho w n in the diagr am abov e . Y our input f orm , for calc ulating monthly pa yme nts for the 3 0 -yr mortgage , should look as follo ws: ⢠Highlighting the PMT fi eld, pre ss the soft menu k ey to obt ain a pay ment of -9 48.10 (i .e ., P MT = -$9 48.10) ⢠T o determine the balloon pa yme nt or fu ture v alue (FV) for the mortgage after 10 years, u se N = 120, highlight the FV f ield , and pr ess the soft menu ke y . Th e resulting v alue is FV = -$12 7 ,164.19 . The negative v alue indicates a p ay ment from the homeo wne r . Check that the r equir ed balloon pay ments at the end of 20 years (N=2 40) and 2 5 year s (N = 300) are -$8 3,4 9 7 .9 2 and -$48 , 4 5 6.2 4, r especti vel y . PV = $15 0,000 1 2 59 60 l%YR = 6 .5 N = 30 x 12 = 360 (for PMT) N = 10 x 12 = 120 (f or balloon pa yment) P/YR = 12 ; End mode PMT = ? Balloon pay ment, FV = ? hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Using the Fin ance Solver 12-7 Calculating Amortizations Amortization calculations, which also use the TVM variables, determine the amounts applied towards principal and interest in a payment or series of payments. To calculate amortizations: 1. Start the F inance Solv er as indicated at the beginning of t his sec tion. 2 . Set the f ollo wing TVM var iables: a Number of pay ments per y ear (P/YR) b P ay ment at beginning or end of peri ods 3 . Stor e values for the TVM var iables I%YR, PV , P MT , and FV , whi ch define the pay ment sc hedule. 4. Pres s the soft menu k e y and enter the number of pa yme nts to amortiz e in this batch. 5 . Pres s the soft menu ke y to amortiz e a batch of pay ments. The calculator w ill prov ide fo r you the amount applied to inter est, to pr inc ipal, and the re maining balance after this set of pay ments hav e been amortiz ed. Example 3 - Amortization for home mortgage For the data of Example 2 abov e, find the amortization of the loan after the first 10 years (12x10 = 120 payments). Pressing the soft menu key produces the screen to the left. Enter 120 in the PAYMENTS field, and press the soft menu key to produce the results shown to the right. To continue amortizing the loan: 1. Pres s the sof t menu ke y to stor e the n ew balance after the pr ev io us amorti z ation as PV . 2 . Enter the n umber of pa ymen ts to amortiz e in the new batch. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
12-8 Using the Finance Solv er 3 . Pre ss the soft menu k ey to amorti z e the ne w batch of pa yments . Repeat step s 1 through 3 as often as needed. Example 4 - Amortization for home mortgage For the results of Example 3, show the amortization of the next 10 years of the mortgage loan. First, press the soft menu key. Then, keeping 120 in the PAYMENTS field, press the soft menu key to produce the results shown below. To amortize a series of future payments starting at payment p: 1. Calc ulate the balance of the loan at pa ymen t p-1 . 2 . St ore the ne w balance in PV using the soft menu k ey . 3 . Amorti z e the ser ies of pa yme nts starting at the new PV . The amortization operation reads the values from the TVM variables, rounds the nu mbers it gets from PV and PMT to the current display mode, then calculates the amortization rounded to the same setting. The or iginal variables are not changed, except for PV, which is updated after each amortization. hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-1 13 Using mathematical func tions Math functions The HP 40gs contains many math functions. The function s are grouped in categories. For example, the Matrix category contains functions for manipulating matrices. The Probability category (shown as Prob. on the MATH menu) contains functions for working with pro bability. To use a math function in HOME view, you enter the function onto the command line, and include the arguments in parentheses after the function. You can also select a math function from the MATH menu. Note that this chapter covers only the use of mathematical functions in HOME view. The use of mathematical functions in CAS is described in Chapter14, âComputer Algebra System (CAS)â. The MATH menu The MATH menu provides access to math functions, physical constants, and programming constants. You can also access CAS commands. The MATH menu is organized by category . For each category of functions on the left, there is a list of function names on the right. The hi ghlighted category is the current category . ⢠When y ou press , you see the menu list o f Math categori es in the left column and the corr espo nding functi ons of the highli ghted category in the ri ght column. T he menu k e y indicates that the MA TH FUNCTIONS menu lis t is activ e . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
13-2 Using mathematical functio ns To select a function 1. Pr ess to displa y the MA TH menu. T he categorie s appear in alph abetical or der . 2 . Pr ess or to sc ro ll thro ugh the categori es. T o jump dir ectly to a category , pr ess the f irst letter o f the categoryâs name. No te: Y ou do not need to pr ess fi rst . 3 . The lis t of func tions (on the r ight) appli es to the cur r ently hi ghlighted catego ry (on the left) . Use and to sw itch between the category list an d the functi on list . 4. Highli ght the name of the func tion y ou wan t and pres s . This copi es the functi on name (and an initial parenthesis , if appropr iate) to the edit line. NOTE If you press while the MATH menu is open, CAS functions and commands are displayed. You can select a CAS function or command in the same way that you select a function from the MATH menu (by pressing the arrow keys and then ). The function or comman d selected appears on the edit line in HOME (and with an initial parenthesis, if appropriate). Function categories (MATH menu) Math functions by category Syntax Each functionâ s definition incl udes its syntax, that is, the exact order and spelling of a functionâs name, its delimiters (punctuation), and its arguments. Note that the syntax for a function does not require spaces. ⢠Cal culus ⢠Comp lex numb ers ⢠Constant ⢠Conver t ⢠Hyperbo lic trigonometr y (Hy perb .) ⢠Lis t s ⢠Lo o p ⢠Matri x ⢠Po l y n o m i a l ⢠Probabili ty ⢠Real number s (Real) ⢠Tw o - v a r i a b l e stati stics (Stat-T wo) ⢠Sym b o l ic ⢠Te s t s ⢠T rigonometry (T rig) hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-3 Functions common to keyboard and menus These functions are common to the keyboard and MATH menu. Keyboard functions The most frequently used functions are available directly from the keyboard. Many of the keyboard functions also accept complex numbers as arguments. Ï F or a descr iption , see â p â on page 13-8. ARG F or a descr iption , see â ARGâ on page 13- 7. F or a descr iption , see â â on page 11- 7 . AND F or a descr iption , see â ANDâ on page 13-19. ! F or a descr iption , see âCOMB(5,2) r eturns 10. T hat is, ther e are te n differ ent w ay s that fi ve things can be combined tw o at a time.!â on page 13-12. â F or a descr iption , see âSâ on page 13-11. EEX F or a descr iption , see âSci entific notation (po wers of 10)â on page 1- 20. F or a descr iption , see â â on page 11- 7 . The multiplicative inverse function finds the inverse of a square matrix, and the multiplicative inve rse of a real or complex number. Also works on a list containing only these object types. â â« â« x 1 â hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
13-4 Using mathematical functio ns ,, , Add, Subtract, Multiply, Di vide. Also accepts complex numbers, lists and matrices. val u e1 va lu e 2 , etc. e x Natural exponential. Also accepts complex numbers. e^ val u e Example e^5 ret u rn s 148.413159103 Natural logarithm. Also accepts complex numbers. LN ( val ue ) Example LN(1) re t u rn s 0 10 x Exponential (antilogarithm). Also accepts complex numbers. 10^ val u e Example 10^3 re turns 1000 Common logarithm. Also accepts complex numbers. LOG ( val ue ) Example LOG(100) r eturns 2 ,, Sine, cosine, tangent. Inputs and outputs depend on the current angle format (Degrees, Radians, or Grads). SIN ( val ue ) COS ( val ue ) TAN ( val ue ) Example TAN(45) r eturns 1 (Degr ees mode) . ASIN Arc sine: sin â1 x. Output range is from â90° to 90°, â Ï /2 to Ï /2, or â100 to 100 grads. Inputs and outputs depend on the current angle format. Also accepts complex numbers. ASIN ( val ue ) hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-5 Example ASIN(1) r eturns 90 (Degr ees mode) . ACOS Arc cosine: cos â1 x . Output range is from 0° to 180°, 0 to Ï , or 0 to 200 grads. Inputs and outputs depend on the current angle format. Also accepts complex numbers. Output will be complex for values outside the normal COS domain of . ACOS ( valu e) Example ACOS(1) ret u rn s 0 (Degrees mode) . ATAN Arc tangent: tan â1 x . Output range is from â90° to 90°, 2 Ï /2 to Ï /2, or â100 to 100 grad s. Inputs and outputs depend on the current an gle format. Al so accepts complex numbers. ATAN ( valu e) Example ATAN(1) ret u rn s 45 (Degrees mode). Square. Also accept s complex numbers. val u e 2 Example 18 2 r eturns 324 Square root. Also accepts complex numbers. valu e Example re turns 18 Negation. Also accepts complex numbers. â val u e Example -(1,2) r eturns (-1,-2) Power ( x raised to y ). Also accepts complex numbers. val u e ^ pow er 1 â x 1 â¤â¤ 324 hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
13-6 Using mathematical functio ns Example 2^8 r eturns 256 ABS Absolute value. For a co mplex number, this is . ABS ( val ue ) ABS (( x ,y)) Example ABS(â1 ) r eturns 1 ABS((1,2)) r eturns 2.2360679775 Takes the n th root of x . roo t NTHROOT valu e Example 3 NTHROOT 8 r eturns 2 Calculus functions The symbols for differentiation and integration are available directly form the keyboardâ and S respectivelyâas well as from the MATH menu. Differentiates expres sion with respect to the variable of differentiation. Fr om the command line, use a formal name (S1, etc.) for a non-numeric result. See âFinding derivativesâ on page 13- 21. vari ab l e ( ex p res s ion ) Example s1(s1 2 3*s1) re t u rn s 2*s1 3 Integrates expression from lower to upper limits with respect to the variable of integration. To find the definite integral, both limits must ha ve numeric values (that is, be numbers or real variables). To find the indefinite integral, one of the limits must be a formal variable (s1, etc). ( l o w e r, u p p e r, e x p r e s s i o n , v a r i a b l e ) See âUsing f ormal v aria bles â on page 13- 20 for fur th er de tai ls. x 2 y 2 n â â â â« â« hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-7 Example (0,s1,2*X 3,X) finds the inde finite r esult 3*s1 2* (s1^2/2) See âT o find the indef inite integral u sing for mal var iables â on page 13- 2 3 for more inf ormation o n finding indef inite integr als. TAYLOR Calculates the n th order Taylor polynomial of expression at the point where the given variable = 0. TAYLOR ( expr essi on, v ariable , n ) Example TAYLOR(1 sin(s1) 2 ,s1,5) w ith Radians angle measur e and Fr action number f ormat (set in MODE S) r etur ns 1 s1^2 -(1/3)*s1^4 . Complex number functions These functions are for complex n umbers only. You can also use complex numbers with all trigonometric and hyperbolic functions, and with some real-number and keyboard functions. Enter co mplex numbers in the form ( x,y ), where x is the real part and y is the imaginary part. ARG Argument. Finds the angle de fined by a complex number. Inputs and outputs use the current angle format set in Modes. ARG (( x, y)) Example ARG((3,3)) r eturns 45 (Degr ees mode) CONJ Complex conjugate. Conjugation is the negation (sign reversal) of the imaginary part of a complex number. CONJ (( x, y)) Example CONJ((3,4)) r eturns (3,-4) IM Imaginary part, y, of a complex number, ( x, y ). IM (( x, y)) â« hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
13-8 Using mathematical functio ns Example IM((3,4)) r eturns 4 RE Real part x , of a complex number, ( x, y ). RE (( x, y)) Example RE((3,4)) r eturns 3 Constants The constants available from the MATH FUNCTIONS menu are mathematical constants. These are describe d in this section. The HP 40gs has two other menus of constants: program constant s and physical constants. These are described in âProgram constants and physical constantsâ on page 13-24. e Natural logarithm base. Internally represented as 2.71828182846. e i Imaginary value for , the complex number (0,1). i MAXREAL Maximum real number. Internally represented as 9.99999999999 x 10 499 . MAXREAL MINREAL Minimum real number. In ternally represented as 1 x 10 -499 . MINREAL Ï Internally represented as 3.14159265359. Ï Conversions The conversion functions are found on the Convert menu. They enable you to make the following conversions. 1 â hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-9 â C Convert from Fahrenheit to Celcius. Example â C(212) r eturns 100 â F Convert from Celcius to Fahrenheit. Example â F(0) r eturns 32 â CM Convert from inches to centimeters. â IN Convert from centimeters to inches. â L Convert from US gallons to liters. â LGAL Convert from liters to US gallons. â KG Convert from pounds to kilograms. â LBS Convert from kilograms to pounds. â KM Convert from miles to kilometers. â MILE Convert from kilometers to miles. â DEG Convert from radians to degrees. â RAD Convert from degrees to radians. Hyperbolic trigonometry The hyperbolic trigonometry functions can also take complex numbers as arguments. ACOSH Inverse hyperbolic cosine : cosh â1 x . ACOSH ( value ) ASINH Inverse hyperbolic sine : sinh â1 x . ASINH ( value ) ATANH Inverse hyperbolic tangent : tanh â1 x . ATANH ( value ) hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
13-10 Using mathematical fun ctions COSH Hyperboli c cosine COSH ( val ue ) SINH Hyperbolic sine. SINH ( val ue ) TANH Hyperbolic tangent. TANH ( val ue ) ALOG Antilogarithm (exponential). Th is is more accurate than 10^x due to limitations of the power function. ALOG ( val ue ) EXP Natural exponential. This is more accurate than due to limitations of the power function. EXP ( val ue ) EXPM1 Exponent minus 1 : . This is more accurate than EXP when x is close to zero. EXPM1 ( valu e ) LNP1 Natural log plus 1 : ln( x 1 ). This is mo re accurate than the natural logarithm function when x is close to zero. LNP1 ( val ue ) List functions These functions work on list da ta. See âList functionsâ on page 19-6. Loop functions The loop functions display a result after evaluating an expression a given number of times. ITERATE Repeatedly for #times evaluates an expression in terms of variable . The value for variable is updated each time, starting with initialvalue. ITERATE( expr ession , vari ab le , initialv alue , #times ) Example ITERATE(X 2 ,X,2,3) r eturns 256 e x e x 1 â hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-11 RECURSE Prov ides a method of defining a sequence without using the Symbolic view of the Sequ ence aplet. If used with | (âwhereâ), RECURSE will step through the evaluation. RECURSE( sequencename , term n , term 1 , term 2 ) Example RECURSE(U,U(N-1)*N,1,2) U1(N) Stor es a factori al-calculating f unction named U1. When y ou enter U1(5) , for e xam ple, the f unction calculate s 5! ( 120 ). Σ Summation. Finds the sum of expression with respect to variable from initialvalue to finalvalue. Σ ( v ariable = initia lvalue , fi n alva l ue, expressio n ) Example Σ (C=1,5,C 2 ) re turns 5 5. Matrix functions These functions are for matr ix data stored in matrix variables. See âMatrix func tions and commandsâ on page 18-10. Polynomial functions Polynomials are products of constants ( coefficients ) and variables raised to powers ( terms ). POLYCOEF Polynomial coefficients. Returns the coefficients of the polynomial with the specified roots . POLYCOEF ([ roo t s ]) Example T o find the poly nomial w ith r oots 2 , â3, 4, â5: POLYCOEF([2,-3,4,-5]) r eturn s [1,2,-25, -26,120] , r epresenting x 4 2x 3 â25x 2 â26x 120 . POLYEVAL Polynomial evaluation. Evaluates a polynomial with the specified coefficients for the value of x . POLYEVAL([ coeff ic ients ] , val u e ) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
13-12 Using mathematical fun ctions Example For x 4 2x 3 â25x 2 â26x 120 : POLYEVAL([1,2,-25,-26,120],8) ret u r n s 3432 . POLYFORM Polynomi al form. Creates a polynomial in var iable1 from expression. POLYFORM ( expr ession , vari ab le 1 ) Example POLYFORM((X 1)^2 1,X) ret u r n s X^2 2*X 2 . POLYROOT Polynomial roots. Returns the roots for the n th-order polynomial with the specified n 1 coefficients . POLYROOT ([ coeff ic ients ]) Example For x 4 2x 3 â25x 2 â26x 120 : POLYROOT([1,2,-25,-26,120]) r etur ns [2,-3,4,-5] . HINT The results of POLYROOT will often not be easily seen in HOME due to the number of decimal plac es, especially if they are complex numbers. It is be tter to store the results of POLYROOT to a matrix. For example, POLYROOT([1,0,0,-8] M1 will store the three complex cube roots of 8 to matrix M1 as a complex vector. Then you can see them easily by going to the Matrix Catalog. and access them individually in calculations by referring to M1(1), M1(2) etc. Probability functions COMB Number of combinations (wi thout regard to order) of n things taken r at a time: n!/(r!(n-r)) . COMB (n, r) Example COMB(5,2) r eturns 10 . T hat is, ther e are ten differ ent wa ys that f i ve things can be combined tw o at a time .! hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-13 Factorial of a positive integer. For non-integers, ! = Î (x 1) . This calculates the gamma function. value! PERM Number of permutations (with regard to order) of n things taken r at a time: n!/(r!(n-r)! PERM ( n, r ) Example PERM(5,2) r eturns 20 . T hat is, there are 20 differ ent perm utations of f i ve things tak en two at a time . RANDOM Random number (between zero and 1). Produced by a pseudo-random number sequence. The algorithm used in the RANDOM function uses a seed number to begin its sequence. To ensure that two calculators must produce different results for the RANDOM function, use the RANDSEED function to seed different starting values before using RANDOM to produce the numbers. RANDOM HINT The setting of Time will be different for each calculator, so using RANDSEED(Time) is guar anteed to produce a set of numbers which are as close to random as possible. You can set the seed using the command RANDSEED. UTPC Upper-Tail Chi-Squared Probability given degrees of freedom, evaluated at value . Returns the probability that a Ï 2 random variable is greater than value. UTPC ( degr ees , va lu e ) UTPF Upper-Tail Snedecorâs F Probability given numerator degrees of freedom and denominator degrees of fre edom (of the F distribution), evaluated at value . Returns the probability that a Snedecor 's F random variable is greater than value. UTPF ( numerator , denominat or , val ue ) UTPN Upper-Tail Normal Probability gi ven mean and variance , evaluated at value. Returns the probability that a normal random variable is greater than value for a normal distribution. Note: The variance is the square of the standard deviation . UTPN ( mean, varia nc e, valu e) hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
13-14 Using mathematical fun ctions UTPT Upper-Tail Studentâs t-Probability given degrees of freedom, evaluated at value. Returns the probability that the Student's t- random variable is greater than va lue. UTPT ( degr ees , valu e ) Real-number functions Some real-number functions can also take complex arguments. CEILING Smallest integer greater than or equal to value . CEILING ( valu e) Examples CEILING(3.2) r eturns 4 CEILING(-3.2) r eturns -3 DEG â RAD Degrees to radians. Converts value from Degrees angle format to Radians angle format. DEG â RAD ( val ue ) Example DEG âRAD( 180) r eturns 3. 14159265359 , the val u e o f Ï . FLOOR Greatest integer less than or equal to value . FLOOR ( valu e ) Example FLOOR(-3.2) r eturns -4 FNROOT Function root-finder (like the Solve aplet). Finds the value for the given variable at which expression most nearly evaluates to zero. Uses guess as initial estimate. FNROOT ( e xpressi on, v ari able , guess ) Example FNROOT(M*9.8/600-1,M,1) r eturn s 61.2244897959 . FRAC Fractional part. FRAC ( val ue ) Example FRAC (23.2) r eturns .2 hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-15 HMS â Hou rs-minutes-seconds to deci mal. Converts a number or expression in H.MMSSs format (time or angle that can include fractions of a second) to x.x format (number of hours or degrees with a decimal fraction). HMS â ( H.MMSSs) Example HMS â (8.30) r eturns 8. 5 â HMS Decimal to hours-minutes-seconds. Converts a number or expression in x.x format (number of hours or degrees with a decimal fraction) to H.MMSSs format (time or angle up to fractions of a second). â HMS ( x.x) Example â HMS(8.5) r eturns 8. 3 INT Integer part. INT ( valu e ) Example INT(23.2) r eturns 23 MANT Mantissa (significant digits) of value . MANT ( valu e) Example MANT(21.2E34) r etur ns 2.12 MAX Maximum. The greater of two values. MAX ( valu e 1 , val ue 2) Example MAX(210,25) r eturns 210 MIN Minimum. The lesser of two values. MIN ( valu e 1 , val ue 2) Example MIN(210,25) ret u rn s 25 MOD Modulo. The remainder of value1 / value2. val u e1 MOD va lu e 2 hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
13-16 Using mathematical fun ctions Example 9 MOD 4 retur ns 1 % x percent of y ; that is, x /100*y . % ( x , y) Example % (20,50) r eturns 10 %CHANGE Percent change from x to y , th at is, 100( yâx )/ x . % CHANGE( x , y) Example % CHANGE(20,50) r eturns 150 %TOTAL Percent total : (100) y/ x . What percentage of x , is y . % TOTAL( x , y) Example % TOTAL(20,50) r eturns 250 RAD â DEG Radians to degrees. Converts va lue from radians to degrees. RAD â DEG ( val ue ) Example RAD âDEG( Ï) r eturns 180 ROUND Rounds value to decimal places . Accepts complex numbers. ROUND ( valu e , places) Round can also round to a number of significant digits as showed in example 2. Examples ROUND(7.8676,2) r eturns 7.87 ROUND (0.0036757,-3) r eturns 0.00368 SIGN Sign of value . If positive, the result is 1. If negative, â1. If zero, result is zero. For a c omplex number, this is the unit vector in the direction of the number. SIGN ( val ue ) SIGN (( x, y)) hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-17 Examples SIGN (â2) ret u rn s â1 SIGN((3,4)) r eturns (.6,.8) TRUNCATE Truncates value to decimal places . Accepts complex numbers. TRUNCATE ( valu e , places) Example TRUNCATE(2.3678,2) r eturns 2.36 XPON Exponent of value . XPON ( valu e) Example XPON(123.4) r eturns 2 Two-variable statistics These are functions for use with two-variable statistics. See âTwo-variableâ on page 10-15 . Symbolic functions The symbolic functions are used for symbolic manipulations of expression s. The variables can be formal or numeric, but the re sult is usually in symbolic form (not a number). You will find the symbo ls for the symbolic functions = and | ( where ) in the CHARS menu ( CHARS ) as well as the MATH menu. = ( equals ) Sets an equality for an equation. Th is is not a logical operator and does not store values. (See âTest functionsâ on page 13-19.) exp res s io n1 = expressi on2 ISOLATE Isola tes the firs t occurrence of variable in expression= 0 and returns a new expression, where variable=newexpression. The result is a general solution that represents multiple solutions by including the (formal) variables S1 to represent any sign a nd n1 to represent any integer. ISOLATE( expression , var iable ) hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
13-18 Using mathematical fun ctions Examples ISOLATE(2*X 8,X) r eturns -4 ISOLATE(A B*X/C,X) r eturns -(A* C/B) LINEAR? Tests whet her expression is linear for the specified variable . Returns 0 (false) or 1 (true). LINEAR?( expr ession , vari ab le ) Example LINEAR?((X^2-1)/(X 1),X) r etur ns 0 QUAD Solves quadratic expression= 0 for variable and returns a new expression, where variable = newexpression. The result is a general solution th at represents both positive and negative solutions by in cluding the formal variable S1 to represent any sign: or â . QUAD( exp re ss io n , variab le ) Example QUAD((X -1) 2 -7,X) r eturns (2 s1*(2* â 7))/2 QUOTE Encloses an expression that should not be evaluated numerically. QUOTE( exp res s io n ) Examples QUOTE(SIN(45)) F1(X) store s the expr ession S IN(4 5) rather than th e value of SIN( 45 ). Another method is to enc lose the e xpre ssion in single quotes. For exa m p l e, X^3 2*X F1(X) puts the expr ession X^3 2*X into F1( X) in the F unction aplet. | ( where ) Evaluates expression where each given variable is set to the given value . Defines numeric evaluation of a symbolic expression. expr ession |( variable1=v alue1, var iable2=v alue2 ,... ) Example 3*(X 1)|(X=3) r eturns 12 . hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-19 Test functions The test functions are logical operators that always return either a 1 ( true ) or a 0 ( false ). < Less than. Returns 1 if true, 0 if false. val u e1 < va lu e 2 ⤠Less than or equal to. Returns 1 if true, 0 if false. val u e1 ⤠va lu e 2 = = Equals (logical test). Returns 1 if true, 0 if false. val u e1 ==va lu e 2 â Not equal to. Returns 1 if true, 0 if false. val u e1 â va lu e 2 > Greater than. Returns 1 if true, 0 if false. val u e1 > val u e2 ⥠Greater than or equal to. Returns 1 if true, 0 if false. val u e1 ⥠va lu e 2 AND Compares value1 and value2 . Returns 1 if they are both non-zero, otherwise returns 0. val u e1 AND val u e2 IFTE If expression is true, do the trueclause ; if not, do the falseclause. IFTE( expr ession , truec laus e , f alsec lause ) Example IFTE(X>0,X 2 ,X 3 ) NOT Returns 1 if value is zero, otherwise return s 0. NOT valu e OR Returns 1 if either value1 or value2 is non-zero, o therwise returns 0. val u e1 OR val u e2 hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
13-20 Using mathematical fun ctions XOR Exclusive OR. Returns 1 if either value1 or value2 âbut not both of themâis non-zero, otherwise returns 0. val u e1 XOR val ue2 Trigonometry functions The trigonometry functions can also take complex numbers as arguments. For SIN, COS, TAN, ASIN, ACOS, and ATAN, see the Keyboard category. ACOT Arc cotangent. ACOT ( val ue ) ACSC Arc cosecant. ACSC ( val ue ) ASEC Arc secant. ASEC ( val ue ) COT Cotangent: cos x /sinx . COT ( val ue ) CSC Cosecant: 1/sin x CSC ( val ue ) SEC Secant: 1/cos x . SEC ( val ue ) Symbolic calculations Although CAS provides the richest environment for performing symbolic calculations, you can perform some symbolic calculations in HOME and with the Function aplet. CAS functions that yo u can perform in HOME (such as DERVX and INTVX) are discussed in âUsing CAS functions in HOMEâ on page 14-7. In HOME When you perform calculations that contain normal variables, t he calcula tor substitutes values for any variables. For e xample, if you e nter A B on the command line and press , the calculator retrieves the values for A and B from memory and substitutes them in the calculation. Using formal variables To perform symbolic calculations, for example symbo lic differentiations and integrations, you need to use formal hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-21 names. The HP 40gs has six formal names available for use in symbolic calculations. These are S1 to S5. When you perform a calculation that contains a formal name, the HP 40gs does not carry out any substitutions. You can mix formal names and real variables. Evaluating (A B S1) 2 will evaluate A B , but not S1 . If you need to evaluate an expression that contains formal names numerically, you use the | ( where ) command, listed in the Math menu un der the Symbolic category. For example to evaluate (S1*S2) 2 when S1=2 and S2=4 , you would enter the calculation as follows: (The | symbol is in the CHARS menu: press CHARS . The = sign is listed in the MATH menu under Symbolic functions.) Symbolic calculations in the Function aplet You can perform symbolic operations in the Functi on apletâs Symbolic view. For example, to find the derivative of a function in the Functi on apletâs Symbolic view, you define two functions and define the second function as a derivative of the first function. You then evaluate the second function. See âTo find derivatives in the Function apletâs Symbolic viewâ on page 13- 22 for an example. Finding derivatives The HP 40gs can perform symbolic differentiation on some functions. There are two ways of using the HP 40gs to find derivatives. ⢠Y ou can perfor m differ entiations in HO ME by using the fo rmal v aria bles, S1 t o S5 . ⢠Y ou can perfor m differ entiati ons of functi ons of X in the F unction aplet . To find derivatives in HOME To find the derivative of the function in HOME, use a formal variable in place of X. If you use X, the hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
13-22 Using mathematical fun ctions differentiation function substi tutes the value that X holds, and returns a numeric result. For example, consider the function: 1. Enter the differ entiati on functi on onto the command line , substituting S1 in place of X . S1 S1 2 S1 2 . Ev aluate the func tion. 3 . Sho w the re sult . To find derivatives in the Function apletâs Symbolic view To find the derivative of the fu nction in the Function apletâs Symbolic view, you define two functions and define the second function as a derivati ve of the first function. For example, to differentiate : 1. Access the F uncti on apletâs S ymbolic v ie w and define F1. 2 2. D e f i n e F 2 ( X ) as the deri vativ e of F(1). dx x ( 2 ) sin ( 2 x () ) cos x 2 () sin 2 x cos hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-23 F1 3. Se l e c t F 2 ( X ) and eval u a te i t. 4. Pres s to display the re sult . Note: Use the arr o w ke y s to vi ew the entir e functi on . | Y ou could a lso ju st def ine . To find the indefinite integral using formal variables F or ex ample, to find the indefinite integral of use: 1. Enter the f unction . 0 S1 3 X 5 X 2 . Sho w the r esult f ormat . 3 . Press to c lose the sho w w indo w . F 1 x () xx 2 () 2 x () co s sin () d = 3 x 2 5 â x d â« ( ) â« â X X S , 5 3 , 1 , 0 2 hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
13-24 Using mathematical fun ctions 4. Cop y the r esult and eva lu a te. Thu s, sub stituting X for S1, it can be seen that: This result is derived from substituting X =S 1 and X =0 into the original expression found in step 1. However, substituting X =0 will not always evaluate to zero and may result in an unwanted constant. To see this, consider: The âextraâ constant of 32/5 results from the substitution of into ( x â2 ) 5 /5 , and should be disregarded if an indefinite integral is required. Program constants and physical constants When y ou press , thr ee menus of f unctions and constants become av ailable: ⢠the math functi ons menu (w hic h appears b y def ault) ⢠the progr am constants men u, and ⢠the phy sical constants menu . The math functions menu is described extensively earlier in this chapter. 3 x 2 5 â x 5 x â3 x 3 3 ---- - X â â X () -------------- - ââ ââ ââ ââ ââ = d â« x 2 â () 4 x x ( 2 ) 5 â 5 ------------------- = d â« x 0 = hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-25 Program constants The program constants are numbers that have been assigned to various calculat or settings to enable you to test for or specify such a setting in a program. For example, the various displa y formats are assigned the following numbers: 1 Standar d 2 F ix ed 3 Scient ific 4 Engineering 5 Fraction 6 Mixed fraction In a program, you could store the co nstant number of a particular format into a var iable and then subsequently test for that particular format. To access the menu of program constants: 1. Pres s . 2. P r e s s . 3 . Use the ar r ow k e ys t o nav igate thr ough the options . 4. Click and then to di splay the number assigned to th e option you selected in the pre vi ous step. The use of program constants is illustr ated in more detail in âProgrammingâ on page 21-1 Physical constants There are 29 physical cons tantsâfrom the fields of chemistry, physics and quantum mechanicsâthat you can use in calculations. A list of all these constants can be found in âPhysical Co nstantsâ on page R- 16. To access the menu of physical constants: 1. Pres s . 2. P r e s s . hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
13-26 Using mathematical fun ctions 3 . Use the ar r ow k e y s to nav igate thr ough the opti ons. 4. T o see the sy mbol and v alue of a selec ted constant , pre ss . (Cli ck to c lose the inf ormati on w indow that appears .) The f ollo wing e xample sho ws the inf ormati on av ailabl e about the speed of light ( one of the phy sics constants). 5 . T o use the selected constant in a calculation, pr ess . The cons tant appears at the po sition of the cursor on the edit line. Example Suppose you want to know the potential energy of a mass of 5 units according to the equation . 1. Enter 5 2 . Pres s and then p r ess . E mc 2 = hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Using mathematical fun ctions 13-27 3. Se l e c t light s... fr om the Ph ysi cs menu . 4. Pr ess . T he menu clo ses and the v alue of the select ed constant is copied t o the edit line. 5 . Co mplete the equati on as y ou w ould nor mally and pre ss to get the r esult . hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-1 14 Computer Algebra S y stem (CAS) What is a CAS? A computer al gebra system ( hereafter C AS) enables y ou to perform symbolic calculations. With a CAS you manipulate mathematical equations and expressions in symbolic form, rather than manipulating approximations of the numerical quantities re presented by those symbols. In other words, a CAS works in exact mode , givi ng you infinite precision. On the other hand, non-CAS calculations, such as those performed in HOME view or by an aplet, are numerical calculations and are limited b y the precis ion of the ca lculator (to 10 â12 in the case of the HP 40gs) . For example, with Standard as your numerical format, 1/2 1/6 returns 0.666666666 6667 if you are working in the HOME screen; however , 1/2 1/6 returns 2/3 if you are working with CAS. HOME calculations are restricted to approximate (or numeric ) mode, while CAS calculations always work in exact mode (unless you specifica lly change the default CAS modes). Each mode has adva ntages and disadvantages. For example, in exact mode there is no rounding error, but some calculations will take much longer to complete and require more memory than equivalent calculations in numeric mode. Performing symbolic calculations You perform CAS calculations with a special tool known as the Equation Writer . Some computer algebra operations can also be done in the HOME screen, as long as you take certain precautions (see âUsing CAS functions in HOMEâ on page 14-7). Moreover , some computer algebra operations can only be done in the HOME screen; for example, symbolic linear algebra hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
14-2 Computer Algebra System (CAS) using vectors and matrices. (Vectors and matrices cannot be entered using the Equation Writer). To open the Equation Writer, press the soft- key on the menu bar of the HOME screen. The illustration at the right shows an expression being written in the Equation Writer. The soft keys on the menu bar provide access to CAS functions and commands. To leave the Equation Writer, press to return to the HOME screen. Note that expressions written in the Equation Writer (and the results of evaluating an expression) are not automati cally copied to the HOME history when you leave the Equation Writer. (You can, however, manually copy th em to HOME: see page 14-8). CAS functions are described in detail in âCAS functions in the Equation Writerâ on page 14-9. Chapter 15, âEquation Writerâ, explains in detail how to enter an expression in the Equation Wr iter and contains numerous worked examples of CAS in operation. An example To give you an idea of how CAS works, letâs consider a simple example. Suppose you want to convert C to the form where C is and d is a whole number. 1. Open the E quation W riter b y pres sing the soft- key on the HOME sc reen. 2. Enter the expression for C . [ Hint: use the k e ys on the k ey boar d as yo u wo uld if entering the ex pre ssion in HO ME . Pr ess the k ey tw ice t o select the entir e fir st ter m befo re e nter ing the second ter m .] d 5 â 24 5 2 0 â hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-3 3. P re s s a n d t o select j ust the 20 in the term . 4. Pres s the menu ke y and choose FACTOR . Then pr ess . Note that the FACTOR functi on is added to the sele cted t erm. 5. Press to factor the selected term. 6 . Pr ess to select the entire second term, and then press to simplify it. 7 . P r e s s to select the 45 in the first term. 8. As you did ear lier , press the menu k ey and choose FACTOR . Then pres s and to factor the selected term. 9 . Pr ess to select the entire second term, and then press to simplify it. 20 hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
14-4 Computer Algebra System (CAS) 10. Pres s three times to select the entire expression and then press to simplify it to the form required. CAS variables When you use the symbolic calculation functions, y ou are working with symbolic variab les (variables that do not contain a permanent value). In the HOME screen, a variable of this kind must have a name like S1â¦S5, s1â¦s5, n1â¦n5 , but not X, which is assigned to a real value. (By default, X is assigned to 0). To store symbolic expressions, you must use the variables E0, E1â¦E 9 . In the Equation Writer, all th e variables may, or may n ot be, assigned. For example, X is not assigned to a real value by default, so computing X X will return 2X . Moreover, Equation Writer variables can have lo ng names, like XY or ABC , unlike in HOME where implied multiplication is assumed. (For example ABC is interpreted as A à B à C in HOME. ) For these reasons, variables used in the Equation Writer cannot be used in HOME , and vice versa. Using the PUSH command, you can transfer expressions from the HOME screen history to CAS history (see page 14-8). Likewise, you can use the POP command to transfer expressions from CAS history to the HOME screen history (see page 14-8). The current variable In the Equation Writer, the current variable is the name of the symbolic variable contained in VX . It is almost always X . (The current vari able is always S1 in HOME .) Some CAS functions depend on a current variable; for example, the function DERVX calculates the derivative with respect to the current va riable. Hence in the Equation Writer, DERVX(2*X Y) returns 2 if VX = X , but 1 if VX = Y. However, in the HOME screen, DERVX(2*S1 S2) returns 2 , but DERIV(2*S1 S2,S2) returns 1. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-5 CAS modes The modes that determine how CAS operates can be set on CAS MODES scre en. To display CAS MODES screen, press: ·To navigate through the options in CAS MODES screen, press the arrow keys. To select or deselect a mode , navigate to the appropriate field and press until the co rrect setting is displayed (indicated by a check mark in the field). For some settings (such as INDEP VAR and MODULO ), you will need to press to be able to change the setting. Press to close CAS MODES screen. NOTE You can also set CAS modes from within the Equation Writer. See âConfiguration menusâ on page 15-3 for information. Selecting the independent variable Many of the functions provided by CAS use a pre- determined independent variab le. By default, that variable is the letter X (upper case) as shown in CAS MODES screen above. However, you can change this variable to any oth er letter, or combination of letters and numbers, by editing the INDEP VAR field in CAS MODES screen. To change the setting, press , enter a new value and then press . The variable VX in the calculator's {HOME CASDIR} directory takes, by de fault, th e value of 'X'. This is the name of the preferred independent variable for algebraic and calculus applications. If you use a nother independent variable name, some functions (for example, HOR NER) will not work properly. Selecting the modulus The MODULO option on CAS MODES screen lets you specify the modulo you want to use in modular arithmetic. The default value is 13. Approximate vs. Exact mode When the APPROX mode is selected, symbolic operations (for example, definite integrals, square roots, etc.), will be calculated numerically. When this mode is unselected, exact mode is active, hence symbol ic operations will be hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
14-6 Computer Algebra System (CAS) calculated as closed-form algebraic expressions, whenever possible. [Default: u nselected.] Num. Factor mode When the NUM FACTOR setting is selected, approximate roots are used when factoring . For example, is irreducible over the intege rs but has approximate roots over the reals. With NUM FACTOR set, the approximate roots are returned. [Default: unselected.] Complex vs. Real mode When COMPLEX is selected and an operation results in a complex number, the result will be shown in the form a bi or in the form of an ordered pair ( a ,b ). If COMPLEX mode is not selected and an operation results in a complex number, you will be asked to switch to COMPLEX mode. If you decline, the calculator will report an err or. [Default: unselected.] When in COMPLEX mode, CAS is able to perform a wider range of operations than in non-complex (or real) mode, but it will also be considerably slower. Thus, it is recommended that you donât select COMPLEX mode unless requested by the calculator in the perfor mance of a particular operation. Verbose vs. non- verbose mo de When VERBOSE is selected, certain calculus applications are provided with comment line s in the main display. The comment lines will appear in th e top lines of the display, but only while the operation is being calculated. [Default: unselected.] Step-by-step mode When STEP/STEP is selected, certain operations will be shown one step at a time in the display. You press to show each step in turn. [Default: selected.] Increasing-powers mode When INCR POW is selected, polynomials will be listed so that the terms will have increasing powers of the independent variable (which is the opposite to how polynomials are normally written). [Default: unselected.] Rigorous setting When RIGOROUS is selected, any algebraic expression of the form |X|, i.e., the absolute value of X, is not simplified to X. [Default: selected.] Simplify non- rational setting When SIMP NON-RATIONAL is selected, non-rati onal expressions will be automati cally simplified. [Default: selected.] x 5 5 x 1 hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-7 Using CAS functions in HOME You can use many computer algebra functions directly in the HOME screen, as long as you take certain precautions. CAS functions th at take matrices as an argument work only from HOME. CAS functions can be accessed by pressing when MATH menu is displayed. Yo u can also directly type a function name when you are in alpha mode. Note that certain calculations will be performed in approximate mode because numbers are interpr eted as reals instead of integers in HOME. To do exact calculations, you should use the XQ command. This command converts an approxi mate argument into an exact argument. For example, if Radians is your angle setting, then: ARG(XQ(1 i)) = Ï /4 but ARG(1 i) = 0.7853... Similarly: FACTOR(XQ(45)) = 3 2 à 5 but FACTOR(45) = 45 Note too that the symbolic HOME variable S1 serves as the current variable for CAS functions in HOME. For example: DERVX(S1 2 2 à S1) = 2 à S1 2 The result 2 à S1 2 does not depend on the Equation Writer variable, VX . Some CAS functions cannot wo rk in HOME because they require a change to the current variable. Remember that you must use S1,S2,â¦S5, s1,s2,â¦s5, and n1,n2,â¦n5 for symbolic variables and E0, E1,â¦E9 to store symbolic expressions. For example, if you type: S1 2 â 4 à S2 E1 then you get: DERVX(E1) = S1 à 2 DERIV(E1, S2) = â4 INTVX(E1) = 1/3 S1 3 â 4 à (S2 à S1) hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
14-8 Computer Algebra System (CAS) Symbolic matrices are stored as a list of lists and therefore must be stored in L0, L1â¦L 9 (whereas numeric matrices are stored in M0, M1,â¦M9). CAS linear algebra instructions accept lists of lists as input. For example, if you type in HOME: XQ({{S2 1, 1}, { , 1}}) L1 then you have: TRAN(L1) = {{S2 1, }, {1, 1}} Some numeric linear algebra commands do not direc tly work on a list of lists, but will do so after a conversion by AXL. For example, if you enter: DET(AXL(L1)) E1 you get: S2â(â1 ) Send expressions fr o m H O M E t o C A S history In the HOME screen, you can use the PUSH command to send expressions to CAS hist ory. For example, if you enter PUSH(S1 1), S1 1 is written to CAS history. Send expressions from CAS to HOME history In the HOME screen, you can use the POP command to retrieve the last expression written to CAS history. For example, if S1 1 is the last expression written to CAS history and you enter POP in the HOME screen, S1 1 is written to the HOME screen history (and S1 1 is removed from CAS history). Online Help When you are working with the Equation Writer, you can display online help about any CAS command. To display the contents of the online help, press 2. Press to navigate to the command you want help with and then press . You can also get CAS help from the HOME screen. Type 2 2 2 hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Computer Al gebra System ( CAS) 14-9 HELP and press . The menu of help topi cs appears. Each help topic includes the required syntax, along with real sample values. You can copy the syntax, with the sample values, to the HOME screen or to the Equation Writer, by pressing . TIP If you highlight a CAS command and then press 2, help about the highlighted command is di splayed. You can display the online help in Fr ench rather than English. For instructions, see âOnline Help languageâ on page 15-4. CAS functions in the Equation Writer You can display a menu of CAS functions in four ways: ⢠by displa y ing the MA TH menu fr om HOME and then pres sing , or ⢠opening the Eq uation W riter and pr essing , ⢠opening the E quatio n W r iter and selecting a f uncti on fr om a soft-ke y menu , or ⢠opening the Eq uation W riter and pr essing . You can also directly type the name of a CAS function when you are in ALPHA mode. Note that in this section, CAS functions available from the sot-key menus in the E quation W riter are described. CAS functions available from the MATH menu are described in âCAS Functions on the MATH menuâ on page 14-45. NOTE When using CAS, you should be aware that the required syntax will vary depending on whether you are applying the command to an expressio n or a function. All CAS commands are designed to work with expressions; that is, they take expressions as arguments. If you are going to use a functionâfor example, Fâyou need to specify an expression made from this function, such as F( x ), where x is the independent variable. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
14-10 Computer Alge bra System (CAS) For example, suppose you have stored the expression x 2 in G, and have defined the function F(x) as x 2 . Suppose now you want to calculate INTVX(X 2 ). You could: ⢠enter INTVX(X 2 ) direc tly , or ⢠enter INTVX(G) , or ⢠enter INTVX(F(X)) . Note that you can apply the command directly to an expression or to a variable that holds an expression (the first two cases above). But where you want to apply it to a defined function, you need to specify the full function name, F(X), as in the third case above. ALGB menu COLLECT Factors over the integers COLLECT combines like terms and factors the expression over the integers. Example To factor over the integers you would type: COLLECT(X 2 â4) which gives in real mode: Example To factor over the integers you would type: COLLECT(X 2 â2) which gives: DEF Define a func tion For its argument, DEF tak es an equality between: 1. the name of a func tion ( with par enthese s containing the var iable), and 2 . an expr ession def ining the functi on. DEF defines this function and returns the equality. x 2 4 â x 2 () x 2 â () â x 2 2 â x 2 2 â hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-11 Typing: DEF(U(N) = 2N 1) produces the result: U(N) = 2N 1 Typing: U(3) then returns: 7 Example Calculate the first six Fermat numbers F1...F6 and determine whether they are prime. So, you want to calculate: for k = 1...6 Typing the formula: gives a result of 17. You can then invoke the ISPRIME?() command, which is found in the MATH keyâs Integer menu. The response is 1, which m eans TRUE. Using the history (which you access by pressing the SYMB key), you put the expression into the Equation Writer with ECHO , and change it to: Or better, define a function F(K) by selecting DEF from the ALGB menu on the menu bar and type: The response is and F is no w listed among st the var iables ( whic h y ou can ver ify using the VARS ke y). For K=5 , you then type: F(5) Fk () 2 2 k 1 = 2 2 2 1 2 2 2 1 2 2 3 1 D E FFK () 2 2 k 1 = () 2 2 k 1 hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
14-12 Computer Alge bra System (CAS) which gives 4294967297 You can factor F(5) with FACTOR , which youâll find in the ALGB menu on the menu bar. Typing: FACTOR(F(5)) gives: 641·6700417 Typing: F(6) gives: 18446744073709551617 Using FACTOR to factor it, then yields: 274177·67280421310721 EXPAND Di stributivity EXPAND expands and simp lifies an expression. Example Typing: gives: FACTOR Factorization FACTOR factors an expression. Example To factor: type: FACTOR(X 4 1) FACTOR is located in the ALGB menu. XPAND X 2 2 X 1 â () X 2 2 X â 1 â ( ) â ( x 4 1 x 4 1 hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-13 In real mode, the result is: In complex mode (using CFG ), the result is: PARTFRAC Partial fraction expansion PARTFRAC has a rational fraction as an argument. PARTFRAC returns the partial fraction decomposition of this rational fraction. Example To perform a partial fraction decomposition of a rational function, such as: you use the PARTFRAC command. In real and direct mode, this produces: In complex mode, this produces: QUOTE Quoted expression QUOTE( expression ) is used to prevent an expression from being evaluated or simplified. Example 1 Typing: gives: â x 2 2 x â 1 () x 2 2 x â 1 â () â 1 16 ----- - 2 x 1 i () 2 â () 2 x 1 i () â2 â () 2 x 1 i â () 2 â () 2 x 1 i â () â2 â () â â â â x 5 2 â x 3 1 â x 4 2 â x 3 â 2 x 2 2 x 1 â () â â ------------------------------------------------------------------------ - x 2 x 3 â 2 x 2 â 2 --------------------- - 1 â 2 x â 2 â ------------------ - x 2 13 i â 4 ------------- - xi ------------- - 1 â 2 ----- - x 1 â ---------- - 13 i 4 ------------- - xi â ------------- - i m QUOTE 2 X 1 â () ( EXP ( 1 X -- - 1 ) â â X â = , â â â â hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
14-14 Computer Alge bra System (CAS) Example 2 Typing: SUBST(QUOTE(CONJ(Z)),Z=1 i) gives: CONJ(1 i) STORE Store an object in a variable STORE stores an object in a variable. STORE is found in the ALGB menu or the Equation Writer menu bar. Example Type: STORE(X 2 -4,ABC) or type: X 2 -4 then select it and call STORE , then type ABC, then press ENTER to confirm the definition of the variable ABC . To clear the variable, press VARS in the Equation Writer (then choose PURGE on the menu bar), or select UNASSIGN on the ALGB menu by typing, for example, UNASSIGN(ABC) | Substitute a value for a variable | is an infix operator used to substitute a value for a variable in an expression (similar to the function SUBST ). | has two parameters: an ex pression dependent o n a parameter, and an equality (parameter=substitute value). | substitutes the specified value for the variable in the expression. Typing: gives: X 2 1 â X 2 = 2 2 1 â hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-15 SUBST Substi tute a value for a variable SUBST has two parameters: an expression depe ndent on a parameter, and an equality (parameter=substitute value). SUBST substitutes the specifie d value for the variable in the expression. Typing: SUBST(A 2 1,A=2) gives: TEXPAND Develop in terms of sine and cosine TEXPAND has a trigonometric expression or transcendental function as an argument. TEXPAND develops this expression in terms of sin(x) and cos(x). Example Typing: TEXPAND(COS(X Y)) gives: Example Typing: TEXPAND(COS(3·X)) gives: UNASSIGN Clear a variable UNASSIGN is used to clear a variable, for example: UNASSIGN( ABC ) 2 2 1 y () cos x () cos y () x () sin â sin â â 4 x () 3 cos 3 â x () cos â â hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
14-16 Computer Alge bra System (CAS) DIFF menu DERIV Derivative and partial derivativ e DERIV has two arguments: an expression (or a functi on) and a variable. DERIV returns the derivative of the expression (or the function) with respect to th e variable given as the second parameter (used for calculating partial derivatives). Example Calculate: Typing: DERIV(X·Y 2 ·Z 3 X·Y,Z) gives: DERVX Derivative DERVX has one argument: an expression. DERVX calculates the derivative of the expression with respect to the variable stored in VX. For example, given: calculate the derivative of f . Type: Or, if you have stored the definition of f(x) in F, that is, if you have typed: then type: â xy 2 z 3 â â xy â () â z --------------------------------------------- - 3 xy 2 z 2 â â â fx () x x 2 1 â ------------- - x 1 x 1 â ----------- - ââ ââ ln = D ERVX X X 2 1 â -------------- - LN X 1 X 1 â ------------ - â â â â â â â â TORE X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ F , â â â â hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-17 DERVX(F) Or, if you have defined F(X) using DEF , that is, if you have typed: then type: DERVX(F(X)) Simplify the result to get: DIVPC Division in increasing order by exponent DIVPC has three ar guments: two polynomials A(X) and B(X) (where B(0) â 0), and a whole number n. DIVPC returns the quotient Q(X) of the division of A(X) by B(X), in increasing order by exponent, and with deg(Q) <= n or Q = 0. Q[X] is then the limite d nth-order expansion of: in the vicinity of X= 0. Typing: DIVPC(1 X 2 X 3 ,1 X 2 ,5) gives: NOTE: When the calculator displays a request to change to increasing powers mode, respond yes. FOURIER Fourier coefficients FOURIER has two parame ters: an expr ession f(x) and a whole number N . FOURIER returns the Fourier coefficient c N of f(x), considered to be a function defined over interval [0, T ] D EF(F(X) X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ â â = 3 x 2 1 â â x 4 2 â x 2 1 â -------------------------------- - â AX [] BX [] ----------- - 1 x 3 x 5 â hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
14-18 Computer Alge bra System (CAS) and with period T (T being equal to the contents of the variable PERIOD ). If f(x) is a discrete series, then: Example Determine the Fourier coefficients of a periodic function f with period 2 Ï and defined over interval [0, 2 Ï ] by f(x)=x 2 . Typing: STORE(2 Ï,PERIOD) FOURIER(X 2 ,N) The calculator does not know that N is a whole number, so you have to replace EXP(2 â iâ NâÏ ) with 1 and then simplify the expression. We get So if , then: Typing: FOURIER(X 2 ,0) gives: so if , then: IBP Partial integration IBP has two parameters: an expression of the form and . f x () c N e 2 iN x Ï T ------------- -- - N â â = â â = 2 iN Ï 2 â â â N 2 ---------------------------------- N 0 â c N 2 iN Ï 2 â â â N 2 --------------------------------- - = 4 Ï 2 â 3 ------------ - N 0 = c 0 4 Ï 2 â 3 ------------ - = ux () v ' x () â vx () hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-19 IBP returns the AND of and of that is, the terms that are calculated when performing a partial integration. It remains then to calculate the integral of the second term of the AND, then add it to the first term of the AND to obtain a primitive of . Typing: IBP(LN(X),X) gives: X·LN(X) AND - 1 The integration is completed by calling INTVX : INTVX(X·LN(X)AND - 1) which produces the result: X·LN(X) - X NOTE: If the first I BP (or INTVX) pa rameter is an AND of two elements, IBP concerns itself only with the second element of the AND, adding the integrated term to t he first element of the AND (so that you can perform multiple IBP in succession). INTVX Primitive and defined integral INTVX has one argument: an expression. INTVX calculates a primitive of its argument with respect to the variable stored in VX. Example Calculate a primitive of sin(x) à cos(x) . Typing: INTVX(SIN(X)·COS(X)) gives in step-by-step mode: COS(X)·SIN(X) Int[uâ âF(u)] with u=SIN(X) Pressing OK then sends the result to the Equation Writer: ux () vx () â v â x () u ' x () â ux () v ' x () â x () 2 sin 2 ----------------- - hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
14-20 Computer Alge bra System (CAS) Example Given: calculate a primitive of f . Type: Or, if you have stored f(x) in F, that is, if you have already typed: then type: INTVX(F) Or, if you have used DEF to define f( x), that is, if you have already typed: then type: INTVX(F(X)) The result in all cases is equivalent to: You will obtain absolute values only in Rigorous mode. (See âCAS modesâ on page 14-5 for instructions on setting and changing mode s.) Example Calculate: Typing: f x () x x 2 1 â ------------- - LN x 1 x 1 â ----------- - ââ ââ = N TVX X X 2 1 -------------- - LN X 1 X 1 â ------------ - ââ ââ â â â â TORE X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ F , â â â â D EF(F(X) X X 2 1 â -------------- - LN X 1 X 1 â ------------ - ââ ââ â â = X LN X 1 X 1 â ------------ - ââ ââ 3 2 -- - LN X 1 â () 3 2 -- - LN X 1 ( â â â 2 x 6 2 x 4 x 2 â ----------------------------------- x d â« hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-21 gives a primitive: Note You can also type which gives the primitive which is zero for x = 1 Example Calculate: Typing: gives the result: NOTE: If the argument to INTVX is the AND of two elements, INTVX concerns itself only with the se cond element of the AND, and adds the result to the first argument. lim Calculate limits LIMIT or lim has two arguments: an expression dependent on a variable, and an equality (a variable = the value to which you want to calculate the limit). You can omit the name of the variable and the sign =, when this name is in VX). It is often preferable to use a quoted expression: NTVX 2 X 6 2 X 4 X 2 â -------------------------------------- â â â â 3 â x () atan 2 x -- - x x 2 1 ------------- - â â â 2 X 6 2 X 4 X 2 â -------------------------------------- X d 1 X â« 3 â x () atan 2 x -- - x x 2 1 ------------- - 3 Ï 10 â 4 ---------------------- - ââ ââ â â â 1 x () sin 2 x â () sin ------------------------------------------- - x d â« N TVX 1 SIN X () SIN 2 X â () --------------------------------------------------- - â â â â 1 6 -- - LN X () cos 1 â () â 1 2 -- - LN X () cos 1 () â 2 â 3 ----- - LN 2 X () cos 1 () â hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
14-22 Computer Alge bra System (CAS) QUOTE(expression), to avoid rewriting the expression i n normal form (i.e., not to have a rational simplification of the arguments) during the execution of the LIMIT command. Example Typing: gives: â To find a right limit, for example, type: gives (if X is the current variable): â To find a left limit, for example, type: gives (if X is the current variable): â â It is not necessary to quote the second argument when it is written with =, for example: gives: â Example For n > 2 in the following expressio n, find the limit as x approaches 0: You can use the LIMIT command to do this. lim QUOTE 2 X 1 â () ( ( EXP 1 X 1 â ----------- - ââ ââ â â X â = ) , â lim 1 X 1 â ----------- - QUOTE 1 0 () , ââ ââ lim 1 X 1 â ----------- - QUOTE 1 0 â () , ââ ââ lim 1 X 1 â ----------- - X 10 = () , ââ ââ nx () tan nx â () tan â â nx â () sin nx () sin â â --------------------------------------------------- - hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-23 Typing: gives: 2 NOTE: To find the limit as x approaches a (resp a â ), the second argument is written: X=A 0(resp X=A-0) For the following expression, find the limi t as x approaches â : Typing: produces (after a short wait): NOTE: the symbol â is obtained by typing SHIFT 0. To obtain â â : (â) â To obtain â : (â)(â) â You can also find the symbol â in the MATH keyâs Constant menu. PREVAL Eva luate a primitive PREVAL has three parame ters: an expression F(VX) dependent on the variable contained in VX , an d two expressions A and B. For example, if VX contai ns X , and if F is a function, PREVAL (F(X),A,B) returns F(B)-F(A ) . lim NT A N X () TAN N X ) â ( â â SIN N X â () NS I N X () â â ---------------------------------------------------------------- - 0 , ââ ââ xxx x â lim XXX X â , â ââ ââ 1 2 -- - hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
14-24 Computer Alge bra System (CAS) PREVAL is used for calculatin g an integral defined from a primitive: it evaluates this pr imitive between the two limits of the integral. Typing: PREVAL(X 2 X,2,3) gives: 6 RISCH Primitive and defined integral RISCH has two parameters: an expression and the name of a variable. RISCH returns a primitive of the first parameter with respect to the variable spec ified in the second parameter. Typing: RISCH((2·X 2 1)·EXP(X 2 1),X) gives: X·EXP(X 2 1) NOTE: If the RISCH parameter is the AND of two elements, RISCH concerns itself only with the second element of the AND, and adds the result to the first argument. SERIES Limited n th-order expansion SERIES has three arguments: an expression de pendent on a variable, an equality (the variable x = the value a to which you want to calculate the expansion) and a whole number (the order n of the limited expan sion). You can omit the name of the variable and the = sign when this name is in VX ). SERIES returns the limited n th-order expansion of the expression in th e vicinity of x = a . ⢠Ex ampl e â Expansion in th e vicinit y of x=a Give a limited 4th-order expansion of cos(2 · x ) 2 in the vicinity of . For this you use the SERIES command. x Ï 6 -- - = hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-25 Typing: gives: ⢠Ex ampl e â Expansion in the vic inity of x= â or x=â â Example 1 Give a 5th-order expansion of arctan(x) in the vic inity of x = â , taking as infinitely small . Typing: SERIES(ATAN(X),X = â,5) gives: Example 2 Give a 2nd-order expan sion of in the vicinity of x = â, taking as infinitely small . gives: ⢠Unidirec tional expansion To perform an expansion in the vicinity of x = a where x > a, use a positive real (such as 4.0) for the order. To perform an expansion in the vicinity of x = a where x < a, use a negative real (such as â4.0) for the order. S ERIES COS 2 X â () 2 X Ï 6 -- - =4 ,, â â â â 1 4 -- - 3 h 2 h 2 83 3 --------- - h 3 8 3 -- - h 4 0 h 5 4 ---- - ââ ââ â â hX Ï 6 -- - â = â©| ⪠h 1 x -- - = Ï 2 -- - â â h h 3 3 ---- - h 5 5 ---- - 0 Ï h 6 â 2 ------------ - ââ ââ â â â â h 1 x -- - = 2 x 1 â () e 1 x 1 â ----------- h 1 x -- - = S ERIES 2 X 1 ) â ( ( EXP 1 X 1 â ----------- - ââ ââ X â 3 ) , = , â 12 6 h 12 h 2 17 h 3 6 h â ------------------------------------------------------ - 02 h 3 â () h 1 x -- - = hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
14-26 Computer Alge bra System (CAS) You must be in Rigorous (not Sloppy) mode to apply SERIES with unidirectional expansion. (See âCAS modesâ on page 14-5 for instructions on setting and c hanging modes. Example 1 Give a 3rd-order expansion of in the vicinity of x = 0 . Typing: gives: Example 2 Give a 3rd-order expansion of in the vicinity of x = 0 â . Typing: gives: Note that h = â x is positive as x â 0 â . Example 3 If you enter the order as an integer rather than a real, as in: you will get the following error: SERIES Error: Unable to find sign. Note that if you had been in Sloppy rather than Rigorous mode, all three examples above would h ave returned the same answer as you got when exploring in the vicinity of x = 0 : x 2 x 3 SERIES X 2 X 3 X 03 . 0 , = , () 1 16 ----- - h 4 â 1 â 8 ----- - h 3 â 1 2 -- - h 2 â h 0 h 5 () hx = () x 2 x 3 S ERIES X 2 X 3 X 03 . 0 â , = , ( ) 1 â 16 ----- - h 4 â 1 â 8 ----- - h 3 â 1 â 2 ----- - h 2 â h 0 h 5 () hx â = () SERIES X 2 X 3 X 03 , = , () hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-27 TABVAR Variation table TABVAR has as a parameter an expression wi th a rational derivative. TABVAR returns the variation table for the expression in terms of the current variable. Typing: TABVAR(3X 2 -8X-11) gives, in step-by-step mode: Variation table: The arrows indicate whether th e function is increasing or decreasing during the specifie d interval. This particular variation table indicates that the function F( x ) decreases for x in the interval [â â , ], reaching a mi nimum of at x = . It then increases in the interval [ , â ], reaching a maximum of â . Note that â?â appearing in the variation table indicates that the function is not defined in the correspo nding interval. TAYLOR0 Limited expansion in the vicinity of 0 TAYLOR0 has a single argument: the function of x to expand. It returns the functionâs limited 4th-relative-order expansion in the vicinity of x=0 (if x is the current variable). 1 16 ----- - h 4 â 1 â 8 ----- - h 3 â 1 2 -- - h 2 â h 0 h 5 () hx = () â â â â X â ââ â F F 3 x 2 â 8 x â â1 1 â () = F '3 2 x 8 â â â () = 23 x 4 â â () â () â 4 3 -- - 49 â 3 --------- - 4 3 -- - 49 â 3 --------- - 4 3 -- - 4 3 -- - hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
14-28 Computer Alge bra System (CAS) Typing: gives: Note âth-orderâ means that the numerator and the denomi nator are expanded to the 4th relative order (here, the 5th absolute order for the numerator, and fo r the denominator, which is given in the end, the 2nd order (5 â 3), seeing that the exponent of the denominator is 3). TRUNC Truncate at order n - 1 TRUNC enables you to truncate a p olynomial at a given order (used to perform limited expansions). TRUNC has two arguments: a polynomial and X n . TRUNC returns the polynomial truncated at order n â 1; that is, the returned polynomial has no terms with exponents ⥠n. Typing: gives: REWRI menu The REWRI menu contains functions that enable you to rewrite an expression in another form. DISTRIB Distributivity of multiplication DISTRIB enables you to apply the distributivity of multiplication in respect to addition in a single instance. DISTRIB enables you, when you apply it several times, to carry out the distributivity step by step. TAYLOR0 TAN P X â () SIN P X â () â TAN Q X â () SIN Q X â () â - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ââ ââ P 3 Q 3 - ----- P 5 Q 2 â P 3 â 4 Q 3 â ---------------------------- - x 2 â TRUNC 1 X 1 2 - X 2 â ââ ââ 3 X 4 , ââ ââ 4 x 3 9 2 -- - x 2 3 x 1 hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-29 Typing: DISTRIB((X 1)·(X 2)·(X 3)) giv es: EPSX0 Disregard small values EPSX0 has as a parameter an ex pres sion in X, and returns the same expression with the values less than EPS replaced by zeroes. Typing: EPSX0(0.001 X) gives, if EPS=0.01: 0 x or, if EPS=0.0001: . 001 x EXPLN Transform a trigonometric expression into complex exponentials EXPLN takes as an argument a trigonometric expression. It transforms the trigonometric function into exponentials and logarithms without linearizing it. EXPLN puts the calculat or into complex mode. Typing: EXPLN(SIN(X)) gives: EXP2POW Transform exp(n â ln(x)) as a power of x EXP2POW transforms an expression of the form exp(n à ln(x)), rewr iting it as a power of x. xx 2 () x 3 () â â 1 x 2 () x 3 () â â ix â () exp 1 ix â () exp ---------------------- - â 2 i â - -------------------------------------------------- - hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
14-30 Computer Alge bra System (CAS) Typing: EXP2POW(EXP(N · LN(X))) gives: FDISTRIB Distributivity FDISTRIB has an expression as argument. FDISTRIB enables you to appl y the distributivity of multiplication with respec t to addition all at once. Typing: FDISTRIB((X 1)·(X 2)·(X 3)) gives: x·x·x 3·x·x x·2·x 3·2·x x·x·1 3·x·1 x·2·1 3·2·1 After simplification (by pressing ENTER): x 3 6·x 2 11·x 6 LIN Linearize the expon entials LIN has as an argument an expression containing exponentials and trigonometric functions. LIN does not linearize trigonometric expressions (as does TLIN) but converts a trigonometric expression to ex ponentials and then linearizes the complex exponenti als. LIN puts the calculator into complex mode when dealing with trigonometric functions. Example 1 Typing: LIN((EXP(X) 1) 3 ) gives: 3·exp(x) 1 3·ex p(2·x) exp(3·x) Example 2 Typing: LIN(COS(X) 2 ) gives: x n hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-31 Example 3 Typing: LIN(SIN(X)) gives: LNCOLLECT Regroup the logarithms LNCOLLECT has as an argument an expression containing logarithms. LNCOLLECT regroups the terms in the logarithms. It is therefore preferable to use an expression that has already been factored (using FACTOR ). Typing: LNCOLLECT(LN(X 1) LN(X-1)) gives: ln((x 1)(x â 1)) POWEXPAND Transform a power POWEXPAND writes a power in the form of a product. Typing: POWEXPAND((X 1) 3 ) gives: (x 1) · (x 1) · (x 1) Th i s a ll o w s y o u to d o t h e development of (x 1) 3 in step by step, using DISTRIB several times on the preceding result. SINCOS Transform the complex expone ntials into sin and cos SINCOS takes as an argument an expression containing complex exponentials. SINCOS then rewrites this ex pression in terms of sin(x) and cos(x). 1 4 -- - 2 ix â â () â () exp â 1 2 -- - 1 4 -- - 2 ix â â () exp â i 2 -- - ix â exp â i 2 -- - ix â () â () exp â â hp40g .book Page 31 Friday, December 9, 2005 1:03 AM
14-32 Computer Alge bra System (CAS) Typing: SINCOS(EXP(i·X)) gives after turning on complex mode, if necessary: cos(x) i · sin(x) SIMPLIFY Simplify SIMPLIFY simplifies an expression automatically. Typing: gives, after simplification: 4 · cos(x) 2 â 2 XNUM Evaluation of reals XNUM has an expression as a parameter. XNUM puts the calculator into approxima te mode and returns the n umeric value of the expres sion. Typing: XNUM( â2) gives: 1.414 213 5 6 2 3 7 XQ Rational approximation XQ has a real numeric expression as a parameter. XQ puts the calculator into exact mode and gives a rational or real approximation of the expression. Typing: XQ(1.41421) gives: SIMPLIFY SIN 3 X â () SIN 7 X â () SIN 5 X â () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ââ ââ 66441 46981 -------------- - hp40g .book Page 32 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-33 Typing: XQ(1.414213562) gives: â 2 SOLV menu The SOLV menu contains functions that enable you to solve equations, linear systems, and differential equations. DESOLVE Solve differential equations DESOLVE enables you to solve differential equations. (For linear differential equations ha ving constant coefficients, it is better to use LDEC.) DESOLVE has two arguments: 1. the differential equation wher e is written as d1Y(X) (or the differenti al equation and the initial conditions sepa rated by AND ) , 2 . the unkno w n Y(X) . The mode must be set to real. Example 1 Solve: yâ y = cos(x) y (0)=c 0 yâ(0) = c 1 Typing: DESOLVE(d1d1Y(X) Y(X) = COS(X),Y(X) ) gives: cC0 and cC1 are integration constants (y(0) = cC0 yâ(0) = cC1). You can then assign values to the constants usin g the SUBST command. y ' YX () cC 0 x () cos â x 2 cC 1 â 2 -------------------------- x () sin â = hp40g .book Page 33 Friday, December 9, 2005 1:03 AM
14-34 Computer Alge bra System (CAS) To produce the solutions for y(0) = 1, type: which gives: Example 2 Solve: yâ y = cos(x) y(0) = 1 yâ(0) = 1 It is possible to solve for the constants from the outset. Typing: DESOLVE((d1d1Y(X) Y(X)=COS(X)) AND (Y(0)=1) AND (d1Y(0)=1),Y(X)) gives: ISOLATE The zeros of an expression ISOLATE returns the values that are the zeros of an expression or an equation. ISOLATE has two parameters: an expression or equation, and the name of the variable to isolate (i gnoring REALASSUME). Typing: ISOLATE(X 4 -1=3,X) gives in real mode: (x = â 2) OR (x = ââ 2) and in complex mode: (x = â 2 · i) OR (x = ââ 2) OR (x = â (â2 · i)) OR (x = â 2) S UBST Y X () ( c C0 COS X () â X2 c C 1 â 2 - - - - - - - - - - - - - - - - SIN X () cC0 , â 1 ) = = yx () 2 x () cos â x 2 cC1 â () x () sin â 2 ------------------------------------------------------------------------ --------- - = Yx () x cos 2 x 2 ----------- - x () sin â = hp40g .book Page 34 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-35 LDEC Linear diffe rential equations having constant coefficients LDEC enables you to directly solve linear differential equations having cons tant coefficients. The parameters are the second member and the characteristic equation. Solve: yâ â 6 · yâ 9 · y = x · e 3·x Typing: LDEC(X·EXP(3·X),X 2 â 6·X 9) gives: cC0 and cC1 are integration constants (y(0) = cC0 and yâ(0) = cC1). LINSOLVE Solve linear system LINSOLVE enables you to solve a system of linear equations. It is assumed that the variou s equations are of the form expression = 0. LINSOLVE has two arguments: the first members of the various equations separated by AND, and the names of the various variables separated by AND. Example 1 Typing: LINSOLVE(X Y 3 AND X-Y 1, X AND Y) gives: ( x = â 2) AND (y = â 1) or, in Step-by-step mode (CFG, etc.): L2=L2 â L1 ENTER - 18 x 6 â â () cC 06 xc C 1 â â x 3 () â â 6 ------------------------------------------------------------------------------- --------- - 3 x â () exp â ââ ââ 113 11 â 1 hp40g .book Page 35 Friday, December 9, 2005 1:03 AM
14-36 Computer Alge bra System (CAS) L1=2L1 L2 ENTER Reduction Result then press ENTER. The following is then written to the Equation Writer: (x = â 2) AND (y = â 1) Example 2 Type: (2·X Y Z=1)AND(X Y 2·Z=1)AND(X 2·Y Z=4) Then, invoke LINSOLVE and type the unknowns: X AND Y AND Z and press the ENTER key. The following result is produced if you are in Step-by-step mode (CFG, etc.): L2=2L2 â L1 ENTER L3=2L3 â L1 and so on until, finally: Reduction Result 11 3 02 â 2 â 20 4 02 â 2 â 211 1 â 112 1 â 121 4 â 211 1 â 013 1 â 121 4 â 80 0 4 08 0 2 0 â 00 8 â4 â hp40g .book Page 36 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-37 then press ENTER. The following is then written to the Equation Writer: SOLVE Solve equations SOLVE has as two parameters: (1) either an equality between two expressions, or a single expression (in which case = 0 is implied), and (2) the name of a variable. SOLVE solves the equation in R in real mode and in C in complex mode (ignoring REALASSUME). Typing: SOLVE(X 4 -1=3,X) gives, in real mode: (x = ââ 2) OR (x = â 2) or, in complex mode: (x = ââ 2) OR (x = â2) OR (x = â i · â 2) OR (x = i â 2) Solve systems SOLVE also enables you to solve a system of non-linear equations, if they are polynomials. (If they are not polynomials, use MSOLV in the HOME screen to get a numerical solution.) It is assumed that the variou s equations are of the form expression = 0. SOLVE has as arguments, the first members of the various equations separated by AND, and the names of the various variables separated by AN D. Typing: SOLVE(X 2 Y 2 -3 AND X-Y 2 1,X AND Y) gives: (x = 1) AND (y = ââ 2) OR (x = 1) AND (y = â 2) x 1 2 -- - â = ââ ââ AND y 5 2 -- - = ââ ââ AND z 1 2 -- - â = ââ ââ hp40g .book Page 37 Friday, December 9, 2005 1:03 AM
14-38 Computer Alge bra System (CAS) SOLVEVX Solve equations SOLVEVX has as a parameter either: (1) an equality between two expressions in the variable contained in VX, or (2) a single such expression (in which case = 0 is implied). SOLVEVX solves the equation. Example 1 Typing: SOLVEVX(X 4 -1=3) gives, in real mode: (x = ââ 2) OR (x = â 2) or, in complex mode, even if you have chosen X as real: (x = ââ 2) OR (x = â2) OR (x = â i · â 2) OR (x = i â 2) Example 2 Typing: SOLVEVX(2X 2 X) gives, in real mode: (x = â1/ 2) OR (x = 0) TRIG menu The TRIG menu contains functions that enable you to transform trigonometric expressions. ACOS2S Tra nsform the arccos into arcsin ACOS2S has as a trigonometric expression as an argument. ACOS2S transforms the expression by replacing arccos(x) with â arcsin(x). Ï 2 -- - hp40g .book Page 38 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-39 Typing: ACOS2S(ACOS(X) ASIN(X)) gives, when simplified: ASIN2C Transform the arcsin into arccos ASIN2C has as a trigonometric expression as an argument. ASIN2C transforms the express ion by re placing arcsin (x) with â arcco s(x) . Typing: ASIN2C(ACOS(X) ASIN(X)) gives, when simplified: ASIN2T Transform the arccos into arctan ASIN2T has a trigonometric expression as an argument. ASIN2T transforms the expression by replacing arcsin(x) with Typing: ASIN2T(ASIN(X)) gives: ATAN2S Transform the arctan into arcsin ATAN2S has a trigonometric expression as an argument. ATAN2S transforms the expression by replacing arctan(x) with . Ï 2 -- - Ï 2 ----- Ï 2 ----- arc x 1 x 2 â ----------------- - ââ ââ ââ tan x 1 x 2 â ----------------- - ââ ââ ââ atan arc x 1 x 2 ----------------- - ââ ââ ââ sin hp40g .book Page 39 Friday, December 9, 2005 1:03 AM
14-40 Computer Alge bra System (CAS) Typing: ATAN2S(ATAN(X)) gives: HALFTAN Transform in terms of tan(x/2) HALFTAN has a trigonometric expression as an argument. HALFTAN transforms sin(x), cos(x) and tan(x) in the expression, rewriting them in terms of tan(x/2). Typing: HALFTAN(SIN(X) 2 COS(X) 2 ) gives (SQ(X) = X 2 ): or, after simplification: 1 SINCOS Transform the complex expone ntials into sin and cos SINCOS takes an express ion containing complex exponentials as an argument. SINCOS then rewrites th is ex pression in terms of sin(x) and cos(x). Typing: SINCOS(EXP(i · X)) gives after turning on complex mode, if necessary: cos(x) i · sin(x) TAN2CS2 Transform tan(x) with sin(2x) and cos(2x) TAN2CS2 has a trigonometric expression as an argument. x x 2 1 ----------------- - ââ ââ ââ asin 2 x 2 -- - ââ ââ tan â SQ x 2 -- - ââ ââ tan ââ ââ 1 -------------------------------------- - ââ ââ ââ ââ ââ 2 1 SQ x 2 -- - ââ ââ tan ââ ââ â SQ x 2 -- - ââ ââ tan ââ ââ 1 -------------------------------------- - ââ ââ ââ ââ ââ 2 hp40g .book Page 40 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-41 TAN2CS2 transforms this expr ession by replacing tan(x) with . Typing: TAN2CS2(TAN(X)) gives: TAN2SC Replace tan(x) with sin(x)/cos(x) TAN2SC has a trigonometric expression as an argument. TAN2SC transforms this expr ession by replacing tan(x) with . Typing: TAN2SC(TAN(X)) gives: TAN2SC2 Transform tan(x) with sin(2x) and cos(2x) TAN2SC2 has a trigonometric expression as an argument. TAN2SC2 transforms this expression by replacing tan(x) with Typing: TAN2SC2(TAN(X)) gives: TCOLLECT Reconstruct the sine and the cosine of the same angle TCOLLECT has a trigonometric expression as an argument. 12 x â () cos â 2 x â () sin -------------------------------- 12 x â () cos â 2 x â () sin -------------------------------- x () sin x () cos --------------- - x () s i n x () cos --------------- - 2 x â () sin 12 x â () cos -------------------------------- - 2 x â () sin 12 x â () cos -------------------------------- - hp40g .book Page 41 Friday, December 9, 2005 1:03 AM
14-42 Computer Alge bra System (CAS) TCOLLECT linearizes this ex pression in terms of sin( n x ) and cos( n x ), then (in Real mode) reconstructs the sine and cosine of the same angle. Typing: TCOLLECT(SIN(X) COS(X)) gives: TEXPAND Develop transcen dental expressions TEXPAND has as an argument a transcendental expression (that is, an expression with trigonometric, exponential or logarithmic functions). TEXPAND develops this expression in terms of sin(x), cos(x), exp(x) or ln(x). Example 1 Typing: TEXPAND(EXP(X Y)) gives: ex p(x)·exp(y ) Example 2 Typing: TEXPAND(LN(X·Y)) gives: ln(y) ln(x) Example 3 Typing: TEXPAND(COS(X Y)) gives: cos(y)·cos(x)âsin(y)·sin(x) Example 4 Typing: TEXPAND(COS(3·X)) 2 x Ï 4 -- - â ââ ââ cos â hp40g .book Page 42 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-43 gives: 4·cos(x) 3 â3·cos(x) TLIN Linea rize a trigonomet ric expression TLIN has as an argument a trigonometric expression. TLIN linearizes this expression in terms of sin( n x ) and cos( n x ). Example 1 Typing: TLIN(COS(X) · COS(Y)) gives: Example 2 Typing: TLIN(COS(X) 3 ) gives: Example 3 Typing: TLIN(4·COS(X) 2 -2) gives: TRIG Simplify using sin(x) 2 cos(x) 2 = 1 TRIG has as an argument a trigonometric expression. TRIG simplifies this expression using the identity sin(x) 2 c o s ( x ) 2 = 1. 1 2 -- - xy â () cos â 1 2 -- - xy () cos â 1 4 -- - 3 x â () cos â 3 4 -- - x () cos â 22 x â () cos â hp40g .book Page 43 Friday, December 9, 2005 1:03 AM
14-44 Computer Alge bra System (CAS) Typing: TRIG(SIN(X) 2 COS(X) 2 1) gives: 2 TRIGCOS Simplify using the cosines TRIGCOS has as an argument a trigonometric expression. TRIGCOS simplifies this expression, using the identity sin(x) 2 cos(x) 2 = 1 to rewrite it in terms of cosines. Typing: TRIGCOS(SIN(X) 4 COS(X) 2 1) gives: TRIGSIN Simplify using the sines TRIGSIN has as an argument a trigonometric expression. TRIGSIN simpl ifies this ex pression, using the identity sin(x) 2 c o s ( x ) 2 = 1 to rewrite it in terms of sines. Typing: TRIGSIN(SIN(X) 4 COS(X) 2 1) gives: TRIGTAN Simplify using the tan gents TRIGTAN has as an argument a trigonometric expression. TRIGTAN simplifies this expression, using the identity sin(x) 2 c o s ( x ) 2 = 1 to rewrite it in terms of tangents. Typing: TRIGTAN(SIN(X) 4 COS(X) 2 1) gives: x () 4 cos x () 2 cos 2 â x () 4 sin x () 2 sin 2 â 2 x () 4 tan â 3 x () 2 tan â 2 x () 4 tan 2 x () 2 tan 1 â ------------------------------------------------------------------ - hp40g .book Page 44 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-45 CAS Functions on the MATH menu When you are in the Equation Writer and press , a menu of additional CAS functions available to you is displayed. Many of the functions in this menu match the functions available from the soft-key men us in the Equation Writer; but there are other functions that are only available from this menu. This section desc ribes CAS functions that are available when you press in the Equation Writer (grouped by main menu name). Algebra menu All the functions on this menu are also available on the menu in the Equation Writer. See âALGB menuâ on page 14-10 for a description of these functions. Complex menu i I nserts i (= ). ABS Determines the absolute value of the argument. Example Typing ABS(7 4i) yields , as does ABS(7 â 4i). ARG See âARGâ on page 13-7. CONJ See âCONJâ on page 13-7. DROITE DROITE returns the equation of the line through the Cartesian points, z 1 , z 2 . It takes two complex numbers, z 1 and z 2 , as arguments. Example Typing: DROI TE((1, 2) , (0, 1)) or: DROI TE(1 2·i, i) 1 â 65 hp40g .book Page 45 Friday, December 9, 2005 1:03 AM
14-46 Computer Alge bra System (CAS) returns: Y = X â1 2 Pressing simplifies this to: Y = X 1 IM See âIMâ on pag e 13-7. â Specifies the negation of the argument. RE See âREâ on page 13-8. SIGN Determines the quotient of the argument divided by its modulus. Example Typing SIGN(7 4i) or SIGN(7,4) yields . Constant menu e, i, Ï See âConstantsâ on page 13-8. â Enters the sign for infinity. Diff & Int menu All the functions on this menu are also available on the menu in the Equation Writer. See âDIFF menuâ on page 14-16 for a description of these functions. Hyperb menu All the functions on this menu are described i n âHyperbolic trigonometryâ on page 13-9. Integer menu Note that many integer functions also work with Gaussian integers ( a b i where a and b are integers). 74 i 65 ------------- - hp40g .book Page 46 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-47 DIVIS Gives the divisors of an integer. Example Typing: DIVIS(12) gives: 12 OR 6 OR 3 OR 4 OR 2 OR 1 Note: DIVIS(0) returns 0 OR 1. EULER Returns the Euler index of a whole number. The Euler index of n is the number of whole numbers less than n that are prime with n . Example Typing: EUL E R (2 1 ) gives: 12 Explanation: {2,4,5,7,8,10,11,13,1 5,16,17,19} is the set of who le numbers le ss than 21 and prim e with 21. There are 12 members of the set, so the Euler index is12. FACTOR Decomposes an integer into its prime factors. Example Typing: FA C T O R ( 9 0 ) gives: 2·3 2 ·5 GCD Returns the greatest common divisor of two integers. Example Typing: GCD(18, 15 ) gives: 3 hp40g .book Page 47 Friday, December 9, 2005 1:03 AM
14-48 Computer Alge bra System (CAS) In step-by-step mode, there ar e a number of intermediate results: 18 mod 15 = 3 15 mod 3 = 0 Res ul t : 3 Pressing or then causes 3 to be written to the Equation Writer. Note that the last non-zero remainder in the sequence of remainders shown in the intermediate steps is the GCD. IDIV2 Returns the quotient and the remainder of the Euclidean division between two integers. Example Typing: I D IV 2 ( 1 48, 5) gives: 29 A N D 3 In step-by-step mode, the calculator shows the division process in longhand. IEGCD Returns the value of Bézoutâs I dentity for two integers. For example, IEGCD(A,B) returns U AND V = D, with U, V, D such that AU BV=D and D=GC D(A,B). Example Typing: I EGC D (48, 3 0 ) gives 2 AND â3 = 6 In other words: 2·48 (â3)·30 = 6 an d GCD(48,30) = 6. In step-by-step mode, we get: [z ,u ,v]:z=u*48 v*30 hp40g .book Page 48 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-49 [48, 1 ,0 ] [30, 0,1]*â1 [18,1,â1]*â1 [12 ,â1 ,2]*â1 [6,2 ,â3]*â2 Re sult: [6,2 ,â3] Pressing or then causes 2 AND â3 = 6 to be written to the Equation Writer. The intermediate steps shown are the combination of lines. For example, to get line L( n 2), take L( n ) â q *L( n 1) where q is the Euclidean quotient of the integers at the beginning of the vector, these integers being the sequence of remainders). IQUOT Returns the integer quotient of the Euclidean division of two integers. Example Typing: IQUO T(14 8, 5 ) gives: 29 In step-by-s tep mode, the division is carried out as if in longhand Pressing or then causes 2 9 to be written to the Equation Writer. IREMAINDER Returns the integer remainder from the Euclidean division of two integers. Example 1 Typing: IREMAINDER(148 , 5) gives: 3 hp40g .book Page 49 Friday, December 9, 2005 1:03 AM
14-50 Computer Alge bra System (CAS) IREMAINDER works with integers and with Gaussian integers. This is what distingui shes it from MOD. Example 2 Typing: IREMAINDER(2 3·i, 1 i) gives: i ISPRIME? Returns a value indicating whether an integer is a prime number. ISPRIME?( n ) returns 1 (TRUE) if n is a prime or pseudo-prime, and 0 (FALSE) if n is not prime. Definition: For numbers less than 10 14 , pseudo-prime and prime mean the same thing. Fo r numbers greater than 10 14 , a pseudo-prime is a number with a large probability of being prime. Example 1 Typing: ISPRIME?(13) gives: 1. Example 2 Typing: ISPRIME?(14) gives: 0. LCM Returns the least common multiple of two integers. Example Typing: L CM(18 , 15) gives: 90 MOD See âMODâ on page 13 -15. hp40g .book Page 50 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-51 NEXTPRIME NEXTPRI ME( n ) returns the smallest prime or pseudo-prime greater than n . Example Typing: NEXTPRIME( 7 5) gives: 79 PREVPRIME PREVPRIME( n ) returns the greatest prime or pseudo-prime less than n . Example Typing: PRE VP RI ME (7 5) gives: 73 Modular menu All the examples of this section assume that p =13; that is, you have entere d MODSTO(13) or STORE(13,MODULO), or have specified 13 for Modulo in CAS MODES screen (as explained on page 15-16). ADDTMOD Performs an addition in Z/pZ. Example 1 Typing: ADDTMOD( 2 , 18) gives: â6 ADDTMOD can also perform addition in Z/pZ[X]. Example 2 Typing: ADD TMOD(11X 5, 8X 6) gives: 6 x 2 â hp40g .book Page 51 Friday, December 9, 2005 1:03 AM
14-52 Computer Alge bra System (CAS) DIVMOD Division in Z/pZ or Z/pZ[X]. Example 1 In Z/pZ, the arguments are two integers: A and B. When B has an inverse in Z/pZ, the result is A/B simplified as Z/pZ. Typing: DIVM OD(5 , 3) gives: 6 Example 2 In Z/pZ[X], the arguments are two polynomials: A[X] and B[X]. The result is a rational fraction A[X]/B[X] simplified as Z/pZ[X]. Typing: DIV MOD( 2X 2 5, 5X 2 2X â3) gives: EXPANDMOD Expand and simplify expre ssions in Z/pZ or Z/pZ[X]. Example 1 In Z/pZ, the argument is an integer expression. Typing: EXP ANDMOD( 2 · 3 5 · 4) gives: 0 Example 2 In Z/pZ[X], the argument is a polynomial. Typing: EXP ANDMOD ((2X 2 12)·(5X â 4)) gives: 4 x 5 3 x 3 -------------- - â 3 x 3 â 5 x 2 â â5 x â 4 â () â hp40g .book Page 52 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-53 FACTORMOD Factors a polynomial i n Z/pZ[X], providing that p ⤠97, p is prime and the order of the multiple factors is less than the modu lo. Example Typing: FA C T O R M O D ( â ( 3 X 3 â 5X 2 5X â 4)) gives: GCDMOD Calculates the GCD of the two polynomials in Z/pZ[X]. Example Typing: GCDMOD(2X 2 5, 5X 2 2X â 3) gives: INVMOD Calculates the inverse of an integer in Z/pZ. Example Typing: INVMOD(5) gives: â5 since 5 · â5 = â25 = 1 (mod 13). MODSTO Sets the value of the M ODULO variabl e p . Example Typing: MODS T O(11) sets the value of p to 11. 3 x 5 â () x 2 6 () â () â 6 x 1 â () â hp40g .book Page 53 Friday, December 9, 2005 1:03 AM
14-54 Computer Alge bra System (CAS) MULTMOD Performs a multiplication in Z/pZ or in Z/pZ[ X]. Example 1 Typing: MUL TMO D(11, 8) gives: â3 Example 2 Typing: MUL TMOD(11X 5, 8X 6) gives: POWMOD Calculates A to the power of N in Z/pZ[X], and A(X) to the power of N in Z/pZ[X]. Example 1 If p = 13, typing: POWMO D (1 1 , 1 95) gives: 5 In effect: 11 12 = 1 mod 13, so 11 195 = 11 16Ã12 3 = 5 mod 13. Example 2 Typing: POWMO D (2 X 1 , 5) gives: since 32 = 6 (mod 13), 80 = 2 (mod 13), 40 = 1 (mod 13), 10 = â3 (mod 13). 3 x 2 2 x â4 â () â 6 x 5 2 x 4 2 x 3 x 2 3 x â1 hp40g .book Page 54 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-55 SUBTMOD Performs a subtraction in Z/pZ or Z/pZ[X]. Example 1 Typing: SU BTM O D ( 29 , 8 ) gives: â5 Example 2 Typing: S UB TMOD(11X 5, 8X 6) gives: Polynomial menu EGCD Returns Bézoutâs Identity, the Extended Greatest Common Divisor (EGCD). EGCD(A(X), B(X)) returns U(X) AND V(X) = D(X), with D, U, V such that D(X) = U(X)·A(X) V(X)·B(X). Example 1 Typing: EG C D ( X 2 2 · X 1, X 2 â 1) gives: AND Example 2 Typing: EG C D ( X 2 2 · X 1, X 3 1) gives: AND 3 x 1 â 1 â1 â2 x 2 = x 2 â () â1 3 x 3 = hp40g .book Page 55 Friday, December 9, 2005 1:03 AM
14-56 Computer Alge bra System (CAS) FACTOR Factors a polynomial. Example 1 Typing: F ACT OR(X 2 â 2) gives: Example 2 Typing: F ACT OR(X 2 2·X 1) gives: GCD Returns the GCD (Greatest Common Divisor) of two polynomials. Example Typing: GCD(X 2 2·X 1, X 2 â 1) gives: HERMITE Returns the Hermi te polynomial of degree n (where n is a whole number). This is a polynomial of the following type: Example Typing: HERMITE(6) gives: x 2 () x 2 â () â x 1 () 2 x 1 H n x () 1 â () n e x 2 2 ---- - d n dx n ------- - e x 2 2 ---- - â â = 64 x 6 480 x 4 â7 2 0 x 2 120 â hp40g .book Page 56 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-57 LCM Returns the LCM (Least Common Multiple) of two polynomials. Example Typing: LC M ( X 2 2·X 1, X 2 â 1) gives: LEGENDRE Returns the polynomial L n , a non-null solution of the differential equation: where n is a whole number. Example Typing: LEG ENDRE(4) gives: PARTFRAC Returns the partial fraction decomposition of a rational fraction. Example Typing: gives, in real and direct mode: and gives, in complex mode: x 2 2 x 1 () x 1 â () â x 2 1 â () y â³ â 2 â xy â² nn 1 () y â â â â 0 = 35 x 4 â 30 â x 2 â 3 8 --------------------------------------------- - A RTFRAC X 5 2 X 3 â1 X 4 2 X 3 â2 X 2 2 X â1 ---------------------------------------------------------- - - â â â x 2 x 3 â 2 x 2 2 ----------------- 1 â 2 x 2 â -------------- - x 2 13 i â â 4 ----------------- - xi ----------------- - 1 â 2 ----- - x 1 â ---------- - 13 i â 4 ----------------- - xi â ----------------- - hp40g .book Page 57 Friday, December 9, 2005 1:03 AM
14-58 Computer Alge bra System (CAS) PROPFRAC PROPFRAC rewrites a rational fr action so as to bring out its whole number part. PROPFRAC(A(X)/ B(X)) writes th e rational fraction A(X)/ B(X) in the form: where Râ(X) = 0, or 0 ⤠deg (R(X) < deg (B(X). Example Typing: gives: PTAYL PTAYL rewrites a polynomial P(X) in order of its powers of X â a. Example Typing: PT A Y L( X 2 2·X 1, 2) produces the polynomial Q(X), namely: Note that P(X) = Q(Xâ2). QUOT QUOT returns the quotient of two polynomials, A(X) and B(X), divided in decreasing order by exponent. Example Typing: QUO T (X 2 2·X 1, X) gives: Q X () RX () BX () ----------- - ROPFRAC 5 X 3 () X 1 â () â X 2 ------------------------------------------ - â â â â 5 x 12 â 21 x 2 ----------- - x 2 6 x 9 x 2 hp40g .book Page 58 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-59 Note that in step-by-step mode, synthetic division is shown, with each polynomial represented as the list of its coefficients in descending order of power. REMAINDER Returns the remainder from the division of the two polynomials, A(X) and B(X), div ided in decreasing order by exponent. Example Typing: REMAINDER(X 3 â 1, X 2 â 1) gives: Note that in step-by-step mode, synthetic division is shown, with each polynomial represented as the list of its coefficients in descending order of power. TCHEBYCHEFF For n > 0, TCHEBYCHEFF returns the polynomial T n such that: Tn (x) = cos( n ·ar ccos( x)) For n ⥠0, we have: For n ⥠0 we also have: For n ⥠1, we have: If n < 0, TCHEBYCHEFF returns the 2nd-species Tchebycheff polynomial: x 1 â T n x () C 2k n x 2 1 â () k x n 2 k â k 0 = n 2 -- - [] â = 1 x 2 â () T â³ n x () xT â² n x () â n 2 T n x () 0 = T n 1 x () 2 xT n x () T n 1 â x () â = T n x () n arccos x () â () sin arccos x () () sin ------------------------------------------ - = hp40g .book Page 59 Friday, December 9, 2005 1:03 AM
14-60 Computer Alge bra System (CAS) Example 1 Typing: T CHEB Y CHEFF(4) gives: Example 2 Typing: T CHEB Y CHEFF(â4) gives: Real menu CEILING See âCEILINGâ on page 13-14. FLOOR See âFLOORâ on page 13-14. FRAC See âFRACâ on page 13-14. INT Se e âINTâ on page 13-15. MAX See âMAXâ on page 13-15. MIN See âMINâ on page 13-15. Rewrite menu All the functions on this menu are also available on the menu in the Equation Writer. See âREWRI menuâ on page 14-28 for a description of th ese functions. Solve menu All the functions on this menu are also available on the menu in the Equation Writer. See âSOLV menuâ on page 14-33 for a description of these functions. 8 x 4 8 x 2 â1 8 x 3 4 x â hp40g .book Page 60 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-61 Tests menu ASSUME Use this function to make a hypothesis about a specified argument or variable. Example Typing: ASSUM E( X > Y) sets an assumption that X is greater than Y. In fact, the calculator works only with large not strict relations, and thus ASSUME(X>Y) will actually set the assumption that X ⥠Y. (A message will indicate this when you enter an ASSUME function.) Note that X ⥠Y will be stored in the REALASSUME variable. To see the variable, press , select REALASSUME and press . UNASSUME Use this function to cancel all previously specified assumptions about a particul ar argument or variable. Example Typing: UN ASSUM E (X ) cancels any assumptions made about X. It returns X in the Equation Writer. To see the assumptions, press , select REALASSUME and press . >, ⥠, <, â¤, ==, â See âTest functionsâ on page 13-19. AND See âANDâ on page 13-19. OR See âORâ on page 13-19 . NOT See âNOTâ on page 13-19. IFTE See âIFTEâ on page 13-19. Trig menu All the functions on this menu are also available on the menu in the Equation Writer. See âTRIG menuâ on page 14-38 for a description of these functions. hp40g .book Page 61 Friday, December 9, 2005 1:03 AM
14-62 Computer Alge bra System (CAS) CAS Functions on the CMDS menu When you are in the Equation Writer and press , a menu of the full set of CAS functions available to you is displayed. Many of the functions in this menu match the functions available from the soft-key menus in the Equation Writer; but there are other functions that are only available from this menu . This section describes the additional CAS functions that a re available when you press in the Equation Writer. (See the previous section for other CAS commands.) ABCUV This command applies the Bézo ut identity like EGCD, but the arguments are three polynomials A, B and C. (C must be a multiple of GCD(A,B).) ABCUV(A[X], B[X], C[X]) returns U[X] AND V[ X], where U and V satisfy: C[X] = U[X] · A[X] V[X] · B[X] Example 1 Typing: ABCUV(X 2 2 · X 1, X 2 â 1, X 1) gives: CHINREM Chinese Remainders: CHINREM has two sets of two polynomials as arguments, each separated by AND. CHINREM((A(X) AND R(X), B(X) AND Q(X)) returns an AND with two polynomials as components: P(X) and S(X). The polynomials P(X) and S(X) satisfy the following relations when GCD(R(X),Q(X)) = 1: S(X) = R(X) · Q(X) , P(X) = A(X) (modR(X)) and P(X) = B(X) (modQ(X)). There is always a solution, P(X), if R(X) and Q(X) are mutually primes and all solu tions are congruent modulo S(X) = R(X) · Q(X). 1 2 - - - AND 1 2 - - - â hp40g .book Page 62 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-63 Example Find the solutions P(X) of: P(X) = X (mod X 2 1) P(X) = X â 1 (mod X 2 â 1) Typing: CHINREM((X) AND (X 2 1) , (X â 1) AND (X 2 â 1)) gives: That is: CYCLOTOMIC Returns the cyclotomic polynomial of order n . This is a polynomial having the n th primitive roots of unity as zeros. CYCLOTOMIC has an integer n as its argument. Example 1 When n = 4 the fourth roots of unity are {1, i, â1, âi}. Among them, the primitive roots are: {i, âi}. Therefore, the cyclotomic polynomial of order 4 is (X â i).(X i) = X 2 1. Example 2 Typing: CY CL O T OMIC(20) gives: EXP2HYP EXP2 HYP has an expression enclosing exponenti als as an argument. It transforms that expression with the relation: exp(a) = sinh(a) cosh(a). x 2 2 x â1 2 ------------------------- - â AND x 4 1 â 2 ------------- - P X [] x 2 2 x â1 2 ------------------------- - mod x 4 1 â 2 ------------- - â â â â â â = x 8 x 6 â x 4 x 2 â1 hp40g .book Page 63 Friday, December 9, 2005 1:03 AM
14-64 Computer Alge bra System (CAS) Example 1 Typing: EXP 2HY P (EXP (A)) gives: sinh( a) co sh(a ) Example 2 Typing: EXP 2HY P( EXP (â A) EXP(A) ) gives: 2 · cosh( a) GAMMA Returns the values of the Î function at a given point. The Î function is defined as: We have: Î (1) = 1 Î ( x 1) = x · Î ( x ) Example 1 Typing: GA M M A ( 5 ) gives: 24 Example 2 Typing: GAMMA(1/2 ) gives: IABCUV IABCUV(A,B,C) returns U AND V such that AU BV = C where A, B and C are whole numbers. C must be a multiple of GCD( A,B) to obtain a solution. Î x () e t â t x 1 â t d 0 â â« = Ï hp40g .book Page 64 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-65 Example Typing: I AB CU V (48, 3 0, 1 8 ) gives: 6 AND â9 IBERNOULLI Returns the n th Bernoulliâs number B( n ) where: Example Typing: IBERNOULLI(6) gives: ICHINREM Chinese Remainders: ICHINREM(A AND P,B AND Q) returns C AND R, where A, B, P and Q are whole numbers. The numbers X = C k · R where k is an integer are such that X = A mod P and X = B mod Q . A solution X always exists when P and Q are mutually prime, (GCD( P ,Q ) = 1) and in this case, all the solutions are congruent modulo R = P · Q . Example Typing: ICHINREM(7 AND 10, 12 AND 15) gives: â3 AND 30 ILAP LAP is the Laplace transform of a given expression. The expression is the value of a function of the variable stored in VX. t e t 1 â ------------ - Bn () n ! ----------- t n n 0 = â â = 1 42 ---------- - hp40g .book Page 65 Friday, December 9, 2005 1:03 AM
14-66 Computer Alge bra System (CAS) ILAP is the inverse Laplace transform of a given expression. Again, the expression is the value of a function of the variable stored in VX. Laplace transform (LAP ) and inverse Laplace transfo rm (ILAP) are useful in solving linear differential equations with constant coefficients, for example: The following relations hold: where c is a closed contour enclosing the poles of f . The following property is used: The solution, y , of: is then: Example To solve: c type: LAP(X · EXP(3 · X)) The result is: y â³ py â² â qy â fx () = y 0 () a y â² 0 () b == LAP(y)(x) e x â t â yt () t d 0 â â« = ILAP(f)(x) 1 2 i Ï ------- - e zx fz () z d c â« â = L AP y â² () x () y 0 () â x LAP y () x () â = y â³ py â² â qy â fx () , y 0 () a , y â² 0 () b == = ILAP LAP fx () () xp () ab â x 2 px q ------------------------------------------------------------------ - ââ ââ y â³ 6 â y â² â 9 y â xe 3 x â , y 0 () a , y â² 0 () b == = 1 x 2 6 x â9 ------------------------- - hp40g .book Page 66 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-67 Typing: gives: LAP See ILAP above. PA2B2 Decomposes a prime integer p congruent to 1 modulo 4, as follows: p = a 2 b 2 . The calculator gives the result as a b · i. Example 1 Typing: P A2B2(17) gives: 4 i that is, 17 = 4 2 1 2 Example 2 Typing: P A2B2(2 9) gives: 5 2 · i that is, 29 = 5 2 2 2 PSI Returns the value of the nth derivative of the Digamma function at a . The Digamma function is the derivative of ln( Î (x)). Example Typing: P SI(3, 1) I LAP 1 X 2 6 X â9 --------------------------- - X 6 â () ab â X 2 6 X â9 ------------------------------------------------------------------ - â â â â â â â â â â x 3 6 ---- - 3 ab â () â xa â ââ ââ e 3 x â hp40g .book Page 67 Friday, December 9, 2005 1:03 AM
14-68 Computer Alge bra System (CAS) gives: Psi Returns the value of the Digamma function at a . The Digamma function is defined as the derivative of ln( Î (x)), so we have PSI( a ,0) = Psi( a ). Example Typing: Ps i ( 3 ) and pressing gives: . 922 7 84335 098 REORDER Reorders the input expression following the order of variables given in the second argument. Example Typing: REORDER(X 2 2 · X · A A 2 Z 2 â X · Z , A AND X AND Z) gives: SEVAL SEVAL simplifies the given expression, operating on all but the top-level operator of the expression. Example Typing: SEV AL(SIN(3 · X -â X) SIN(X X)) gives: SIGMA Returns the discrete antiderivative of the input function, that is, the function G, that satisfie s the relation G( x 1) â G( x ) = f( x). It has two arguments: the first is a function f( x ) of a variable x given as the second argument. 5 4 -- - â 1 6 -- - Ï 2 â A 2 2 XA â â X 2 Z â XZ 2 â 2 x â () sin 2 x â () sin hp40g .book Page 68 Friday, December 9, 2005 1:03 AM
Computer Algebra Syst em (CAS) 14-69 Example Typing: SIGMA(X · X!, X) gives: X! because (X 1)! â X! = X · X!. SIGMAVX Returns the discrete antideriva tive of the input function, that is a function, G, that satisfies the relation: G( x 1) â G( x ) = f( x ). SIGMAVX has as its argument a function f of the current variable VX. Example Typing: SIGM A VX( X 2 ) gives: because: STURMAB Returns the number of zeros of P in [ a , b [ wher e P is a polynomial and a and b are numbers. Example 1 Typing: ST U R M A B ( X 2 · (X 3 2), â2 , 0) gives: 1 Example 2 Typing: ST U R M A B ( X 2 · (X 3 2), â2 , 1) gives: 3 2 x 3 3 x 2 â x 6 ------------------------------- - 2 x 1 () 3 3 x 1 () 2 â x 12 x 3 â3 x 2 x â 6 x 2 = hp40g .book Page 69 Friday, December 9, 2005 1:03 AM
14-70 Computer Alge bra System (CAS) TSIMP Simplifies a given expression by rewriting it as a function of complex exponentials, and then reducing the number of variables (enabling complex mode in the process). Example Typing: gives: VER Returns the version number of your CAS. Example Typing: VER might give: 4.200 5 0 219 This particular result means that you have a version 4 CAS, dated 19 February 2005. Note that this is not the same as VERSION (which returns the version of the calculatorâs ROM). T SIMP SIN 3 X () SIN 7 X () SIN 5 X () -------------------------------------------------- - â â â â EXP ix â () 4 1 EXP ix â () 2 ------------------------------------- - hp40g .book Page 70 Friday, December 9, 2005 1:03 AM
Equation Writer 15-1 15 Equation W riter Using CAS in the Equation Writer The Equation Writer enables yo u to type expre ssions that you want to simplify, factor, differentiate, integrate, and so on, and then work them through as if on paper. The key on the HOME screen menu bar opens the Equation Writer, and the key closes it. This chapter explains how to write an expression in the Equation Wri ter using the menus and the keyboard, how to select a subexpression, how to apply CAS functions to an expression or subexpression and how to store values in the Equation Writer variables. Chapter 14 explains all the symbolic calculation functio ns contained in the various menus, and chapter 16 provides numerous examples showing the use of the Equation Writer. The Equation Writer menu bar The Equation Writer has a number of soft menu keys. TOOL menu Unlike the other soft menu keys, the menu does not give access to CAS commands. Instead, it provides access to a number of utilities to help you work with the Equation Writer. The following table explains each of the utilities on the menu. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
15-2 Equation Writer ALGB menu The menu contains functions that enable you to perform algebra, such as factoring, expansion, simplification, substitution, and so on. DIFF menu The menu contains functions that enable you to perform differential calculus, such as differentiation, integration, series expansion, limits, and so on. Cursor mode Enables you to go into cursor mode, for quicker selection o f expression s and subexpressions (see page 15- 10). Edit expr. Enables you to edit the highlighted expression on the edit line, just as you do in the HOME screen (see page 15- 11). Change font Enables you to choose to type using large or small characters (see page 15-10). Cut Copies the selection to the clipboard and erases the selection from Equation Writer. Copy Copies the selection to the clipboard. Paste Copies the contents of the clipboard to the location of the cursor. The clipboard contents will be either whatever Copy or Cut selected the last time you used these commands, or the highlighted level when you selected COPY in CAS history. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Equation Writer 15-3 REWRI menu The menu contains functions that enable you to rewrite an expression in another form. SOLV menu The menu contains functions that enable you to solve equation s, linear systems, and diffe rential equations. TRIG menu The menu contains functions that enable you to transform trigonometric expressions. NOTE You can get online help about any CAS function by pressing 2 and selecting that function (as explained in âOnline Help â on page 14-8). Configuration menus You can directly see, and change, CAS modes while working with the Equation Writer. The first line in e ach of the Equation Writer menus (except ) indicates the current CAS mode settings. In the example at the right, the first line of the menu reads: CFG R= X S CFG stands for âconfigurationâ, and the symbols to the right of it indicate various mode settings. ⢠The f irst s y mbol, R , indicates that y ou are in r eal mode. If y ou wer e in complex mode , this symbol wou l d be C . ⢠The s econd sy mbol , = , indicates that y ou ar e in ex act mode. If y ou were in appr ox imate mode, this s ymbol wou l d be ~ . ⢠The thir d sy mbol , X in the abov e e xam ple, indi cates the cur r ent independent v ari able. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
15-4 Equation Writer ⢠The fo u r th sym bo l, S , in the abov e e xample , indicates that y ou ar e in step-b y-step mode . If you w ere not in step-b y-step mode, this s y mbol wo uld be D (whi ch stands for Direct ). The first line of an Equation Writer me nu only indica tes some of the mode settings. To see more settings, highlight the first line and press . The configuration menu appears. The header of the configuration menu has additional symbols. In the ex ample above, the upward- pointing arrow indicates that polynomi als are displayed with increasing powers, and the 13 indicates the modulo value. You can change CAS mode settings directly from the configuration menu. Just press until the setting you want to choose is highlighted and then press . Note that the configuration menu includes only those options that are not currently selected. For example, if Rigorous is a current setting, its opposite, Sloppy , will appear on the menu. If you choose Sloppy , then Rigorous appears in its place. To return your CAS modes to their default settings, select Default cfg and press . To close the configuration menu, select Quit config and press . NOTE You can also change CAS mode settings from CAS MODES screen. See âCAS mo desâ on page 14-5 for information. Online Help language One CAS setting that only appears on the configuration menu is the setting that determines the language of the online help. Two languages are available : English and French. To choose French, select Francais and press . To return to English, select English and press . hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Equation Writer 15-5 Entering expressions and subexpressions You type expressions in the Equation Writer is much the same way as you type them in the HOME screen, using the keys to directly enter numbers, letters and operators, and menus to select various functions and commands. When you type an expression in the Equation Writer, th e operator that you are typing always carrie s over to the adjacent or selected express ion. You donât have to worry about where the parentheses go: they are automatically entered for you. It will help you understand ho w the Equation Writer works if you view a mathematical expression as a tree, with the four arrow keys enabling you to move through the tree: ⢠the and k ey s enable yo u to mov e fr om one branc h to another ⢠the and k ey s enable y ou to mov e up and dow n a particular tr ee ⢠the and k ey comb inations enable y ou to mak e multiple s electi ons. How do I select? There are two ways of going into selection mode: ⢠Pres sing tak es you int o selection mode and selects the element ad jacent to the cursor . F or ex ample: 1 2 3 4 selects 4. Pres sing it again select s the entir e tr ee: 1 2 3 4. ⢠Pres sing tak es you int o selectio n mode and selects the br anch adj acent to the cur sor . Pre ssing it augments the s electio n, adding the ne xt branc h to the ri ght . F or ex ample: 1 2 3 4 selects 3 4. Pressing it again selects 2 3 4, and again selects 1 2 3 4. NOTE: If you are typing a templated function with multiple arguments (such as â , â« ,SUBST, etc.), pressing or enables you to move from one argument to another. In hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
15-6 Equation Writer this case, you have to press to select elements in the expression. The following illustration shows how an expression can be viewed as a tree in the Eq uation W riter. It illustrates a tree view of the expression: Suppose that the cursor is positioned to the right of 3: ⢠If you pr ess once, the 3 component is selected. ⢠If y ou press again , the selecti on mov es up the tree , with x 3 now selected. ⢠If y ou press again , the selecti on mov es up the tree , and now the entir e expr essi on is selected . ⢠If you h ad p ressed in stea d of when the cursor was positioned to the right of 3, the leaves of the branch get selected (that is, x 3). ⢠If y ou press again , the selecti on mov es up the tree , and now the entir e expr essi on is selected . ⢠If yo u now pr ess , ju st the numer ator is selected . ⢠If you no w pre ss again, the top-most branch select ed (that is, (5 x 3). ⢠Conti nue p ressing t o sel ect e ach to p-m ost le af in turn (5 x and then 5 ) . 5 x 3 () x 1 â () â x 3 ---------------------------------------- - ÷ à â à # N ! N î N ! hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Equation Writer 15-7 ⢠Pres s again an d again to progre ssiv ely select mor e of the top-most br anch , and then low er branc hes (5 x , 5x 3, and then the entire numerator and finall y the entir e expr essi on). More Examples Example1 If you enter: 2 X à 3â X and press the entire expres sion is select ed. Pressing evaluates what is selected (that is, the entire expression) and returns: 2X 2 If you enter the same expression as earlier but press after the first X, as in: 2 X à 3 â X the 2 X is selected an d the next operation, multiplication, is applied to to it. The expression becomes: (2 X) à 3 â X Pressing selects the entire expres sion, and pressing evaluates it, resulting in: 2X 6 Now enter the same expre ssion, but press after the 3, as in: 2 X à 3 â X Note that selects the expression so far entered (2 X) thus making the next operation apply to the entire selection, not just the last entered term. The key selects just the last entry (3 ) and makes the next operation hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
15-8 Equation Writer (â X) apply to it. As a result, the entered expression is interpreted, and displayed, as (2 X)(3 â X). Select the entire expression by pressing and evaluate it by pressing . The result is: â(X 2 âXâ6) Example2 To enter X 2 â3X 1, press: 2 â 3 1 If, instead, you had to enter âx 2 â3X 1, you would need to press: (â) 2 â 3 1 Note that you press twice to ensure that the exponent applies to âX and not just to X. Example 3 Suppose you want to enter: Each fraction can be viewed as a separate branch on the equation tree. In the Equation Writer type the first branch: 1 ÷ 2 and then select this branch by pressing . Now type and enter the second branch: 1 ÷ 3 Select the second branch by pressing . Now type and enter the third branch: 1 ÷ 4 Likewise, select the third branch by pressing , type and then the fourth branch: 1 ÷ 5 1 2 -- - 1 3 -- - 1 4 -- - 1 5 -- - hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Equation Writer 15-9 Select the fifth branch by pressing . At this point, the desired expression is in the Equation Writer, as shown at t he right. Suppose that you want to select the second and third branches, that is: . Firs t press . This selects , the second term. Now press . This key combination enables you to select two contiguous branches, the one already selected a nd the one to the right of it. If you wa nt, you ca n evaluate the selected part by pressing . The result is shown at the right. Suppose now you want to perform the partial calculation: Because the two terms in this partial calculation are not contiguous (that is, side by side), you must first perform a permutation so that they are side by side.T o do this, press: This exchanges the selected element with its neighbour to the left. The result is shown at the right. Now press: to select just the branches you are interested in: 1 3 -- - 1 4 -- - 1 3 -- - 1 2 -- - 1 5 -- - hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
15-10 Equation Writer Pressing produces the result of the partial calculation. Summing up Pressing enables you to select the current element and its neighbour to the right. enables you to exchange the selected element with its neighbour to the left. The selected element remains selected after you move it. Cursor mode In cursor mode you can select a large expression quickly. To select cursor mode, press: Cursor mode As you press the arrow key, various parts of the expression are enclosed n in a box. When what you want to select is enclosed, press to select it. Changing the font If you are entering a long expression, yo u may find it useful to reduce the size of th e font used in the Equation Writer. Se lect Change font from the menu. This enables you to view a large expression in its entirety when you need to. Selecting Change font again returns the font size to its previous setting. You can also see the selected expression or subexpression is a smaller or larger font size by pressing and then (to use the smaller font) or (to use the larger font). hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Equation Writer 15-11 How to modify an expression If youâre typing an expression, the key enables you to erase what youâve typed. If youâre selecting, you can: ⢠Cancel the sele ction w ithout dele ting the expr essi on by pre ssing . The cur sor mo v es to the end o f the deselected portion . ⢠Replace the selection with an e xpression , just b y typing the desir ed expr essi on. ⢠T ransform the selected e xpressi on by appl y ing a CAS functi on to it (w hic h you can in vok e from one o f CAS menus along the bottom of the screen). ⢠Delete the selected e xpr ession b y pre ssing: ⢠Delete a selected unary operator at the top of the expr ession tr ee by pr essing: F or e xam ple, t o rep lace SIN(e xpr ) with C OS(e xpr), select S IN(expr ) , pres s a nd then press COS. ⢠Delete a binary i nfi x operator and one of its argume nts by s electing the ar gument y ou w ant delete and pres sing: F or ex ample , if you ha ve the e xpres sion 1 2 and select 1, pr essing deletes 1 and leaves o n ly 2. S i m i l a r l y , t o d e l e t e F ( x )= in the expre ssion F( x ) = x 2 â x 1, you s elect F( x ) and then pr es s . This pr oduces x = x 2 â x 1. ⢠Delete a binary operator by se lecting: Edit expr . fr om the menu and then making the cor rec tion . ⢠Cop y an element from CA S histor y . Y ou access CAS history by pr essing . See page 15-19 for details. hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
15-12 Equation Writer Accessing CAS functions While you are in the Equation Writer, you can access all CAS functions, and you can ac cess them in various ways. General principle: When you have written an expression in the Equation Writer, all you have to do is press to evaluate whatever you have selected (or the entire expression, if nothing is selected). How to type Σ and â« Press to enter Σ and to enter â« . These symbols and are treated as prefix functions with multiple arguments. They are automatically placed before the selected element, if there is one (hence the term prefix functions). You can move the cursor from argument to argument by pressing or . Enter the expressions accordin g to the rules of selection explained earlier, but you must first go into selection mode by pressing . NOTE Do not use the index i to define a summation, because i designates the complex-number solution of x 2 1 = 0. Σ performs exact calculations if its argument has a discrete primitive; otherwise it performs approximate calculations, even in exact mode. For example, in both approximate and exact mode : = 2.70833333334 whereas in exact mode: Note that Σ can symbolically calculate summations of rational fractions and hyperg eometric series that allow a discrete primitive. For example, if you type: 1 k ! --- - k 0 = 4 â 1 1 1! ---- - 1 2! ---- - 1 3! ---- - 1 4! ---- - 65 24 ----- - = 1 KK 1 () â ------------------------- - K 1 = 4 â hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Equation Writer 15-13 select the entire expression and press , you obtain: However, if you type: select the entire expression and press , you obtain 1. How to enter infix function s An infix function is one that is typed between its arguments. For example, AND , | and MOD are infix functions.You can either: ⢠type them in Alpha mode and then enter their argumen ts, or ⢠select them f ro m a CAS menu o r by pr essing an appr opri ate k e y , pro v ided that y ou ha ve alr eady wr itten and selec ted the fir st argume nt. Y ou mo ve f rom one ar gument to the other b y pres sing and . The comma enables y ou to w rite a complex number : when y ou type (1,2) , the par entheses ar e auto matically placed w hen you ty pe the comma. If y ou w ant to type (â1,2), you must select â1 bef or e you type the comma . How to enter prefix function s A prefix function is one that is typed before its arguments. To enter a prefix function, you can: ⢠type the f irst ar gument , selec t it , then select the functi on fr om a menu , or ⢠y ou can select the functi on fr om a menu , or by di re c t ly en t eri n g i t i n Al p h a mode , and then type the arguments . The following example illu strates t he various ways of entering a prefix function. Suppose you want to factor the expression x 2 â 4 , then find its value for x = 4 . FACTOR is the function for facto ring, and it is found on the menu. SUB ST is the function for subs tituting a value for a variable in an ex pression, and it is also found in the menu. l 4 5 -- - 1 KK 1 () â ------------------------- - K 1 = â â hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
15-14 Equation Writer First option: function first, then arguments In the Equation Writer, press , select FACTOR and then press or . FACTOR() is displayed in the Equation Writer, with the cursor between the parentheses (as shown at the right). Enter your expression, using the rules of selection described earlier. 2 4 The entire expression is now selected. Press then produce the result. With a blank Equation Writer screen, press , select SUBST and then pres s or . With the cursor between the parentheses at the location of the first argument, type your expression. Note that SUBST has two arguments. When you have finished entering the first argument (the expression), press to move to the second argument. Now enter the second argument, x =4. hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Equation Writer 15-15 Press to obtain th e an intermediate result (4 2 â 4) and again to evaluate the intermediate result. The final answer is 12. Second option: arguments first, then function Enter your expression, using the rules of selection described earlie r. 2 4 The entire expression is now selected. Now press and select FACTOR . Notice that the FACTOR is applied to whatever was selected (which is automatically placed in parentheses). Press to evaluate the expression. The result is the factors of the expression. B ecause the result of an evaluation is always selected, you can immediat ely apply another command to it. To illustrate this, press , select SUBST and then press or . Note that SUBST is applied to whatever was selected (which is automatically placed in parentheses). Note too that the cursor is automatically placed in th e position of the second argument. Enter the second argument, x =4. hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
15-16 Equation Writer Press to obtain an intermediate result, (4â 2)(4 2), and again to evaluate the intermediate result. The final answer, as before, is 12. Note If you call a CAS function while youâre writing an expression, whatever is currentl y selected is copied to the functionâs first or main argument. If nothing is selected, the cursor is placed at the appropriate location for completing the arguments. Equation Writer variables You can store objects in variab les, then access an object by using the name of its va riable. However, you should note the following: ⢠V ar iables used in CAS cannot be used in HOME , and vic e ve rs a. ⢠In HOME or in the pr ogram editor , use to sto re an object in a var iable . ⢠In CAS , use the S T OR E command (on the menu) to stor e a value in a vari able. ⢠The ke y display s a menu that contains all the av ailable v ari ables . Pr essing while y ou ar e in HOME displa y s the names of the v ari ables def ined in HOME and in the Aplets. Pr essing while y ou are in the Eq uation W riter displa ys the names of the var iables de fined in CA S (as explained on page 15-18) . Predefined CAS variables ⢠VX contains the name of the c u rr ent s ymboli c var iable . Generall y , this is X , so y ou should not use X as the name of a numeri c var iable. No r should you eras e th e contents of X w ith the UNASSIGN command (on the menu) after hav ing done a s ymboli c calculati on. ⢠EPS contains the v alue of epsilo n used in the EP SX0 command. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Equation Writer 15-17 ⢠MODULO contains the v alue of p fo r performing symbolic c alcu lat ion s i n Z/pZ or in Z/pZ [ X ]. Y ou can change the value of p either with the MODSTO command on the MODULAR menu , (by typ ing, f or ex ample , MODS T O( n ) to gi ve p a value of n ), o r f r o m CAS M ODE S scr een (see page 14- 5). ⢠PERIOD mus t contain the period of a f unction befo re y ou can find its F ourier coeff ic ients. ⢠PRIMIT contains the pr imitiv e of the las t integrat ed functi on . ⢠REALASSUME contains a list o f the names of the s ymbolic v ariables that are consider ed reals . If you âve chosen the Cmplx vars opti on on the CFG confi guratio n menu , the defa ults are X , Y , t, S1 and S2 , as well as an y integration v ar iables that ar e in use. If y ouâv e cho sen the Real vars optio n on the CFG confi guratio n menu , all sy mbolic var ia bles are consider ed reals . Y ou can also use an assumptio n to define a v ari able such as X >1. In a case like this, y ou use the ASSUME(X>1) command to make REALASSUME contain X>1. The command UNASSUME(X) cancels all the as sumptions y ou have pre v iousl y made about X . T o see these vari ables, as well as those that you âve def ined in CAS , pr ess in the Equatio n Editor (see âCAS vari ables â on page 14-4) . The keyboard in the Equation Writer The keys mentioned in this se ction have different functions when pressed in the Equation Writer than when used elsewhere. MATH key The key, if pressed in the Equation Writer, displays just those functions used in symbolic calculation. These functions are contained in the following menus: ⢠The f iv e func tion-containing Equati on W riter menus outlined in the pr ev ious sec tion: Algebra () , hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
15-18 Equation Writer Diff&Int () , Rewrite () , Solve () and Trig () . ⢠The Complex menu , pr ov iding f unctions spec ific to manipulating with com plex numbers . ⢠The Constant menu , containing e , i, â and Ï . ⢠The Hyperb . menu , containing hy perboli c functions . ⢠The Integer men u, con taining functions that enable you to perfo rm integer arithmeti c. ⢠The Modular men u, con taining functions that enable y ou to perform modular ar ithmetic (using the v alue contained in the MODULO varia bl e) . ⢠The Polynom. menu , containing f unctions that enable you to perfor m calculations w i th polynomi als. ⢠The Real menu , containing func tions spec ifi c to common r eal-number calc ulations ⢠The Tests menu , containing logic f unctions f or wo rking w ith hy potheses . SHIFT MATH keys The key combination opens an alphabetical menu of all CAS commands. You can enter a command by selecting it from this menu, so that you donât have to type it in ALPHA mode. VARS key Pressing while youâre in the Equation Writer displays the names of the variables defined in CAS. Take special note of namVX , which contains the name of the current variable. The menu options on the variables screen are: Press to copy the name of the highlighted variable to the position of the cursor in Equation Writer. Press to see the contents of the highlighted variable. Press to change the contents of the highlighted variable. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Equation Writer 15-19 Press to clear the value of the highlighted variable. Press to change the name of the highlighted variable. Press to define a new variable (which you do by specifying an object and a name for the object. SYMB key Pressing the key in the Equation Writer gives you access to CAS history. As in the HOME screen history, the calculations are written on the left and the results are written on the right. Using the arrow keys, you can scroll through the histor y. Press to copy the highlighted entry in history to the clipboard in order to paste it in the Equation Writer. Press or to replace the current selection in Equation Writer with the high lighted entry in CAS history. Press to leave CAS history without changing it in any way. SHIFT SYMB or SHIFT HOME keys While you are working in the Equation Writer, pressing or opens CAS MODES screen. The various CAS modes are described in âCAS modesâ on page 14-5. SHIFT , key Pressing followed by the comma key undoes (that is, cancels) your last operation. PLOT key Pressing in the Equation Writer displays a menu of plot types. You can choose to graph a function, a parametric curve, or a polar curve. Depending on what you choose, the highlighted expression is copied into the appropriate aplet, to the destination that you specify. hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
15-20 Equation Writer NOTE This operation supposes that the c urrent variable is also the variable of the function or curve you want to graph. When the expression is copied, it is evaluated, and the current variable (contained in VX) is changed to X, T, or θ , depending on the type of plot you chose. If the function depends on a pa rameter, it is preferable to give the parameter a value before pressing . If, however, you want the parameterized expression to be copied with its parameter, then the name of the parameter must consist of a si ngle letter other than X, T, or θ , so that there is no confusion. If the highlighted expression has real values, the Function, Aplet or Polar Aplet can be chosen, and the graph will be of Function or Polar type. If the highligh ted expression has complex values, the Parametric Aplet must be chosen, and the graph will be of Parametric type. To summarize. If you choose: ⢠the F unction A plet, the hi ghlighted e xpr essio n is copied into the c hosen f unction Fi , and the cur rent var ia ble is changed to X. ⢠the P arametr ic A plet, the r eal par t and the imaginary part of the h ighlighted expres sion are copied into the chosen f unctions Xi , Yi , and the curr ent vari able is changed to T . ⢠the P olar Aplet , the highli ghted ex pre ssion is cop ied into the ch osen func tion R i and the cur rent v ariable is changed to θ . NUM key Pressing in the Equation Writer causes the highlighted expression to be replaced by a numeric approximation. puts the calculator into approximate mode. SHIFT NUM key Pressing in the Equation Writer causes the highlighted expression to be replaced by a rational number. puts the calculator into exact mode. VIEWS key Pressing in the Equation Writer enables you to move the cursor with the and arrow keys to see the entire highlighted expression. Press to return in the Equation Writer. hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Equation Writer 15-21 Short-cut keys In the Equation Writer, the following are short-cut keys to the symbols indicated: 0 for â 1 for i 3 for Ï 5 for < 6 for > 8 for ⤠9 for ⥠hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-1 16 Step-b y-Step Ex ampl es Introduction This chapter illustrates the power of CAS, and the Equation Writer, by working though a number of examples. Some of these examples are variations on questions from senior math examination papers. The examples are given in order of increasing difficulty. Example 1 If A is: calculate the result of A in the form of an irreduci ble fraction, showing each step of the calculation. Solution: In the Equation Writer, enter A by typing: 3 2 1 1 2 1 Now press to select the denominator (as shown above). Press to simplify the denominator. Now select the numerator by pressing . 3 2 -- - 1 â 1 2 -- - 1 ----------- - hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
16-2 Step-by-Step Examples Press to simplify the numerator. Press to select the entire fraction. Press to simplify the selected fraction, giving the result shown at the right. Example 2 Given that write C in the form , where d is a whole number. Solution: In the Equation Writer, enter C by typing: 2 45 3 12 20 6 3 Pres s to select . Pres s to select and to select 20. Now pr ess , select FACTOR and pres s . C 2 45 3 12 20 â6 3 â = d 5 63 â 20 â hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-3 Pres s to factor 20 into . Pre ss to selec t and to simplify it. Pre ss to selec t and to e xc hange with . Pre ss to selec t and to select 45 . Pres s , sel ect FACTOR and pres s . Press to factor 45 i n t o . Pre ss to selec t and to simplify the selecti on. Pre ss to selec t , and to select . 2 2 5 â 2 2 5 â 25 â 31 2 25 â 24 5 3 2 5 â 3 2 5 â 235 â 235 â 25 â hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
16-4 Step-by-Step Examples Pres s to ev aluate the selection . It re mains to transf orm and combine it w ith . Follo w the same procedur e as undertaken a number of times abo ve . Y ou w ill find that is equal to , and so the final tw o terms cancel each other out. Hence the r esult is Example 3 Given the expression : ⢠expand and r educe D ⢠factor D ⢠sol ve the equati on and ⢠eva lu a te D for x = 5 . Solution: First, enter D using the Equation Writer: 3 X 1 2 81 Press to select and to expand the expression. This gives: 31 2 63 â 31 2 63 C 45 = D 3 x 1 â () 2 81 â = 3 x 10 â () 3 x 8 () â 0 = 3 X 1 â () 2 9 x 2 6 x â1 8 1 â hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-5 Press to select the entire equation, then press to reduce it to . Press , select FACTOR, press and then . The r esult is as shown at the right. Now press , select SOLVEVX, press and press . The result is shown at t he right. Press to display CAS history, select D or a version of it, and press . Press , select SUBST , press and, then complete the second argument: Press to select the enti re express ion and then to obtain the intermediate result shown. Press once more to yield the re sult: . Therefore, when . Example 4 A baker pro duces two assortments of biscuits and macaroons. A packet of the first assortment contains 17 biscuits and 20 macaroons. A packet of the second assortment contains 10 biscuits and 25 macaroons. Both packets cost 90 cents. Calculate the price of one biscuit, and the price of one macaroon. Solution: Let x be the price of one biscuit, and y the price of one macaroon. The problem is to solve: 9 x 2 6 x â8 0 â x 5 â = 175 D 175 = x 5 â = hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
16-6 Step-by-Step Examples Pres s , select LINSOLVE and pr ess . Enter 17 X 20 Y 90 10 X 25 Y 90 X Y If you are working in step by step mode, pressing produces the result at the right. Press again to produce the next step in the solution: Press again to produce the reduction result: Pressing again produces the final resul t: If you select , and press you get X = 2 a nd Y = 2.8. In other words, the price of one biscuit is 2 cents, and the price of one macaroon is 2.8 cents. Exercise 5 Suppose that A and B are points having the coordinates (â1, 3) and (â3,â1) respectively, and where the unit of measure is the centimetre. 17 x 20 y 90 = 10 x 25 y 90 = 14 5 ----- - hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-7 1. F ind the ex act le ngth of AB in cen timetr es. 2 . Deter mine the equation o f the line AB . First method Type: STORE((-1,3),A) and press . Accept the change to Complex mode, if necessary. Note that pressing returns the coordinates in complex form: â1 3i. Now type: STORE((-3,-1),B) and press . The coordinates this time are represented as â3 â1·i. The vector AB has coordinates B â A. Type: (B - A) Press . The result is . Now apply the DROITE command to determine the equation of the line AB : Complex DROITE A B Pressing gives an intermediate result . 25 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
16-8 Step-by-Step Examples Press again to simplify the result to Y = 2X 5. Second method Type: (-3,-1 )-(-1,3) The answer is â(2 4i). With the answer still selected, apply the ABS command by pressing . Pressing gives , the same answer as with method 1 above. You can also deter mi1ne the equati on of the line b y ty pi ng: DROITE(( -1,3), (-3,-1)) Pressing then gives the result obtained before: Y = â(2X 5). Exercise 6 In this exercise, we consider some examples of integer arithmetic. Part 1 For n , a strictly positive integer, we define: 1. Compute a 1 , b 1 , c 1 , a 2 , b 2 , c 2 , a 3 , b 3 and c 3 . 2 . Deter mine ho w man y digits the dec imal repr esentations of a n and c n can hav e. Sho w that a n and c n are di v isible by 3 . 3 . Using a list of prime numbers less than 100, show that b 3 is a prime . 25 AB a n 41 0 n à 1 b n 21 0 n 1 â à c n 21 0 n à 1 = , = , â = hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-9 4. Show that for e very integer n > 0, b n à c n = a 2n . 5 . Deduce the prime factor decompositi on of a 6 . 6. S h ow t h a t GC D ( b n , c n ) = GCD( c n ,2). Deduce that b n and c n are prime together . Solution: Begin by entering the three definitions. Type: DEF(A(N) = 4 · 10 N â1) DEF(B(N) = 2 · 10 N â1) DEF(C(N) = 2 · 10 N 1) Here are the keystrokes for en tering the first definition: First select the DEF command by pressing . Now press A N = 4 10 N 1 Finally press . Do likewise to define the other two expressions. You can now calculate various values of A(N), B(N) and C(N) simply by typing the defined variab le and a value for N, and then pressing . For example: A(1) yields 39 A(2) yields 399 A(3) yields 3999 B(1) yields 19 B(2) yields 199 B(3) yields 1999 and so on. In determining the number of digits the dec imal repr esentations of a n and c n can hav e, the calculator is used only to try out different values of n. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
16-10 Step-by-Step Examples Show that the whole numbers k such that: have digits in decimal notation. We have: so have digits in decimal notation. Moreover, is divisible by 9, since its decimal notation can only end in 9. We also have: and so and are both di visible by 3. Letâs consider whether B(3) is a prime number. Type ISPRIME?(B(3)) and press . The result is 1, which means true. In other words, B(3) is a prime. Note: ISPRIME? is not available from a CAS soft menu, but you can select it from from CAS FUNCTIONS menu while you are in the Equation Writer by pressing , choosing the INTEGER menu, and scrolling to the ISPRIME? function. To prove that is a prime number, it is necessary to show that 1999 is not divi sible by any of the prime numbers less than or equal to . As , that means testing the divisibility of 1999 by n = 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41. 1999 is not divisible by any of these numbers, so we can conclude that 1999 i s prime. 10 n k 10 n 1 < ⤠n 1 () 10 n 31 0 n â a n 41 0 n â 10 n 1 << << 10 n b n 21 0 n â 10 n 1 << < 10 n 21 0 n â c n 31 0 n â 10 n 1 << << a n b n c n , , n 1 () d n 10 n 1 â = a n 31 0 n â d n = c n 31 0 n â d n â = a n c n b 3 1999 = 1999 1999 2025 < 45 2 = hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-11 Now consider the product of two of the definitions entered above: B(N) Ã C(N): B N C N . Press , to select EXP2POW and press . Press to evaluate the expression, yielding the result of B(N) Ã C(N). Consider now the decomposition of A(6) into its pr ime factors. Press , to select FACTOR and press . Now press A 6. Finally, press to get the resul t. The factor s are listed, separated by a medial period. In this case, the factors a re 3, 23, 29 and 1999. Now letâs consider whether b n and c n are relatively prime. Here, the calculator is useful only for trying out different values of n . To show that b n and c n are relatively prime, it is enough to note that: That means that the common divisors of b n and c n are the common divisors of b n and 2, as well as the common divisors of c n and 2. b n and 2 are relatively prime because b n is a prime number other than 2. So: c n b n 2 = hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
16-12 Step-by-Step Examples Part 2 Given the equation: [1] where the integers x and y are unknown and b 3 and c 3 are defined as in part 1 abo ve: 1. Sho w that [1] has at least one so lution . 2 . Appl y Euc lidâs algor ithm to b 3 and c 3 and find a solution to [1]. 3 . F ind all solutio ns of [1]. Solution : Equation [1] must have at least one solution, as it is actually a form of Bézoutâs Identity. In effect, Bézoutâs Theorem states that if a and b are relatively prime, there exists an x and y such that: Therefore, the equation has at least one solution. Now enter IEGCD(B(3), C(3)) . Note that the IEGCD function can be found on the INTEGER submenu of the MATH menu. Pressing a number of times returns the result shown at the right: In other words: Therefore, we have a particular solution: x = 1000, y = â999 . The rest can be done on paper: , GCD c n b n , () GCD c n 2 , () GCD b n 2 , () 1 = == b 3 xc 3 y 1 = â â ax â by â 1 = b 3 x â c 3 y â 1 = b 3 1000 à c 3 999 â () à 1 = c 3 b 3 =2 b 3 999 2 1 à = hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-13 so , , or The calculator is not needed for finding the general solution to equation [1]. We started with and have established that . So, by subtraction we have: or According to Gaussâs Theorem, is prime with , so is a divisor of . Hence there ex ists such that : and Solving for x and y , we get: and for . This gives us: The general solution for all is therefo re: Exercise 7 Let m be a point on the circle C of center O and radius 1. Consider th e image M of m defined on their affixes by the transformation . When m moves on b 3 999 c 3 b 3 â () 1 Ã = b 3 1000 c 3 999 â () Ã Ã 1 = b 3 x â c 3 y â 1 = b 3 1000 Ã c 3 999 â () Ã 1 = b 3 x 1000 â () c 3 y 999 () â â 0 = b 3 x 1000 â () â c 3 â y 999 () â = c 3 b 3 c 3 x 1000 â () kZ â x 1000 â () kc 3 Ã = y 999 () kb 3 Ã = â x 1000 kc 3 Ã = y 99 9 â kb 3 Ã â = kZ â b 3 xc 3 yb 3 1000 c 3 999 â () Ã Ã 1 == â â kZ â x 1000 kc 3 Ã = y 99 9 â kb 3 Ã â = F : z > 1 2 -- - z 2 â Z â â hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
16-14 Step-by-Step Examples the circle C , M will move on a curve Î . In this exercise we will study and plot Î . 1. Let and m be the point on C of affi x . F ind the coor dinates of M in terms o f t . 2 . Co mpare x(ât) w ith x(t) and y(ât) with y(t). 3. Com p u t e x â² (t ) and find the v ari ations of x o ver [0, Ï ]. 4. Repeat step 3 fo r y . 5 . Sho w the var iatio ns of x and y in the same table . 6. P ut the poin ts of Î corr esponding to t = 0 , Ï /3, 2 Ï /3 and Ï, and dra w the tangent t o Î at these points . Part 1 First go to CAS MODES screen and make t the VX variable. To do this, press to open the Equation Writer, and then press . This opens CAS MODES screen. Press and delete the current variable. Type T and press . Now enter the expression and press to select it. Now invoke the SUBST command from the menu. Because the expression was highlighted, the SUBST command is automatically applied to it. Note that the cursor is positioned in the second parameter. Since we know that , we can enter this as the second parameter. t Ï â Ï [, ] â ze it â = 1 2 -- - z 2 â z â ze it â = hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-15 Selecting the entire expression and pressing gives the result at the right: Now linearize the result by applying the LIN command (which can be found on the me nu). The result, after accepting the switch to complex mode, is shown at the right: Now store th e result in variable M. Note that STORE is on the menu. To calculate the real part of the expression, apply the RE command (available on the COMPLEX submenu of the MATH menu). Pressing yields the result at the right: We are now going to define this result as x (t ). To do this, enter =X(t), highlight the X(t) by pressing and press to swap the two parts of the expression , as shown at t he right: Now select the entire expression and apply the hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
16-16 Step-by-Step Examples DEF command to it. Press to complete the definition. To calculate the real pa rt of the expression, apply the IM command (available on the COMPLEX submenu of the MATH menu) to the stored variable M. Press to get the result at the right: Finally, define the result as Y(t) in the same way that you defined X(t): by firstly adding Y(t) = to the expression (as shown at the right) and then applying the DEF command. We have now found the coordinates of M in terms of t . Part 2 To find an axis of symmetry for Î , calculate and by typing: X t Press to highlight the expression. Then press to produce the result at the right: In other words, Now type Y t Press to highlight the expression. xt â () yt â () xt â () xt () = hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-17 Then press to produce the result at t he right: In other words, . If is part of , then is also part of . Since and are symmetrical with respect to the x- axis, we can deduce that the x-axis is an axis of symmetry for . Part 3 Calculate by typing: DERVX X t . P ress to highli ght the exp res s io n. Pressing returns the result at the right: Press to simplify the result: Y ou can now define the function by invoking DEF . Note: You will first need to type =X1(t) then exchange X1(t) with the previous expression. To do this, highlight X1(t) and type . Now select the entire expression and apply the DEF command to it: Finally press to finish the definition. yt â () yt () â = M 1 xt () yt () (,) Î M x xt â () yt â () (,) Î M 1 M 2 Î x â² t () x â² t () hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
16-18 Step-by-Step Examples Part 4 To calculate , begin by typing: DERVX(Y(t)) . Pressing returns: Press again to simplify the result: Select FACTOR and press . You can now define the function (in the same way that you defined ). Part 5 To show the variations of and , we will trace and on the same graph. The independent variable must be t which it should be as a result of the previous calculations. (You can check this by pressing .) Type X(t) in the Equation Writer and press . The corresponding expression is displayed. Now press , select Function , press , select F1 as the destination and press . Now do the same thing with Y(t), making F2 the destination. To graph the functions, quit CAS (by pressing ), choose the Function aplet, and check F1 and F2 . y â² t () y â² t () x â² t () xt () yt () xt () yt () hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-19 Now press to see the graphs. Part 6 To find the values of and for return to CAS, type each function in turn and press . (You may need to press twice for further simplification). For example, pressing X 0 gives the result at the right: Likewise, pressing X 3 gives this answer at the right: The other results are: The slope of the tangents is . We can find the values of for by using the lim command. xt () yt () t 0 Ï 3 -- - 2 Ï â 3 --------- - Ï ,, , = Ï X 2 Ï 3 ----- - ââ ââ 1 4 -- - = X Ï () 3 2 -- - = Y 0 () 0 = Y Ï 3 -- - ââ ââ 3 â 4 --------- - = Y 2 Ï 3 ----- - ââ ââ 33 â â 4 ----------------- = Y Ï () 0 = m y ' t () x ' t () --------- - = y ' t () x ' t () --------- - t 0 Ï 3 -- - 2 Ï â 3 --------- - Ï ,, , = hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
16-20 Step-by-Step Examples The example at the right shows the case for t = 0. Select the entire expression and press to get the answer: 0 The example at the right shows the case for t = Ï /3. Selecting the entire expression and pressing displays the message shown at the right. Accept YES and press . Press again to get the result: â The next example is for t = 2 Ï /3. Selecting the entire expression and pressing displays the result: 0 The final example is for the case where t = Ï . Press , accept YES to the message UNSIGNED INF. SOLVE? , press and press to get the result: â Here, then, are the variations of and : xt () yt () hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-21 Now we will graph Î , which is a parametric curve. In the Equation Writer, type X(t) i à Y(t) . Select the entire expression and press . Now press , select Parametric and press . Select X1,Y1 as the destination and press . To make the graph of Î , quit CAS and choose the Parametric aplet. Check X1(T) and Y1(T) . Now press to see the graph. t 0 Ï 0â0 0 âââ 0 âââ 0 0â â 1 â0 2 m 0 â 0 â Ï 3 -- - 2 Ï 3 ------ x ' t () 3 xt () 1 â 2 ----- - 3 â 4 ----- - 1 4 -- - 3 2 -- - yt () 3 â 4 --------- - 33 â 4 ------------- y ' t () hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
16-22 Step-by-Step Examples Exercise 8 For this exercise, make sure that the calculator is in exact real mode with X as the current variable. Part 1 For an integer, n , define the following: Define g over [0,2] where: 1. F ind the var iati ons of g o ver [0,2]. Sho w that for ev ery real x in [0,2]: 2 . Sho w that for e v ery real x in [0,2]: 3 . After int egrati on, sh ow that: 4. Using: sho w that if has a limit L as n appr oaches inf inity , then: u n 2 x 3 x 2 -------------- - e x n -- - x d 0 2 â« = gx () 2 x 3 x 2 -------------- - = 3 2 -- - gx () 7 4 -- - â¤â¤ 3 2 -- - e x n -- - gx () e x n -- - 7 4 -- - e x n -- - â¤â¤ 3 2 -- - ne 2 n -- - n â ââ ââ ââ u n 7 4 -- - ne 2 n -- - n â ââ ââ ââ â¤â¤ e x 1 â x ------------- x 0 â lim 1 = u n 3 L 7 2 -- - â¤â¤ hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-23 Solution 1 Start by defining G(X): DEF G X = 2 X 3 X 2 Now press : Press and to select the numerator and denominator, and then press . This leaves G(X) displayed: Finally, apply the TABVAR function: TABVAR and pres s a number of times until the var iation table appears (sho w n abov e) . The first line of the variation table gives the sign of according to x , and the second line the variations of g (x ). Note that for TABVAR the function is always called F . We can deduce, then, that g (x ) increases over [0, 2]. If you had been in step-by- step mode, you would have obtained: Pr ess to get the result at the right. g â² x () F 2 X 3 â X 2 ------------------- - = hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
16-24 Step-by-Step Examples Now press and scroll down the screen to: Now press to obtain the table of variations. If you are not in step-by -step mode, you can also get the calculation of the derivative by typing: DERVX(G(X)) which produces the preceding result. To prove the stated inequality, first calcu late g (0) by typing G(0) and pressing . The answer is: . Now calculate g (2) by typing G(2) and pressing . The answer is . The two results prove that: for Solution 2 The calculator is not needed here. Simply stating that: for is sufficient to show that, for , we have: Solution 3 To integrate the preceding inequality, type the expression at the right: Pressing produces the result at the right: 1 x 2 () 2 ------------------ - â 3 2 -- - 7 4 -- - 3 2 -- - gx () 7 4 -- - â¤â¤ x 02 [,] â e x n -- - 0 ⥠x 02 [, ] â x 02 [,] â 3 2 -- - e x n -- - gx () e x n -- - 7 4 -- - e x n -- - â¤â¤ hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-25 We can now see that: To justify the preceding calculation, we must assume that is a primitive of . If you are not s ure, you can use the INTVX function as illustrated at the right: Note that the INTVX command is on the menu. The simplified result, got by pressing twice, is shown at t he right: Solution 4 To find the limit of when , enter the expression at the right: Note that the lim command is on the menu. The infinity sign can be selected from the character map, opened by pressing . Pressing once after selecting the infinity sign adds a â â character to the infinity sign. Select the entire expression ans press to get the result, which is: 2 3 2 -- - ne 2 n -- - n â ââ ââ ââ u n 7 4 -- - ne 2 n -- - n â ââ ââ ââ â¤â¤ ne x n -- - â e x n -- - ne 2 n -- - n â ââ ââ ââ n â â hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
16-26 Step-by-Step Examples NOTE : The variable VX is now set to N . Reset it to X by pressing (to display CAS MODES screen) and change the INDEP VAR s etting. To check the result, we can say that: and that therefore: or, simplifying: If the limit of exists as approaches in the inequalities in solution 2 above, we get: Part 2 1. Sho w that for e very x in [0,2]: 2 . F ind the v alue of: 3. Sh ow t h a t fo r e ve r y x in [0,2]: 4. Deduce that: 5 . Sho w that is con ver gent and f ind its limit, L . e x 1 â x ------------- x 0 â lim 1 = e 2 n -- - 1 â 2 n -- - ------------- - n â â lim 1 = e 2 n -- - 1 â ââ ââ ââ n â n â â lim 2 = Lu n n â 3 2 -- - 2 â L 7 4 -- - 2 â â¤â¤ 2 x 3 x 2 -------------- - 2 1 x 2 ----------- - â = I 2 x 3 x 2 -------------- - dx 0 2 â« = 1 e x n -- - e 2 n -- - â¤â¤ 1 u n e 2 n -- - I â â¤â¤ u n hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-27 Solution 1 Start by defining the following: Now type PROPFRAC(G(X)) . Note that PROPFRAC can be found on the POLYNOMIAL submenu of th e MATH menu. Pressing yields the result shown at the right. Solution 2 Enter the integral: . Pressing yields the result shown at the right: Pressing again yields: Working by hand: , so: Then, integrating term by term between 0 and 2 produces: that is, since : gx () 2 1 x 2 ----------- - â = Ig x () x d 0 2 â« = 2 x 3 2 x 2 () 1 â = gx () 2 1 x 2 ----------- - â = gx () x 2 xx 2 () ln â [] = d 0 2 â« x 2 = x 0 = 42 2 ln = ln gx () x 42 ln â = d 0 2 â« hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
16-28 Step-by-Step Examples Solution 3 The calculator is not needed here. Simply stating that increases for is sufficient to yield the inequality: Solution 4 Since is positive over [0, 2 ], through multiplication we get: and then, integrating: Solution 5 First find the limit of when â . Note: pressing after you have selected the infinity sign from the character map places a â â character in front of the infinity sign. Selecting the entire expression and pressing yields: 1 In effect, tends to 0 as tends to , so tends to as tends to . As tends to , is the portion between and a quantity that tends to . Hence, converges, and its limit is . We have therefore shown that: e x n -- - x 02 [,] â 1 e x n -- - e 2 n -- - â¤â¤ gx () gx () gx () e x n -- - gx () e 2 n -- - â¤â¤ Iu n e 2 n -- - I â¤â¤ e 2 n -- - n â 2 n -- - n â e 2 n -- - e 0 1 = n â n â u n I I u n I LI 42 ln â == hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Step-by-Step Examples 16-29 hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-1 17 V ariables and memory manag ement Introduction The HP 40gs has approximately 200K of user memory. The calculator uses this memory to store variables, perform computations, and store history. A v a r i a b l e i s a n o b j e c t t h a t y o u c r e a t e i n m e m o r y t o h o l d data. The HP 40gs has two types of variables, home variables and aplet v ariables. ⢠Home variables are available i n all aplets. For example, you can store real numbers in var iables A to Z and complex numbers in variables Z0 to Z9. These can be numbers you have entered, or the results of calculations. Th ese variables are available within all aplets and within any programs. ⢠Aplet variables apply only to a single aplet. Aplets have specific vari ables allocated to them which vary from aplet to aplet. You use the calculatorâs memory to store the following objects: ⢠copies of aplets with specific con figurations ⢠new aplets that you download ⢠aplet variables ⢠home variables ⢠variables created through a catalog or editor, for example a matrix or a text note ⢠programs that you create. You can use the Memory Manager ( MEMORY ) to view the amount of memory av ailable. The catalog views, which are accessible via the Memory Manager, can be used to transfer variables such as lists or matrices between calculators. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
17-2 Variables and memory management Storing and recalling variables You can store numbers or expressions from a previous input or result into variables. Numeric Precision A number stored in a variable is always stored as a 12- digit mantissa with a 3-digit exponent. Numeric precisio n in the display, however, de pends on the display mode (Standard, Fixed, Scientific, Engineering, or Fraction). A displayed number has only the precision that is displayed. If you copy it from the HOME view display history, you obtain only the precision displayed, not the full internal precision. On the other hand, the variable Ans always contains the most recent result to full precisio n. To store a value 1. On the command line, enter the value or the calculati on f or the re sult yo u wi s h t o st o re. 2. P r e s s 3 . Enter a name f or the vari ab l e. 4. Pres s . To store the results of a calculation If the value you want to store is in the HOME view display history, for example the results of a previous calculation, you need to copy it to the command line, then store it. 1. P erform the calculati on f or the r esult y ou w ant to stor e. 3 8 6 3 2 . Pr ess to hi ghlight to the r esult y ou wish to st ore . 3 . Pres s to copy the r esult to the command line . 4. Pres s . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-3 5 . Enter a name f or the var iable . A 6 . Pr ess to stor e the re sult . The results of a calculation can also be stored directly to a variable. For example: 2 5 3 B To recall a value To recall a variableâs value, type the name of the variable and press . A To use variables in calculations You can use variables in calculations. The calculator substitutes the variableâs value in the calculation: 65 A To clear a variable You can use the CLRVAR command to clear a specified var iable. For example, if you have stored {1,2,3, 4} in variable L1, entering CLRVAR L1 w ill clear L1. (Y ou can f ind the CLRVAR command b y pres sing and choosing the PROMP T category of commands.) hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
17-4 Variables and memory management The VARS menu You use the VARS menu to access all variables in the calculator. The VARS menu is organised by category. For each variable category in the left column, there is a list of variables in the right colu mn. You select a variable category and then select a variable in the category. 1. Open the V ARS menu . 2 . Use the arr ow k eys or pr ess the alpha ke y of the f irst letter in the category to select a var iable category . For exa m p l e, t o s e l e ct the Matri x category , pres s . Note: In this instance , ther e is no need to pre ss the ALPHA k ey . 3 . Mov e the highli ght to the var iable s column. 4. Use the ar r ow k e ys t o select the v ari able that you want . F or example , to select the M2 var iable , pres s . hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-5 5 . Choos e whether to place the v ari able name or the var iable v alue on the command line . â Press to indicate that yo u want the var iable âs contents to appear on the command line. â Press to indicate that y ou wa nt the var iable âs name to appear on the co mmand line. 6. Pr ess to place the va lue or name on the command line . The selec ted object a ppears on the command line . Note: The V ARS men u can also be used to enter the names or values of v ari ables into pr ograms . Example This example demonstrates how to use the VARS menu to add the contents of two list variables, and to store the result in another list variable. 1. Display the L ist Catalog . LIST to select L1 2 . Enter the data f or L1. 88 90 89 65 70 3 . Retu rn to the L ist Catalog to c r eate L2 . LIST to select L2 hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
17-6 Variables and memory management 4. Enter data for L2 . 55 48 86 90 77 5 . Pres s to access HOME . 6. Open the var iab le menu and select L1. 7 . Copy it to the command line . Note: Because the option is highli ghted, the v ar iable âs name, rather than its conten ts, is copied to the command line . 8. Insert the oper ator and select the L2 v ari able fr om th e Li s t va ria b l es. 9 . S tore the answ er in the Lis t catalog L3 var iable . L3 Note: Y ou can also type list names dir ectly fr om the k ey boar d. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-7 Home variables It is not possible to store data of one type in a variable of another type. For example, yo u use the Matrix catalog to create matrices. You can crea te up to ten matrices, and you can store these in variables M0 to M9. You cannot store matric es in variab les other than M0 to M9. Cate- gory A v ailab le nam es Complex Z0 to Z9 Fo r e xa m p l e, (1,2) Z0 or 2 3 i Z1. Y ou can enter a complex number by typing (r ,i) , where r r e pres ents the r eal par t , and i repr esents the imaginar y part. Graphic G0 to G9 SeeâGraphic commandsâ on page 21-21 for more information on storing graphic objects via programming commands. See âTo store into a graphics variableâ on page 20-5 for more information on storing graphic object via the sketch view. Library Aplet library variables can store aplets that you have created, either by saving a copy of a standard aplet, or downloading an aplet from another source. List L0 to L9 For example, {1,2,3} L1. Matrix M0 to M9 c an store matrices or vectors. For example, [[1,2],[3,4]] M0. Modes Modes variables store the modes settings that you can configure using MODES . Notepad Notepad variables store notes. Program Progr am variables store programs. Real A to Z an d θ. Fo r e xa m p l e, 7 . 45 A . Symbolic E0â¦9 , S1â¦S5, s1â¦s5 and n1â¦n5. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
17-8 Variables and memory management Aplet variables Most aplet va riables stor e values that a re unique to a particular aplet. These include symbolic expressions and equations (see below), settings for the Plot and Numeric views, and the results of some calculations such as roots and intersections. See the Reference Information chapter for more information about aplet variables. To access an aplet variable 1. Open the aplet that con tains the var iable y ou w ant to rec a l l. 2 . Pres s to display the V ARS menu . 3 . Use the ar r ow k e y s to select a v ar iable category in the left column, then press to ac cess the vari ables in the ri ght column. 4. Use the ar r ow k eys t o select a v ar iable in the ri ght column. 5 . T o copy the name of the var iable on to the edit line, pres s . ( is the default setting .) 6. T o copy the value o f the var iable into the edit line, pres s and pres s . Category A v ailable names Function F0 to F9 (Symbolic view). See âFunction aplet variablesâ on pa ge R-7. Parametric X0, Y0 to X9, Y9 (Symbolic view). See âParametric aplet variablesâ on page R-8. Polar R0 to R9 (Symbolic view). See âPolar aplet variablesâ on pa ge R-9. Sequence U0 to U9 (Symbolic view). See âSequence aplet variablesâ on page R-10. Solve E0 to E9 (Symbolic view). See âSolve aplet variablesâ on pa ge R-11. Statistics C0 to C9 (Numeric view). See âStatistics aplet variablesâ on page R-12. hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Variables and me mory management 17-9 Memory Manager You can use the Memory Manager to determine the amount of available memory on the calculator. You can also use Memory Manager to organize memory. For example, if the available memory is low, you can use the Memory Manager to determine which aplets or variables consume large amounts of memory. You can make deletions to free up memory. Example 1. Start the Memory Manager . A list of var iable categor ies is displa y ed. MEMORY F ree memory is display ed in the top ri ght corner and the body of the sc reen lists each category , the memory it uses, and the percen tage of the total memory it uses. 2 . Selec t the category with w hic h you w ant to w ork and pres s . Memory M anager display s memory details of v ari ables w ithin the category . 3 . T o delete v aria bles in a category: â Press to delete the selec ted var iable . â Press CLEAR to delet e all var iables in the select ed category . hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Matrices 18-1 18 Matrices Introduction You can perform matrix calc ulations i n HOME and in programs. The matrix and each row of a matrix appear in brackets, and the elements and rows are separated by commas. For example, the following matrix: is displayed in the history as: [[1,2,3],[4,5,6]] (If the Decimal Mark mode is set to Comma , then separate each element and each row with a period.) You can enter matrices directly in the command line, or create them in the matrix editor. Vectors Vectors are one-dimensional arrays. They are composed of just one row. A vector is represented with single brackets; for example, [1,2,3]. A vector can be a real number vector or a complex number vector, for example [(1,2), (7,3)]. Matrices Matrices are two-dimensional ar rays. They are composed of more than one row and more than one column. Two-dimensional matrices ar e represented with nested brackets; for example, [[1,2,3],[4,5,6]]. You can create complex matrices, for example, [[(1,2), (3,4)], [(4 ,5), (6,7)]]. Matrix Variables There are ten matrix variables available, named M0 to M9. You can use them in calculation s in HOME or in a program. You can retrieve th e matrix names from the VARS menu, or just type th eir names from the keyboard. 123 456 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
18-2 Matri ces Creating and storing matrices You can create, edit, delete, send, and receive matrices in the Matrix catalog. To open the Matrix catalog, press MATRIX . You can also create and store matricesânamed or unnamedâ-in HOME. For example, the command: POLYROOT([1,0,â1,0]) XM1 stores the root of the complex vector of length 3 into the M1 variable. M1 now contains the three roots of Matrix Catalog keys The table below lists the operations of the menu keys in the Matrix Catalog, as well as the use of Delete ( ) and Clear ( CLEAR ). To create a ma trix in the Matrix Catalog 1. Pres s MATRIX to open the Matri x Catalog . The Matri x catalog lists the 10 a vaila ble matri x v ari ables, M0 to M9 . x 3 x â0 = Key M e a n i n g Opens the highlighted matrix for editing. Prompts for a matrix type, then opens an empty matrix with the highlighted name. Transmits the highlighted matrix to another HP 40gs o r a disk drive. See. Receives a ma trix from an other HP 40gs or a disk drive. See . Clears the highlighted matrix. CLEAR Clears all matrices. or Moves to the end or the beginning of the catalog. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Matrices 18-3 2 . Highli ght the matr ix v aria ble name you w ant to use and pres s . 3 . Select the ty pe of matr ix t o cr eate . â For a ve ct or (one -dimension al array) , select Real vector or Complex vector . Certain oper ations ( , â , CRO SS ) do not r ecogni ze a one-dimensi onal matr i x as a v ect or , so th is se lect ion i s imp or tant. â For a ma trix (two-dime nsional array) , select Real matrix or Complex matrix . 4. F or each element in the matr ix , type a number or an expr ession , and pres s . (The e xpr essio n may not contain s y mbolic va riable name s.) For co m p l ex n um b er s , ente r each n umber in comple x form; that is , (a, b) , wher e a is the r eal part and b is the imaginary par t. Y ou must include the par entheses and the comma . 5 . Use the c urs or ke y s to mov e to a differ ent ro w or column. Y ou can change the dir ection o f the highlight bar by pr essing . The men u ke y toggles between the f ollo w ing three opti ons: â spec ifie s that the cur sor mov es to the cell belo w the cur ren t cell when y ou pr ess . â spec ifies that the c ursor mo v es to the cell to the ri ght of the c urr ent cell w hen y ou pre ss . â sp ecif ies that the cur sor sta y s in the cur r ent cell when yo u press . 6. When done , pr ess MATRIX to see the Matr i x catalog , or pre ss to retur n to HOME . The matri x entr ies ar e automatically s tor ed. A matrix is listed with two dimensions, even if it is 3Ã1. A vector is listed with the number of elements, such as 3. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
18-4 Matri ces To transmit a matrix You can send matrices between calculators just as you can send aplets, programs, lists, and notes. 1. Connec t the calculat ors using an appr opri ate cable . 2 . Open the Matr ix catalogs on both calc ulators. 3 . Highlig ht the matri x to send . 4. Pres s and choose the method of sending . 5 . Press on the recei v ing calculator and choose the method of r ecei v ing. F or mor e infor mation on se nding and recei ving files , see âSending and recei v ing aplets â on page 22 - 4. Working with matrices To edit a matrix In the Matrix catalog, highli ght the name of the matrix you want to edit and press . Matrix edit keys The following table lists the matrix edit key o perations. Key M e a n i n g Copies the highlighted element to the edit line. Inserts a row of zeros above, or a column of zeros to the left, of the highlighted cell. (You are prompted to choose row or column.) A three-way toggle for cursor advancement in the Matrix editor. advances to the right, ¸ advances downward, and does not advance at all. Switches between larger and smaller font sizes. Deletes the highlighted cells, row, or column (you are prompted to make a choice). CLEAR Clears all elements from the matrix. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Matrices 18-5 To display a matrix ⢠In the Matri x catalog ( MATRIX ) , highlight the matri x name and pr ess . ⢠In HOME , enter the name of the matri x var iable and pres s . To display one element In HOME, enter matrixname ( row,column ). For example, if M2 is [[3,4],[5,6]] , then M2(1,2) returns 4 . To create a matrix in HOME 1. Enter the matr i x in the edit line. S tart and end the matri x and each r o w with square brac kets (the shif ted and key s) . 2 . Separate each element and each r ow w ith a comma . Example: [[1,2],[3, 4]] . 3 . Pre ss to enter and displa y the matri x. The left screen below shows the matrix [[2.5,729],[16,2]] being stored into M5. The screen on the right shows the vector [66,33,11] being stored into M6. Note that you can enter an expression (like 5/2) for an element of the matrix, and it will be evaluated. Moves to the first row, last row, first column, or last column respectively. K e y Meani ng (Continued) hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
18-6 Matri ces To store one element In HOME, enter, value matrixname ( row, column ). For example, to change the element in the first row and second column of M5 to 728, then display the resulting matrix: 728 M 512 M5 . An attempt to store an element to a row or column beyond the size of the matrix results in an error message. Matrix arithmetic You can use the arithmetic functions ( , â, Ã, / and powers) with matrix arguments. Division left-multiplies by the inverse of the divisor. You can enter the matrices themselves or enter th e names of stor ed matrix variab les. The matrices can be real or complex. For the next examples, store [[1,2],[3,4]] into M1 and [[5,6],[7,8]] into M2. Example 1. Create the f irst matr ix. MATRIX 1 2 3 4 2 . Cr eate the second matr ix . MATRIX 5 6 7 8 3 . Add the matr ices that you c re at e d. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Matrices 18-7 M1 M2 To multiply and divide by a scalar For division by a scalar, enter the matrix first, then the operator, then the scalar. For multiplication, the order of the operands does not matter. The matrix and the sc alar can be real or complex. For example, to divide the result of the previous example by 2, press the following keys: 2 To multiply two matrices To multiply the two matrices M1 and M2 that you created for the previous example, press the following keys: M1 M 2 To multiply a matrix by a vector, enter the matrix first, then the vector. The number of elements in the vector must equal the number of columns in the matrix. To raise a matrix to a power You can raise a matrix to any power as long as the power is an integer. The following example shows the result of raising matrix M1, created earlier, to the power of 5. M1 5 Note: You can also raise a matrix to a power without first storing it as a variable. Matrices can be raised to ne gative powers. In this case, the result is equivalent to 1/[matrix]^ABS(power). In the following example, M1 is raised to the power of â2. M1 2 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
18-8 Matri ces To divide by a square matrix For division of a matrix or a vector by a square matrix, the number of rows of the dividend (or the number of elements, if it is a vector) must equal the number of rows in the divisor. This operation is not a mathematical division: it is a left- multiplication by the inverse of the divi sor. M1/M2 is equivalent to M2 â1 * M1. To divide the two matrices M1 and M2 that you created for the previous example, press the following keys: M1 M2 To invert a matrix You can invert a square matrix in HOME by typing the matrix (or its variable name) and pressing x â1 . Or you can use the matrix INVERSE command. Enter INVERSE ( matrixna me ) in HOME and press . To negate each element You can change the sign of each element in a matrix by pressing before the matrix name. Solving systems of linear equations Example Solve the following linear system: 1. Open the Matri x catalog and cr eate a vec to r . MATRIX 2 . Cr eate the vec tor of the constants in the line ar sy stem. 5 7 1 2 x 3 y 4 z 5 xy z â 7 4 xy â2 z 1 = = = hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Matrices 18-9 3 . Retu rn to the Matri x Cat al og. MATRIX In this ex ample , the vec tor you c reated is listed a s M1. 4. Creat e a new matr ix . Select Real matrix 5 . Enter the eq uation coeffi ci ents. 23 4 11 1 4 12 In this ex ample , the matr ix y ou c reat ed is listed as M2 . 6. Re turn to HOME and ent er the calculati on to left-multipl y the constants v ector b y the in vers e of the coeff ic ients matr i x. M2 x â1 M1 The result is a vector of the solution s x = 2, y = 3 and z = â2. An alternative method, is to use the RREF function. See âRREFâ on page 18-12. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
18-10 Matric es Matrix functions and commands About functions ⢠Fu n c t io n s c a n b e u s e d i n a n y a p l e t o r i n H O M E. Th e y are lis ted in the MA TH menu under the Matr i x category . The y can be used in mathematical expr essions âprimaril y in HOMEâas w ell as in progr ams. ⢠F unctio ns alw ay s pr oduce and displa y a r esult . The y do not change an y stor ed vari ables, such as a matr ix vari ab l e. ⢠F unctions ha ve ar guments that ar e enclos ed in parenthes es and separated b y commas; f or ex ample , CROSS ( vect or 1 , vect o r2 ) . The matr ix in put can be either a matr ix v ari able name (such as M1 ) or the actual matri x data inside brac ke ts. F or e xample , CROSS(M1,[1,2]) . About commands Matrix commands are listed in the CMDS menu ( CMDS ), in the matrix category. See âMatrix commandsâ on page 21-24 for details of the matrix commands available for use in programming. Functions differ from commands in that a function can be used in an expression. Commands cannot be used in an expression. Argument conventions ⢠For row # or column# , supply the n umber of the r ow (counting fr om the top , starting with 1) or the number of the column (counting fr om the left, starting w ith 1) . ⢠The ar gument matri x can re fer to e ither a ve ctor or a matr ix . Matrix functions COLNORM Column Norm. Finds the maximum value (over all columns) of the sums of the absolute values of all elements in a column. COLNORM ( matr ix ) hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Matrices 18-11 COND Condition Number. Finds the 1-norm (column norm) of a square matrix . COND ( matri x ) CROSS Cross Product of vector1 with vecto r2 . CROSS ( vec to r1 , ve ct or 2 ) DET Determinant of a square matrix . DET ( matri x ) DOT Dot Product of two arrays, matrix1 matrix2 . DOT ( matri x1, matri x2 ) EIGENVAL Displays the eigenvalue s in vector form for matrix . EIGENVAL ( matri x ) EIGENVV Eigenvectors and Eige nvalues for a square matrix . Displays a list of two arra ys. The first contains the eigenvectors and the second contains the eigenvalues. EIGENVV ( matri x ) IDENMAT Identity m atrix. Creates a square matrix of dimension size à si ze whose diagonal elements are 1 and off- diagonal elements are zero. IDENMAT ( siz e ) INVERSE Inverts a square matrix (real or complex). INVERSE ( matri x ) LQ LQ Factor ization. Factors an m à n matrix into three matrices: {[[ m à n lowertrapezoidal ]],[[ n à n orthogonal ]], [[ m à m permutation ]]}. LQ ( matri x ) LSQ Least Squares. Displays the minimum norm least squares matrix (or vector ). LSQ ( matri x1, matri x2 ) hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
18-12 Matric es LU LU Deco mposition. Factors a square matrix into three matrices: {[[ lowertriangular ]],[[ uppertriangular]],[[ permutation ]]} The uppertriangular has ones on its diagonal. LU ( matri x ) MAKEMAT Make Matr ix. Creates a matrix of dimension rows à columns , using expression to calculate each element. If expression contains the variables I and J, then the calculation for each element substitutes the current row number for I and the current column number for J. MAKEMAT ( ex p re s s io n, rows , columns) Example MAKEMAT(0,3,3) r eturns a 3Ã3 z er o matri x , [[0,0,0],[0,0,0],[0,0,0]] . QR QR Factorization. Factors an m à n matrix into three matrices: {[[ m Ãm orthogonal ]], [[m Ãn uppertrapezoidal ]],[[ n à n permutation ]]}. QR ( matri x ) RANK Rank of a rectangular matrix . RANK ( matri x ) ROWNORM Row Norm . Finds the maximum value (over all rows) for the sums of the absolute values of all elements in a row. ROWNORM ( matri x ) RREF Reduced-Row Echelon Form. Changes a rectan gular matrix to its reduced row-echelon form. RREF ( matri x ) SCHUR Schur Decomposition. Factors a square matri x into two matrices. If matrix is real, then the result is {[[ orthogonal ]],[[ upper-quas i triangular ]]}. If matrix is complex, then the result is {[[ unitary ]],[[ upper-triangular ]]}. SCHUR ( matri x ) SIZE Dimensions of matrix . Retur ned as a list: {rows,columns}. SIZE ( matri x ) hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Matrices 18-13 SPECNORM Sp ectral Norm of matrix . SPECNORM ( matri x ) SPECRAD Spectr al Radius o f a square matri x . SPECRAD ( matri x ) SVD Singular Value Decomp osition. Factors an m à n matrix into two matrices and a vector: {[[ m à m square orthogonal ]],[[ n à n square orthogonal]], [ real ]}. SVD ( matri x ) SVL Singular Values. Returns a vector containing the singular values of matrix. SVL ( matri x ) TRACE Finds the trace of a square matrix. The trace is equal to the sum of the diagonal elements. (It is also equal to the sum of the eigenvalues.) TRACE ( matri x ) TRN Transposes matr ix . For a complex matrix, TRN finds the conjugate transpose. TRN ( matri x ) Examples Identity Matrix You can create an identity matrix with the IDENMAT function. For example, IDENMAT(2) creates the 2Ã2 identity matrix [[1,0],[0,1]]. You can also create an identity matrix using the MAKEMAT ( make matrix ) function. For example, entering MAKEMAT(I¼J,4,4) creates a 4 à 4 matrix showing the numeral 1 for all elements except zeros on the diagonal. The logical operator ¼ returns 0 when I (the row nu mber) and J (the column number) are equal, and returns 1 when they are not equal. Transposing a Matrix The TRN function swaps the row-column and column-row elements of a matrix. For instance, element 1,2 (row 1, hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
18-14 Matric es column 2) is swapped with element 2,1; element 2,3 is swapped with element 3,2; and so on. For example, TRN([[1,2],[3,4]]) creates the matrix [[1,3],[2,4]] . Reduced-Row Echelon Form The following set of equations can be written as the augmented matrix which can then stored as a real matrix in any matrix variable. M1 is used in this example. You can use the RREF function to change this to reduced row echelon form, storing it in any matrix variable. M2 is used in this example. The reduced row echelon matrix gives the solution to the linear equation in the fourth column. An advantage of using the RREF function is that it will also work with inconsistent matrices resulting from syst ems of equations which have no solution or infinite solutions. For example, the following set of equations has an infinite number of solutions: x 2 y â3 z 1 4 2 xy z â 3 4 x â 2 y â2 z 1 4 = = = 12 â3 1 4 21 1 â3 â 42 â2 1 4 34 Ã xy z â 5 2 xy â7 x 2 y â z 2 = = = hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Matrices 18-15 The final row of zeros in the reduced-row echelon form of the augmented matrix indicates an inconsistent system with infinite solutions . hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Lists 19-1 19 L ists You can do list operations in HOME and in programs. A list consists of comma-separated real or complex numbers, expressions, or matr ices, all enclosed in braces. A list may, for example, contain a sequence of real numbers such as {1,2,3} . (If the Decimal Mark mode is set to Comma , then the separators are periods.) Lists represent a convenient way to group related objects. There are ten list variables available, named L0 to L9. You can use them in calculations or expressions in HOME or in a program. Retrieve the list names from the VAR S menu, or just type their names from the keyboar d. You can create, edit, delete , send, and re ceive named lists in the List catalog ( LIST ). You can also create and store listsânamed or unnnamedâin HOME lists List variables are identical in behaviour to the columns C1.C0 in the Statistics aplet. You can store a statistics column to a list (or vice versa) and us e any of the list functions on the statistics columns, or the statistics functions, on the list variables. Create a list in the List Catalog 1. Open the List catalog. LIST . 2 . Hi ghlight the list name you w ant to assign to the new list (L1, etc.) and press to display the List editor . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
19-2 Lists 3. En ter t he va lues you want i n th e l ist, pressin g after each one. V alues can be r eal or comple x number s (or an expr ession). If you enter a calculati on, it is ev aluated and the re sult is inserted in the list . 4. When done , pr ess LIST to see the List catalog, or pres s to re turn to HOME . List catalog keys The list catalog keys are: Key M e a n i n g Opens the highlighted list for editing. Transmits the highlighted list to another HP 40gs or a PC. See âSending and receiving apletsâ on page 22-4 for further information. Receives a list from another HP 40gs or a PC. See âS ending and receiving apletsâ on page 22-4 for further information. Clears the highlighted list. CLEAR Clears all lists. or Moves to the end or the beginning of the catalog. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Lists 19-3 List edit keys When you press to create or change a list, the following keys are available to you: Create a list in HOME 1. Enter the list on the edit line. Start and end t he list w ith brace s (the shifted and ke ys) and separate each element w ith a comma. 2 . Pres s to evaluate and display the li st. Immediatel y after typ ing in the list, y ou can store it in a var iable by pressing lis tname . The list va riable name s ar e L0 throug h L9 . This example st ores the list {2 5,14 7 , 8} in L1. Note: Y ou can omit the final brace w hen enter ing a list. Key M e a n i n g Copies the highlighted list item into the edit line. Inserts a new value before the highlighted item. Deletes the highlighted item from the list. CLEAR Clears all elements from the list. or Moves to the end or the beginn ing of the list. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
19-4 Lists Displaying and editing lists To display a list ⢠In the List catalog , highligh t the list name and pres s . ⢠In HOME , enter the name of the list and pr ess . To display one element In HOME, enter listname ( element# ). For example, if L2 is {3,4,5,6}, then L2(2) returns 4 . To edit a list 1. Open the List catalog. LIST . 2 . Pr ess or to highlight the name of the list y ou want to edit (L1, etc.) and press to display the list contents. 3 . Press or to highlight the element you want to edit. In this ex ample , edit the thir d element so that it has a value of 5 . 5 4. Pres s . hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Lists 19-5 To insert an element in a list 1. Open the List catalog. LIST . 2. P r e s s o r t o highligh t the name of the list y ou wan t to edit (L1, etc.) and pr ess to display the lis t contents . New elements are inserted above the highlighted positio n. In this example, an element, with the value of 9, is inserted between the first and second elements in th e list. 3 . Pre ss to the insertion position, then pres s , and p re ss 9. 4. Pres s . To store one element In HOME, enter value listname ( element ) . For example, to store 148 as the second element in L1, type 148 L1(2) . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
19-6 Lists Deleting lists To delete a list In the List catalog, highli ght the list name and press . You are prompted to confirm that you want to delete the contents of the highlighted list variable. Press to delete the contents. To delete all lists In the List catalog, press CLEAR . Transmitting lists You can send lists to calculators or PCs just as you can aplets, programs, matrices, and notes. 1. Conne ct the calc ulators using an a ppropr iate cable). 2 . Open the L ist catalogs on both calc ulators . 3 . Highlig ht the list to send . 4. Pres s and choose the method of sending . 5 . Press on the recei v ing calculator and choose the method of r ecei v ing. F or mor e infor mation on se nding and recei ving files , see âSending and recei v ing aplets â on page 22 - 4. List functions List functions are found in the MATH menu. You can use them in HOME, as well as in programs. You can type in the name of the function, or you can copy the name of the function from the List category of the MATH menu. Press (the alpha L character key). This highlights the List category in the left column. Press to move the cursor to the right column which contain the List functions, select a function, and press . List functions have the following syntax: ⢠F unctions ha ve ar guments that ar e enclos ed in parenthes es and separated b y commas. Example: CONCAT(L1,L2) . An argument can be either a list hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Lists 19-7 var iable name (su ch as L1) or the actual list . F or ex ample , REVERSE({1,2,3}) . ⢠If Dec imal Mark in Modes is set to C omma, use peri ods to separ ate arguments . F or e xample , CONCAT(L1.L2) . Common operators like , â, Ã, and / can take lists as arguments. If th ere are two ar guments a nd both are lists, then the lists must have the same length, since the calculation pairs the elements . If there are two arguments and one is a real number, then the c alculation pairs the number with each element of the list. Example 5 * {1,2,3} ret u r ns {5,10,15} . Besides the common operators that can take numbers, matrices, or lists as arguments, there are commands that can only operate on lists . CONCAT Concatenates two lists into a new list. CONCAT( list1 , list2 ) Example CONCAT({1,2,3},{4}) ret u r n s {1,2,3,4} . Î LIST Creates a new list composed of the first differences, that is, the differences between the seque ntial elements in list1. The new list has one fewer elements than list1 . The first differences for {x 1 x 2 ... x n } are {x 2 âx 1 ... x n âx nâ1 } . Î LIST( list1 ) Example In HOME, store {3,5,8,12,17,23} in L5 and find the first differences for the list. { 3,5,8 ,12 ,17 ,2 3 } L 5 L Select Î LIST L5 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
19-8 Lists MAKELIST Calculates a sequence of elements for a new list. Evaluates expression with variable from begin to end values, taken at increment steps. MAKELIST( expression , va ria b le , begin , end , incr ement ) The MAKELIST function generates a series by automatically producing a list from the repeated evaluation of an expression. Example In HOME, generate a series of squares from 23 to 27. L Select MAKELIST A A 2 3 27 1 Î LIST Calculates the product of all elements in list. Î LIST( list ) Example Î LIST({2,3,4}) ret u r n s 24 . POS Returns the position of an element within a list. The element can be a value, a variable, or an expression. If there is more than one instance of the element, the position of the first occurrence is returned. A value of 0 is returned if there is no occurrence of the specified element. POS( list, element ) Example POS ({3, 7, 12, 19},12) returns 3 REVERSE Creates a list by reversing the order of the elements in a list. REVERSE( list ) hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Lists 19-9 SIZE Calculates the number of elements in a li st. SIZE( list ) Also works with matrices. Σ LIST Calculates the sum of all elements in list. Σ LIST( list ) Example Σ LIST({2,3,4}) ret u rn s 9 . SORT Sor ts elements in ascending or der. SORT( list ) Finding statistical values for list elements T o f i n d v a l u e s s u c h a s t h e mean, median, maximum, and minimum values of the elements in a list, use the Statistics aplet. Example In this example, use the Statistics aplet to find the mean, median, maximum, and minimum values of the elements in the list, L1. 1. Creat e L1 with v alues 88 , 90, 8 9 , 65, 7 0, and 8 9 . { 88 9 0 89 65 70 89 } L1 2 . In HOME , stor e L1 into C1. Y ou w ill then be able to see the lis t data in the Numeri c vie w of the Sta ti st ics ap le t. L1 C1 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
19-10 Lists 3 . Start the S tatistic s aplet, and se lect 1-var iable mode (pre ss , if necessary , to displa y ). Select Statistics Note: Y our list values are no w in column 1 (C1). 4. In the S ymbo lic vi ew , define H1 (for e xam ple) as C1 (sample) and 1 (f req uency). 5 . Go to the Numeri c vie w to displa y calc ulated statistic s. See âOne-var iable â on page 10-14 for the meaning of each comp uted statistic . hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-1 20 Notes and sk etch es Introduction The HP 40gs has text and pi cture editors for entering notes and sk etches. ⢠E ach aplet has its o wn independent No te vie w and Sk etch vi e w . Notes and sk etc hes that y ou c reat e in these vi ews ar e associ ated with the aplet. When you sav e the aplet , or send it to another calc ulator , the notes and sketches ar e sav ed or sent as well . ⢠The Notepad is a collection of no tes independent of all aplets. Thes e notes can also be sent to another calc ulator v ia the Not epad Catalog . Aplet note view You can attach text to an aplet in its Note view. To write a note in Note view 1. In an aplet, pr ess NOTE for the No te v iew . 2 . Us e the note editing k e ys sho w n in the table in the follo wing secti on. 3 . Set Alpha loc k ( ) for qui ck entry of letters. F or lo wer case A lpha lock, pr ess . 4. While Alpha lock is on: â T o type a single letter of the opposite cas e , pre ss letter . â T o type a single n on-alpha char acte r (such a s 5 or [ ), press fir st. (This turns off A lpha lo ck fo r on e ch ara cte r . ) Y our w ork is aut omaticall y sav ed. Pr ess an y vi ew k ey ( , , , ) or to ex it the Notes vie w . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
20-2 Notes and sketches Note edit keys Key M e a n i n g Space key for text entry. Displays next page o f a multi-page note. Alpha-lock for letter entry. Lower-case alpha-lock for letter entry. Backspaces cursor and deletes character. Deletes current character. Starts a new line. CLEAR Erases the entire note. Menu for entering variable names, and contents of variables. Menu for entering math operations, and constants. CMDS Menu for entering program commands. CHARS Displays special characters. To type one, highlight it and press . To copy a character without closing the CHARS screen, press . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-3 Aplet sketch view You can attach pictures to an aplet in its Sketch view ( SKETCH ). Y our w ork is aut omatically s av ed with the aplet . Pres s any other v ie w ke y or to ex it the Sketc h vie w Sketch keys To draw a line 1. In an aplet, pr ess SKETCH for the Sk etch v iew . 2 . In Sk etch v ie w , pres s and mo ve the c ursor to wher e y ou wa nt to start the line 3 . Pres s . This turns on line-dra wing . 4. Mo ve the c ursor in an y dir ection t o the end point of the line by pr essing the , , , k ey s. 5 . Press to f inish the li ne. Key M e a n i n g Stores the specified portion of the current sketch to a graphics variable (G1 through G0). Adds a new, blank page to the current sketch set. Displays next sketch in the sketch set. Animates if held down. Opens the edit line to type a text label. Displays the menu-key labels for drawing. Deletes the current sketch. CLEAR Erases the entire sketch set. Toggles menu key labels on and off. If menu key labels are hidden, or any menu key, redisplays the menu key labels. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
20-4 Notes and sketches To draw a box 1. In Sketch v ie w , pres s and mov e the c ursor to wher e you w ant any corner of the box to be . 2. P r e s s . 3 . Mov e the cur sor to mark the oppo site corner for the box . Y ou can adj ust the si ze o f the box by mo v ing the cu rs or. 4. Pre ss to f inish the box . To draw a circle 1. In Sketc h vi ew , press and move the c ursor to wher e you w ant the center of the cir cle to be. 2 . Pr ess . This tur ns on c ir cle dr aw ing. 3 . Mov e the curs or the distance of the radius. 4. Pr ess to dr a w the cir c le. DRAW keys Key M e a n i n g Dot on. Turns pixels on as the cursor moves. Dot off. Turns pixels off as the cursor moves. Draws a line from the cursorâs starting position to the cursorâs current position. Press when you have finished. You can draw a line at any angle. Draws a box from the cursorâs starting position to the cursorâs current position. Press when you have finished. Draws a circle with the cursorâs starting position as the center. The radius is the distance between the cursorâs starting and ending position. Press to draw the circle. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-5 To label parts of a sketch 1. Pres s and type the te xt on the edit line . T o lock the Alpha shift on, pr ess (for upper case) or (fo r low er case). T o make the label a smaller c har acter si ze , turn o ff befor e pr essing . ( is a toggle betwee n small and large f ont si z e). The smaller char acte r siz e cannot display lo wer case letter s. 2. P r e s s . 3 . P osition the label w her e you w ant it by pr essing the , , , ke y s. 4. Pres s again to affi x the label. 5. P re s s t o c o n t i n u e dra wing , or press to ex it the Sk etch v iew . To create a set of sketches You can create a set of up to ten sketches. This allows for simple animation. ⢠After making a sk etch , press to add a new , blank page. Y ou can now mak e a new sk etc h, w hic h becomes part of the c urr ent set o f ske tches . ⢠T o vie w the next sk etch in an ex isting set , press . Hold dow n for animati on. ⢠T o r emove the c urr ent page in the curr ent sketch seri es, pre ss . To store int o a graphics variable You can define a portion of a sketch inside a box, a nd then store that graphic into a graphic s variable. 1. In the Sk etch v iew , display the sk etch y ou w ant to copy (stor e into a variable). 2. P r e s s . 3 . Highli ght the var iable name y ou w ant to us e and pres s . 4. Dra w a bo x around the portion y ou w ant to copy : mov e the c ursor to one corner , press , then mo ve the cursor to the opposite corner , and press . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
20-6 Notes and sketches To import a graphics variable You can copy the contents of a graphics v ariable into the Sketch view of an aplet. 1. Open the Sketch v iew o f the aplet ( SKETCH ). The gr aphic w ill be copied her e. 2 . Pr ess , . 3 . Highli ght Graphic , then pr ess and highlight the name of the var iable ( G1 , etc .) . 4. Pr ess to recall the contents o f the gr aphics vari ab l e. 5 . Mov e the b ox to w here y ou would like to copy the gra phic , then pre ss . The notepad Subject to available memory , you can store as many notes as you want in the Notepad ( NOTEPAD ). These notes are independent of any aplet. The Notepad catalog lists the existing entries by name. It does not include notes that were created in apletsâ Note view s , but these can be imported. See âTo import a noteâ on page 20-8 . To create a note in the Notepad 1. Displa y the Notepad catalog. NOTEPAD 2 . Cr eate a new n ote . 3 . Enter a name f or y our note. MYNO TE hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Notes and sketches 20-7 4. W rite your note . See âNote edit k e ys â on page 20 - 2 for mor e infor mation on the entry and editing of notes. 5 . When you ar e finished, press or an aplet key to e xit Not epad. Y our wor k is automaticall y sa ved . Notepad Catalog keys Key M e a n i n g Opens the selected note for editing. Begins a new note, and asks for a name. Transmits the selected note to another HP 40gs or PC. Receives a note being transmitted from another HP 40gs or PC. Deletes the selected note. CLEAR Deletes all notes in the catalog. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
20-8 Notes and sketches To import a note You can import a note from the Notepad i nto an apletâs Note view, and vice versa. Suppose you wan t to copy a note named âAssignmentsâ fr om the Notepad into the Function Note view: 1. In the F unction aplet , displa y the Note v ie w ( NOTE ). 2 . Pr ess , highlight Note pad in the left column, then highli ght the name â Assignments â in the ri ght column . 3 . Pre ss to copy the contents o f â Assignments â to the F uncti on Note v iew . Note: T o recall the name instead o f the contents, pres s instead o f . Suppose you want to copy the Note view from the current aplet into the note, Assignments, in the Notepad. 1. In the Notepad ( NOTEPAD ), open the note, â Assignments â . 2 . Pr ess , highlight Note in the left column, then pr ess and highlight Note Text in the ri ght column . 3 . Pr ess to recall the cont ents of the Note vi ew into the not e â A ssignments â . hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Programming 21-1 21 Pr ogramming Introduction This chapter describes how to program using the HP 40gs. In this chapter youâll learn about: ⢠using the Pr ogram catalog to c reat e and edit progr ams ⢠progr amming commands ⢠stor ing and re trie v ing var iables in pr ograms ⢠progr amming v ariables . HINT More information on programming, including examples and special tools, can be found at HPâs calculators web site: http://www.hp.com/calcula tors The Contents of a Program An HP 40gs program contains a sequence of numbers, mathematical expressions, and commands that execute automatically to perform a task. These items are separated by a colon ( : ). Commands that take multiple arguments have those arguments separated by a semic olon ( ; ). For example, PIXON xposition ; yposition: Structured Programming Inside a program you can use branching struct ures to control the execution flow. You can take advantage of structured programming by creating building-block programs. Each building -block program stands aloneâand it can be called from other programs. Note: If a program has a sp ace in it s name then you have to put quotes around it when you want to run it . hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
21-2 Programming Example RUN GETVALUE: RUN CALCULATE: RUN " SHOW ANSWER" : This program is separated into three main tasks, each an individual program. Within each program, the task can be simpleâor it can be di vided further into other programs that perform smaller tasks. Program catalog The Program catalog is wher e you create, edit, delete, send, receive, or run progra ms. This section describes how to ⢠open the Progr am catalog ⢠cr eate a ne w pr ogram ⢠enter commands fr om the program co mmands menu ⢠enter f unctions f rom the MA TH menu ⢠edit a pr ogram ⢠run and debu g a progr am ⢠stop a pr ogram ⢠copy a pr ogram ⢠send and recei v e a progr am ⢠delete a progr am or its contents ⢠cus tomi z e an aplet. Open Program Catalog 1. Pres s PROGRM . The Pr ogra m Catalog display s a list o f progr am names. The Pr ogram C atalog contains a built-in entr y called Editline . Editline contains the la st expr es sion that y ou enter ed fr om the edit line in HOME , or the last data y ou enter ed in an inpu t for m. (If y ou pr ess fr om HOME w ithout entering an y data, the HP 40g s runs the conten ts of Editline .) Bef ore st arting to work w ith progr ams, you should tak e a fe w minutes to become f amiliar with the Progr am catalog menu k e ys . Y ou can use any o f the follo w ing ke ys (both menu and k e yboar d) , to perform tasks in the Pr ogram cata log. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Programming 21-3 Program catalog keys The program catalog keys are: Key M e a n i n g Opens the highlighted program for editing. Prompts for a new program name, then opens an empty program. Transmits the highlighted program to another HP 40gs or to a disk drive. Receives the highlighted program from another HP 40gs or from a disk drive. Runs the highlighted program. or Moves to the beginning or end of the Program catalog. Deletes the highlighted program. CLEAR Deletes all programs in the program catalog. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
21-4 Programming Creating and editing programs Create a new program 1. Pres s PROGRM t o open the Progr am catalog . 2. P r e s s . The HP 40gs prompts you f o r a n a m e. A progr a m name can contain spec ial c harac ters, such as a space . How ev er , if you use spec ial char acter s and then run the pr ogram b y typing it in HOME , you mu st enclo se the progr am name in double quotes ( " " ). Don't use the " s ymbol within y our progr am name . 3 . T ype y our progr am name , then pres s . When yo u press , the Progr am E ditor opens. 4. Enter y our pr ogram . When done , start an y other acti vity . Y our w ork is sav ed au tomaticall y . Enter commands Until yo u become familiar with the HP 40gs commands, the easiest way to enter comma nds is to select them from the Commands menu from the Program editor. You can also type in commands using alpha characters. 1. Fr om the Pr ogra m editor , pre ss CMDS to open the Progr am Commands men u. CMDS hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Programming 21-5 2 . On the left , use or t o highlight a command category , then press to access the commands in the category . Select the command that y ou want . 3 . Pres s to paste the command into the pr ogr am editor . Edit a program 1. Press PROGRM to open the Progr am catalog. 2 . Us e the arr o w ke y s to highligh t the progr am y ou wan t to edit, and press . The HP 40gs opens the Progr am E ditor . The name of y our progr am appear s in the title bar of the displa y . Y ou can use the follo wing k ey s to edit y our pr ogram . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
21-6 Programming Editing keys The editing keys are: Key M e a n i n g Inserts the character at the editing point. Inserts space into text. Displays pre vious page of the program. Displays next page of the program. Moves up or down one line. Moves right or left one character. Alpha-lock for letter entry. Press A...Z to lock lower case. Backspaces cursor and deletes character. Deletes current character. Starts a new line. CLEAR Erases the entire program. Displays menus for selecting variable names, contents of variables, math functions, and program constants. CMDS Display s menus for selecting progr am conmmands. CHARS Di splays all characters. T o type one, highlight it and press . To enter several characters in a row, use the menu key while in the CHARS menu. hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
Programming 21-7 Using programs Run a program From HOME, type RUN program_name. or From the Program catalog, highlight the program you want to run and press Regardless of where you star t the program, all programs run in HOME. What you see will differ slightly depending on where you started the program. If you start the program from HOME, the HP 40gs displays the contents of Ans (Home variable containing the last result), when the program has finished. If you start the program from the Program catalog, the HP 40gs returns you to the Program catalog when the program ends. Debug a program If you run a program that contains errors, the program will stop and you will see an error message. To debug the program: 1. Pre ss to edit the pr ogram . The ins ert curs or appears in the pr ogr am at the point whe re the er r or occ urr ed. 2 . E dit the pr ogram t o fi x the err or . 3 . Run the pr ogr am. 4. Repeat the pr ocess until you cor r ect all err ors. Stop a program You can stop the running of a program at any time by pressing CANCEL (the key). Note: You may have to press it a couple of times. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
21-8 Programming Copy a program You can use the following procedure if you want to make a copy of your work before editingâor if you want to use one program as a template for another. 1. Pres s PROGRM t o open the Progr am catalog . 2. P r e s s . 3 . T ype a ne w file name , then choose . The Pr ogram E ditor opens with a new pr ogr am. 4. Pres s to open t he vari ables menu . 5 . Press to quickl y scr oll to Progr am. 6. Pr ess , then highli ght the pr ogr am you w ant to copy . 7 . Press , then pre ss . The co ntents of the hi ghlighted pr ogr am ar e copied into the c urr ent pr ogram at the c ursor locati on. HINT If you use a programming rou tine often, save the routine under a different program name, then use the above method to copy it into your programs. Transmit a program You can send programs to, and receive pr ograms from, other calculators just as you can send and receive aplets, matrices, lists, and notes. After connecting the calculators with an appropriate cable, open the Program catalogs on both calculators. Highlight the program to send, then press on the sending calculator and on the receiv ing calculator. You can also send programs to, an d receive programs from, a remote storage devi ce (aplet disk drive or computer). This takes place via a cable connection and requires an aplet disk driv e or specialized software running on a PC (such as a connectivity kit). hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
Programming 21-9 Delete a program To delete a program: 1. Pres s PROGRM to open the Progr am catalog. 2 . Hi ghlight a pr ogr am to delete , then pr ess . Delete all programs You can delete all programs at once. 1. In the Pr ogram catalog , pr ess CLEAR . 2. P r e s s . Delete the contents of a program You can clear the contents of a program without deleting the program name. 1. Pres s PROGRM to open the Progr am catalog. 2 . Highli ght a pr ogram , then pr ess . 3. P re s s CLEAR , then press . 4. The con tents of the pr ogr am are delet ed, but the progr am name r emains. Customizing an aplet You can customize an aplet and develop a set of programs to work with the aplet. Use the SETVIEWS command to create a custom VIEWS menu which links specially wr itten programs to the new aplet. A useful method for customizing an aplet is illustrated below: 1. Deci de on the built-in aplet tha t yo u want to cu stomiz e. F or ex ample you could customi z e the F unction aple t or the Statisti cs aplet . The c ustomi z ed aplet inher its all the pr operties of the built-in aplet . Sav e the c ustomi z ed aplet w ith a unique name . 2 . Cu stomi z e the ne w aplet if y ou need to, f or e xample by pr esetting axes or angle measur es . 3 . Dev elop the pr ograms to w or k with y our c usto miz ed aplet. When y ou dev elop the apletâs p r ograms, us e the standar d aplet naming con venti on. T his allow s y ou to ke ep trac k of the progr ams in the Pr ogram catalog tha t belong to each aplet. See â Aplet naming conv entio nâ on page 21-10. hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
21-10 Programm ing 4. Dev elop a progr am that use s the SETVIEWS command to modify the apletâs VIEW S menu . The menu options pr ovid e links to ass oci ated pr ograms . Y ou can spec ify any ot her progr ams that y ou want trans ferr ed w ith the aplet . See âSETVIEWSâ on page 21-14 for info rmation on the command . 5 . Ensur e that the cu stomi z ed aplet is select ed, then r un the menu conf igur ation pr ogram to conf igur e the apletâs VIEW S menu . 6. T est the cus tomi z ed aplet and debug the ass oci ated progr a ms. (R efer to âDebug a pr ogr am â on page 16 - 7) . Aplet naming convention To assist users in keeping tr ack of aplets and associated programs, use the following naming convention when setting up an apletâs programs: ⢠Start all pr ogram name s with an a bbre v iation of the aplet name . W e w ill use AP L in this ex ample . ⢠Name pr ograms called b y menu entr ies in the VIEW S menu number , after the entry , for ex ample: â APL.ME1 f or the pr ogram called b y menu optio n 1 â APL.ME2 f or the pr ogram called b y menu optio n 2 ⢠Name the pr ogram that conf igur es the new VIEW S menu option APL .S V wher e S V stands for SETVIEWS . For example, a customized aplet called âDifferentiationâ might call programs called DIFF.ME1, DIFF.ME2, and DIFF.SV. Example This example aplet is designed to demonstrate the process of customizing an ap let. The new aplet is based on the Function aplet. Note: This aplet is not intended to serve a serious use, merely to illustrat e the process. hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
Programming 21-11 Save the aplet 1. Open the Functi on aplet and sa ve it as âEXPERI MENT â . The ne w aplet appear s in the Aplet library . Select Function EXP ERIMENT 2 . Cr eate a progr am called EXP .ME1 w ith contents as shown . This progr am conf igur es the plot ranges , then runs a progr am that allo w s y ou to set the angle f ormat . 3 . Create a pr ogr am called EXP .ME2 w ith contents as shown . This progr am sets the numer ic v iew opti ons for the a plet, and runs the progr am that you can use t o confi gure the angle mode. 4. Create a pr ogr am called EXP .ANG wh ich the pre viou s two progr ams c all. 5 . Create a pr ogr am called EXP .S w hic h runs when y ou start t he aplet , as sho wn . This progr am sets the angle mode to degrees , and sets up the initi al functi on that the aplet plots . Configuring the Setviews menu option programs In this secti on we w ill begin by conf igur ing the VIEW S menu by using the SETVIEW S command. W e w ill then cr eate the âhelper â progr ams called b y the VIEW S menu whi ch w ill do the actual w ork . hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
21-12 Programm ing 6. Open the Pr ogram cat alog and cr eate a pr ogram named âEXP .S Vâ . Include the follo w ing code in the progr am . E ach entry line after the command SE T VIEW S is a tri o that consists of a VIEW S menu text line (a space indicate s none), a progr am name, and a number that def ines the vi ew t o go to after the pr ogram has run its course . All pr ograms lis ted here w ill transfer w ith an aplet w hen the aplet is tr ansfer red . SETVIEWS â â â â ; â â â â ; 18; Sets the f irst men u option to be â Auto scale â . This is the fo urth standard F uncti on aplet vi ew menu opti on and the 18 â Auto scale â , specifi es that it is to be included in the new men u. T he empty quotes w ill ensure that the old name of â Auto scale â appears on the new men u . See âSETVIEWSâ on page 21-14. â â My Entry1â â ;â â EXP.ME1â â ;1; Sets the second men u option . This optio n runs pr ogram E XP .ME1, then retur ns to view 1 , Plo t view . â â My Entry2â â ;â â EXP.ME2â â ;3; Sets the third menu opti on. T his option runs the pr ogr am EXP .ME2 , then r eturns to vi ew 3, the NUM v ie w . â â â â ;â â EXP.SVâ â ;0; This line spec if ies that the pr ogra m to set the Vi ew men u (this progr am) is transf err ed with the aplet . The space char acter bet ween the first set of quotes in the tri o spec if ies that no me nu option appears f or the entry . Y ou do not need to transf er this pr ogram w ith the aplet , but it allo ws us ers to modify the apletâs menu if they w ant to . hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
Programming 21-13 â â â â ;â â EXP.ANGâ â ;0; The pr ogram EXP .ANG is a small routine that is called by other pr ograms that the aplet use s. T his entry specif ies that the progr am EXP.ANG is transferr ed when the aplet is tr ansfer red , but the space in the fir st quote s ensure s that no entry appears on the menu . â â Startâ â ;â â EXP.Sâ â ;7: This spec if ies the St art menu option. T he progr a m that is assoc iated with this e ntry , EXP.S, runs au tomaticall y when y ou start the aplet . Because this men u option spec if ies v ie w 7 , the VIEW S menu opens when y ou start th e aplet. Y ou onl y need to run this pr ogr am once to confi gur e yo ur apletâs V IEWS menu . Onc e the apletâ s VIEWS menu is conf igur ed, it r emains that wa y until y ou run SETVIEW S again. Y ou do not need to inc lude this pr ogram f or yo ur aplet to w or k, but it is us eful t o spec ify that the progr am is attached to the aplet , and transmitted whe n the aplet is tr ansmitted. 7 . Return to the pr ogr am catalog. T he pr ograms that y ou cr eated sho uld appear as f ollo ws: 8. Y ou must now th e progr am EXP .S V to ex ecut e the SETVIEWS command and create the modified VIEWS menu . Check that th e name of the ne w aplet is highlight ed in the Aplet view . 9 . Y ou can now r etur n to the Aplet libr ary and pre ss to run y our ne w aplet . Programming commands This section describes th e commands for programming with HP 40gs. You can enter these commands in your program by typing them o r by accessing them from the Commands menu. hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
21-14 Programm ing Aplet commands CHECK Checks (selects) the correspon ding function in the current aplet. For example, Check 3 would check F3 if the current aplet is Function. Then a checkmark would app ear next to F3 in Symbolic view, F3 would be plotted in Plot view, and evaluated in Numeric view. CHECK n : SELECT Selects the named aplet and ma kes it the current aplet. Note: Quotes are needed if th e name contains spaces or other special characters. SELECT apletname : SETVIEWS The SETVIEWS command is used to define entries in the VIEWS menu for aplets that you customize. See âCustomizing an apletâ on page 21-9 for an example of using the SETVIEWS command. When you use the SETVIEWS command, the apletâs standard VIEWS menu is deleted and the customized menu is used in its place. You only need to apply the command to an aplet once. The VIEWS menu changes remain unless you apply the command again. Typically, you develop a progra m that uses the SETVIEWS command only. The command contains a tri o of arguments for each menu option to create, or program to attach. Keep the following points in mind when using this command: ⢠The SETVIEW S command deletes an apletâs standard Vi ew s menu opti ons. If y ou w ant to us e an y of the standar d options on y our reco nfigur ed VIEW S menu , you m ust include them in the c onfi guration . ⢠When y ou inv ok e the SETVIEWS command , the changes to an apletâs VIEW S menu r emain with the aplet . Y ou need to inv ok e the command on the aplet again to change the VIEW S menu . ⢠All the pr ogr ams that are called f rom the VIEW S menu ar e tr ansfer red w hen the a plet is tr ansferr ed, for ex ample to another c alculator or to a PC. ⢠As part of the VIEWS men u configur ation , yo u can spec ify progr ams that you wa nt transfer re d with the aplet , but are not called as menu optio ns. F or ex ample , these can be sub-pr ogr ams that menu hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
Programming 21-15 options us e , or the pr ogram that def ines the aplet âs VIEW S menu . ⢠Y ou can inclu de a âStartâ opti on in the VIEW S menu to spec ify a progr am that y ou want to r un automati cally when the aplet s tarts. This pr ogr am typically sets up the apletâs initial configur ation. T he S T ART optio n on the menu is also usef ul for r esetting the aplet . Command syntax The syntax for the command is as follows: SETVIEWS " Pr ompt 1 " ;" Progr amName1 " ; ViewNum be r1 ; " Pr ompt 2 " ;" Progr amName2 " ; ViewNum be r2 : (Y ou can repeat as many Prompt/ProgramName/ ViewNumber tri os of ar guments as y ou lik e.) Within each Prompt/ProgramName/ViewNumber trio, you separate each item with a semi-colon. Prompt Prompt is the text that is displayed for the corresponding entry in the Views menu. Enclose the prompt text in double quotes. Associating prog rams with your apl et If Prompt consists of a single space, then no entry appears in the view menu. The program specified in the ProgramName item is associated with the aplet and transferred whenever the aplet is transmitted. Typically, you do this if you want to transfer the Setviews program with the aplet, or you want to transfer a sub-program that other menu programs use. Auto-run programs If the Prompt item is âStartâ, then the ProgramName program runs whenever you start the aplet. This is useful for setting up a program to co nfigure the aplet. Users can select the Start item from the VIEWS menu to reset the aplet if they change configur ations. You can also define a menu item calle d âResetâ which is auto-run if the user choo ses the button in the APLET view. hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
21-16 Programm ing ProgramName ProgramName is the name of the program that runs when the corresponding menu entry is selected. All programs that are identified in the apletâs SETVIEW S command are transferred when the aplet is transmitted. ViewNumber V iewNumber is the number of a view to start after the program finishes running. For example, if yo u want the menu option to display the Pl ot view when the associated program finishes, you would specify 1 as the ViewNumber value. Including standard menu options To include one of an apletâs standard VIEWS menu options in your customized menu, set up the arguments trio as follows: ⢠The f irst ar gument spec ifi es the menu item name: â Leave the argument empty to use th e standard Vi ew s menu name for the item , or â Enter a menu item name to r eplace the standar d name . ⢠The second argument specif ies the progr am to run: â Leav e the argu ment empty to run the st andard menu option . â Inser t a pr ogram name to run the pr ogram be for e the standar d menu opti on is e xec uted . ⢠The thir d ar gument spec ifies the v ie w and the menu number f or the item. Deter mine the menu number fr om the Vi ew n umbers table belo w . Note: SETVIEW S w ith no ar guments r esets the v ie w s to def ault of the base a plet. hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
Programming 21-17 View numbers The Function aplet views are numbered as fo llows: View numbers from 15 on will vary according to the parent aplet. The list shown above is for the Function aplet. Whatever the normal VIEWS menu for the parent aplet, the first entry will become number 15, the second number 16 and so on. UNCHECK Unchec ks (unselects) the corresponding function in the current aplet. For example, Uncheck 3 would uncheck F3 if the current aplet is Function. UNCHECK n : Branch commands Branch commands let a program make a decisi on based on the result of one or more tests. Unlike the othe r programming commands, the branch commands work in logical groups. Therefore, the commands are described together rather than each independently. IF...THEN...END Executes a sequence of commands in the true-clause only if the test-clause evaluates t o true. Its sy ntax is: IF test-clause THEN true-clause END 0 1 2 3 4 5 6 7 8 9 10 HOME Plot Symbolic Numeric Plot-Setup Symbolic-Setup Numeric-Setup Views Note Sketch view Aplet Catalog 11 12 13 14 15 16 17 18 19 20 21 List Catalog Matrix Catalog Notepad Catalog Program Catalog Plot-Detail Plot-Table Overlay Plot Auto scale Decimal Integer Trig hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
21-18 Programm ing Example 1 X A : IF A==1 THEN MSGBOX " A EQUALS 1" : END: IF... THEN... ELSE... END Executes the true-clause sequence of commands if the test- clause is true, or the false-clause sequence of commands if the test-clause is false. IF test-clause THEN true-clause ELSE false-clause END Example 1 X A : IF A==1 THEN MSGBOX "A EQUALS 1" : ELSE MSGBOX "A IS NOT EQUAL TO 1" : A 1 X A : END: CASE...END Executes a series of test-clause commands that execute the appropriate tr ue-cl ause sequence of commands. Its syntax is: CASE IF test-clause 1 THEN true-clause 1 END IF test-clause 2 THEN true-clause 2 END . . . IF test-clause n THEN true-claus e n END END: When CASE is executed, test -clause 1 is evaluated. If the test is true, true-clause 1 is executed, and execution skips to END. If test-clause 1 if false, execution proceeds to test- clause 2 . Execution with the CASE structure continues until a true-clause is executed (o r until all the test-clauses evaluate to false). IFERR... THEN... ELSE⦠END... Many conditions are automati cally recognized by the HP 40gs as error conditions and are automatically treated as errors in programs. hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
Programming 21-19 IFERR...THEN...ELSE...END allows a program to intercept error conditions that otherwise would cause the program to abort. Its syntax is: IFERR tr ap-claus e THEN clause_1 ELSE clause_ 2 END : Example IFERR 60/X X Y: THEN MSGBOX "Error: X is zero.": ELSE MSGBOX "Value is "Y: END: RUN Runs the named program. If your program name contai ns special characters, such as a space, then you must enclose the file name in double quotes (" "). RUN " pr ogram name " : or RUN progr amname : STOP Stops the current program. STOP : Drawing commands The drawing commands act on the display. The scale of the display depends on the current aplet's Xmin, Xmax, Ymin, and Ymax values. The following examples assume the HP 40gs default settings with the Function aplet as the current aplet. ARC Draws a circular arc, of give n radius, whose centre is at (x,y) The arc is drawn from start_angle_measurement to end_angle_measurement . ARC x;y; radius ; start_angle_measurement ; end_angle_measurement : hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
21-20 Programm ing Example ARC 0;0;2;0;2 Ï : FREEZE: Dra w s a c irc le cente red at (0, 0) of r adius 2 . The FREEZE command causes the cir c le to remain display ed on the screen until yo u press a k ey . BOX Draws a box with diagonally opposite corners ( x1,y1 ) and ( x2,y2 ). BOX x1 ; y1; x2; y2: Example BOX -1;-1;1;1: FREEZE: Dra w s a bo x, lo w er corner at (â1,â1), upper corner at (1,1) ERASE Clears the display ERASE: FREEZE Halts the program, freezing the current display. Execution resumes when any key is pressed. LINE Draws a line from (x1, y1) to ( x2, y2 ) . LINE x1; y 1; x2 ; y 2: PIXOFF Turns off the pixel at the specified coordinates (x,y) . PIXOFF x;y : PIXON Turns on the pixel at the specified coordinates (x,y) . PIXON x;y : TLINE Toggles the pixels along the line from (x1, y1) to ( x2, y2) on and off. Any pixel that was turned off, is turned on; any pixel that was turned on, is turned off. TLINE can be used to erase a line. TLINE x1 ; y1 ; x2 ; y2: hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
Programming 21-21 Example TLINE 0;0;3;3: Era ses pr ev iously dr a wn 4 5 degr ee line fr om (0, 0) to (3, 3), or draw s that line if it doesn ât alread y e xist . Graphic commands The graphic commands use th e graphics variables G0 through G9âor the Page variable from Sketchâas graphicname arguments. The position argument takes the form ( x,y ). Position coordinates depend on the c urrent apletâs scale, which is specified by Xmin, Xmax, Ymin, and Ymax. The upper left corn er of the target graphic ( graphic2 ) is at (Xmin,Ymax). You can capture the current display and store it in G0 by simultaneously pressing . DISPLAY â Stor es the curr ent display in graphicname . DISPLAY â gr aphicname : â DISPLAY Displays graphic from graphicname in the display. â DISPLAY gr aphicname : â GROB Creates a graphic from expr ession , using font_size , and stores the resulting graphic in graphicname . Font sizes are 1, 2, or 3. If the fontsize argument is 0, the HP 40gs creates a graphic display li ke that created by the SHOW operation. â GROB gr aphicname ; exp re ss io n ; font s iz e : GROBNOT Replaces graphic in graphicname with bitwise-inverted graphic. GROBNOT gr aphicname : GROBOR Using the logical OR, superimposes graphicname2 onto graphicname1 . The upper left corner of graphicname2 is placed at position . GROBOR gr aphicname1 ; ( posi tion) ; gra phicname2 : where position is expressed in terms of the current axes settings, not in terms of pixel postion. hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
21-22 Programm ing GROBXOR Using the logical XOR, superimposes graphicname2 onto graphicname1 . The upper left corner of graphicname2 is placed at position . GROBXOR gra phicname1 ; ( posi tion ) ; gra phicname2 : MAKEGROB Creates graphic with given width, height, and hexadecimal data, and stores it in graphicname . MAKEGROB gr aphicname ; wid t h ; height ; hexdata : PLOT â Stores the Plot view display as a graphic in graphicname . PLOT â graphicname : PLOT â and DISPLAY â can be used to transfer a copy of the current PLOT view into the sketch view of the aplet for later use and editing. Example 1 X PageNum: PLOT â Page: â DISPLAY Page: FREEZE: This program stores the current PLOT view to the first page in the sketch view of the current aplet and then displays the sketch as a gr aphic ob ject until any key is pressed. â PLOT Puts graph from gr aphicname into the Plot view display. â PLOT graphicname : REPLACE Replaces portion of graphic in graph icname1 with graphicname2 , s tarting at position . REPLACE also works for lists and matrices. REPLACE gra phicname1 ; ( posi tion ) ; gra phicname2 : SUB Extracts a portion of the named graphic (or list or matrix), and stores it in a new variable, name . The portion is specified by position and positions. SUB name ; graphi cname ; ( position ) ; ( positions) : ZEROGROB Creates a blank graphic with given width and height , and stores it in graphicname . ZEROGROB gr aphicname ; wid t h ; height : hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
Programming 21-23 Loop commands Loop hp allow a program to execute a routine repeatedly. The HP 40gs has three loop structures. The example programs below illustrate each of these structures incrementing the variable A from 1 to 12. DOâ¦UNTIL â¦E ND Do ... Until ... End is a loop command that executes the loop-clause repeatedly until test-clause returns a true (nonzero) result. Because the test is executed after the loop-clause, the loop-clause is always executed at least once. Its syntax is: DO loop-clau se UNTIL test-clause END 1 X A: DO A 1 X A: DISP 3;A: UNTIL A = = 12 END: WHILE⦠REPEAT⦠END While ... Repeat ... End is a loop command that repeatedly evaluates test-clause and executes loop-clause sequence if the test is true. Because the test-clause is executed before the loop-clause, the loop-clause i s not executed if the test is initially false. Its syntax is : WHILE test-clause REPEAT loop-clau se END 1 X A: WHILE A < 12 REPEAT A 1 X A: DISP 3;A: END: FORâ¦TOâ¦STEP ...END FOR name = start -expr ession TO end-e xpressi on [STEP incr ement ]; loop-clau se END FOR A=1 TO 12 STEP 1; DISP 3;A: END: Note that the STEP parameter is optional. If it is omitted, a step value of 1 is assumed. BREAK Terminates loop. BREAK: hp40g .book Page 23 Friday, December 9, 2005 1:03 AM
21-24 Programm ing Matrix commands The matrix commands take variables M0âM9 as arguments. ADDCOL Add Column. Inserts values into a column before column_number in the specified matrix . You enter the values as a vector. The values must be separated by commas and the number of valu es must be the same as the number of rows in the matrix name . ADDCOL name ;[ va lu e 1 ,...,value n ]; column_number : ADDROW Add Row. Inserts values into a row befo re row_number in the specified matrix. You enter the values as a vector. The values must b e separate d by commas and the number of values must be the same as the number of columns in the matrix name . ADDROW name ;[ va lu e 1 ,..., val u e n ]; ro w_number : DELCOL Delete Column. Deletes the specified co lumn from the specified matrix . DELCOL name ; c olumn_number : DELROW Delete Row. Deletes the specified row from the specified matrix. DELROW name ; row _ n u m b e r : EDITMAT Starts the Matrix Editor and displays the s pecified matrix. If used in programming, returns to the program when user presses . EDITMAT name : RANDMAT Creates random matrix with a specified number of rows and columns and stores the result in name ( name must be M0...M9 ). The entries will be integers ranging from â9 to 9. RANDMAT name ; rows ; columns : REDIM Redimensio ns the specified matrix or vector to size . For a matrix, size is a list of two integers {n1,n2} . For a vector, size is a list containing one integer {n} . REDIM name ; siz e : hp40g .book Page 24 Friday, December 9, 2005 1:03 AM
Programming 21-25 REPLACE Replaces portion of a matrix or vector stored in name with an object starting at position start . start for a matrix is a list containing two numbers; for a vector, it is a single number. Replace also works with lists and graphics. REPLACE name ; star t ; object : SCALE Multiplies the specified row_number of the specified matrix by value . SCALE name ; va lu e ; rown u mb e r : SCALEADD Multiplies the row of the matrix name by value , then adds this result to the second specified row. SCALEADD name ; va lu e ; row 1 ; row 2 : SUB Extracts a sub-objectâ a portion of a list, matrix, or graphic from obj ect âand stores it into name . start and end are each specified using a list with two numbers for a matrix, a number for vector or li sts, or an ordered pair, ( X,Y ), for graphics. SUB name ; object ; sta rt ; end : SWAPCOL Swaps Columns. Exchanges column1 and co lumn2 of the specified matrix . SWAPCOL name ; column1 ; column2 : SWAPROW Swap Rows. Exchanges row1 and row2 in the specified matrix . SWAPROW name ; row 1 ; row 2 : Print commands These commands print to an HP infrared printer , for example the HP 82240B pri nter. PRDISPLAY Prints the contents of the display. PRDISPLAY: PRHISTORY Prints all objects in the history. PRHISTORY: hp40g .book Page 25 Friday, December 9, 2005 1:03 AM
21-26 Programm ing PRVAR Prints name and contents o f variablename . PRVAR var iablename : You can also use the PRVAR command to print th e contents of a program or a note. PRVAR progr amname ;PROG: PRVAR notename ; NOTE: Prompt commands BEEP Beeps at the frequency and for the time you specify. BEEP frequen cy ; se conds : CHOOSE Creates a choose box, which is a box containing a list of options from which the user choo ses one. Each option is numbered, 1 through n . The result of the choose command is to store the number of the option chosen in a variable. The syntax is: CHOOSE var iable_name ; title ; option 1 ; option 2 ; ... option n : where variable_name is the name of a variable for storing a default option number, title is the text displaye d in the title bar of the choose box, and option 1 ...option n are the options listed in the choose box. By pre-storing a value into variable_name you can specify the default option number, as shown in the example below. Example 3 X A:CHOOSE A; "COMIC STRIPS"; "DILBERT"; "CALVIN&HOBBES"; "BLONDIE": CLRVAR Clears the specified variable. The syntax is: CLRV AR va ria bl e : hp40g .book Page 26 Friday, December 9, 2005 1:03 AM
Programming 21-27 Example If you have stored {1,2,3,4} in variable L1, entering CLVAR L1 w ill clear L1. DISP Dis plays textitem in a row of the display at the line_number . A text item consists of any number of expressions and quoted strings of text. The expressions are evaluated and turned into strings. Lines are numbered from the top of the screen, 1 being the top and 7 being the bottom. DISP line_numbe r ; textitem : Example DISP 3;"A is" 2 2 Res ul t : A is 4 (display ed on line 3) DISPXY Disp lays object at position ( x_pos , y_pos ) in size font . The syntax is: DISPXY x_po s ; y_pos ; font ; object : The value of object can be a text string, a variable, or a combination of both. x_pos and y_pos are r elati v e to the cu rr ent settings of Xmin, Xmax , Ymin and Ymax (w hich yo u set in t he PL OT SETUP v iew). The value of fo nt is either 1 (small) or 2 (large). Example DISPXY â3.5;1.5;2;"HELLO WORLD": DISPTIME Displays the current date and time. DISPTIME To set the date and time, simply store the correct settings in the date and time variable s. Use the following formats: M.DDYYYY for the date and H.MMSS for the time. hp40g .book Page 27 Friday, December 9, 2005 1:03 AM
21-28 Programm ing Examples 5.152000 X DATE( sets the date to May 15, 2000) . 10.1500 X TIME (sets the time to 10:15 am). EDITMAT Matrix Editor. Opens the Matr ix editor for the specified matrix. Returns to the program when user presses EDITMAT matr ixname : The EDITMAT command can also be used to create matrices. 1. Pres s CMDS 2. P r e s s M 1, and then pr ess . The Matr i x catalog opens w ith M1 av ailable for editing. EDITMAT matrixname is an alternative to opening the matrix editor with matrixname . It can be used in a program to enter a matrix. FREEZE This command prevents the display from being updated after the program runs. This allows you to view the graphics created by the program. Cancel FREEZE by pressing any key. FREEZE: GETKEY Waits for a key, then stores the keycode rc.p in name, where r is row number, c is column number, and p is key- plane number. The key-planes numbers are: 1 for unshifted; 2 for shifted; 4 for alpha-shifted; and 5 for both alpha-shifted and shifted. GETKEY name : INPUT Creates an input form with a title bar and one field. The field has a label and a default value. There is text help at the bottom of the form. The user enters a value and presses the menu key. The value that the user enters is stored in the variable name . The title , label , and help items are text strings and need to be e nclosed in double quotes. Use CHARS to type th e quote mark s " ". INPUT name ; title , label ; help ; default : hp40g .book Page 28 Friday, December 9, 2005 1:03 AM
Programming 21-29 Example INPUT R; "Circular Area"; "Radius"; "Enter Number";1: MSGBOX Displays a mess age box containing textitem. A text ite m consists of any number of expressions and quoted strings of text. The expressions are evaluate d and turned into strings of text. For example , "AREA IS:" 2 2 becomes AREA IS: 4 . Use CHARS to type the quote marks " ". MSGBOX textitem : Example 1 X A: MSGBOX "AREA IS: " Ï*A^2: You can also use the NoteText variable to provide text arguments. This can be used to insert line breaks. For example, press NOTE and type AREA IS . The position line MSGBOX NoteText " " Ï*A^2: will display the same message box as the previous example. PROMPT Displays an inpu t box with name as the title, and prompts for a value for name . name can be a vari able such as Aâ¦Z, θ , L1â¦L9, C1â¦C9 or Z1â¦Z9.. PROMPT name : WAIT Halts program execution for the specified number of seconds. WAIT seconds : Stat-One and Stat-Two commands The following commands are used for analyzing one- variable and two-variab le statistical data. hp40g .book Page 29 Friday, December 9, 2005 1:03 AM
21-30 Programm ing Stat-One commands DO1VSTATS Calculates STATS using datasetname and stores the results in the corresponding variables: N Σ , Tot Σ , Mean Σ , PVar Σ , SVar Σ , PSDev, SSDev, Min Σ , Q1, Median, Q3, and Max Σ . Datasetname can be H1, H2, ..., or H5. Datasetname must include at least two data points. DO1VSTATS datase tname : SETFREQ Sets datasetname frequency a ccording to column or value. Datasetname can be H1, H2,..., or H5, column can be C0âC9 and value can be any positive integer. SETFREQ datas etname ; column : or SETFREQ def inition ; va l u e : SETSAMPLE Sets datasetname sample according to column. Datasetname can be H1âH5, and column can be COâC9. SETSAMPLE datase tname ; column : Stat-Two commands DO2VSTATS Calculates STATS using datasetname and stores the results in corresponding variables: MeanX, Σ X, Σ X2, MeanY, Σ Y, ΣY2, Σ XY, Corr, PCov, SCov, and R ELERR. Datasetname can be SI, S2,..., or S5. Datasetname must include at least two pairs of data points. DO2VSTATS datase tname : SETDEPEND Sets datasetname dependent column . Datasetname can be S1, S2, â¦, or S5 and column can be C0âC9. SETDEPEND datase tname ; column : SETINDEP Sets datasetname independen t column . Datasetname can be S1, S2,â¦, or S5 and column can be C0âC9. SETINDEP datas etname ; column : hp40g .book Page 30 Friday, December 9, 2005 1:03 AM
Programming 21-31 Storing and retrieving variables in programs The HP 40gs has both Ho me variables and Aplet variables. Home variables ar e used for real numbers, complex numbers, graphics, lists, and matrices. Home variables keep the same values in HOME and in aplets. Aplet variables are those whose values depend on the current aplet. The aplet variables are used in programming to emulate the definitions and settings you make when working with aplets interactively. You use the Variable menu ( ) to retrieve either Home variables or aplet vari ables. See âThe VARS menuâ on page 17-4. Not all var iables are available in ev ery aplet. S1fitâS5fit, for example, are only available in the Sta ti st ics ap le t. Und er ea ch var ia bl e na me is a l ist of th e aplets where the variable can be used. Plot-view variables Area Function Contains the last value found by the Area function in Plot- FCN menu. Axes All Aplets Turns axes on or off. From Plot Setup, check (or uncheck) AXES . or In a program, type: 1 X Axes âto turn ax es on (def ault). 0 X Axes âto turn ax es o ff . Connect Function Parametric Polar Solve Statistics Draws lines between successively plotted points. From Plot Setup, check (or uncheck) CONNECT . or In a program, type 1 X Connect â to connect plotted points (de fault , ex cept in Statisti cs wher e the defa ult is off). 0 X Connect â not to connect plotted points . hp40g .book Page 31 Friday, December 9, 2005 1:03 AM
21-32 Programm ing Coord Function Parametric Polar Sequence Solve Statistics Turns the coordinate-display mode in Plot view on o r off. From Plot view, use the Menu mean key to toggle coordinate display on an off. In a program, type 1 X Coord âto turn coor dinate displa y on (defa ult) . 0 X Coord âto turn coor dinate display off . Extremum Function Contains the last value foun d by the Extremum operation in the Plot-FCN menu. FastRes Function Solve Toggles resolution between plotting in every other column (faster), or plotting in every column (more detail). From Plot Setup, choose Faster or Mo re Detail. or In a program, type 1 X FastRes âfor faster . 0 X FastRes âfor mor e detail (def ault). Grid All Aplets Turns the background grid in Plot view on or off. From Plot setup, check (or uncheck) GRID . or In a program, type 1 X Grid to turn the gr id on . 0 X Grid to turn the gr id o ff (defau lt) . Hmin/Hmax Statistics Defines minimum and maximum values for histogram bars. From Plot Setup for one-variab le statistics, set values for HRNG . or In a program, type X Hmin X Hmax whe re n 1 n 2 n 2 n 1 > hp40g .book Page 32 Friday, December 9, 2005 1:03 AM
Programming 21-33 Hwidth Statistics Sets the width of histogram bars. From Plot Setup in 1VAR stats set a value for Hwidth or In a program, type n X Hwidth Indep All Aplets Defines the value of the independent variable used in tracing mode. In a program, type n X Indep InvCross All Aplets Toggles between solid crosshai rs or inverted crosshairs. (Inverted is useful if the background is solid). From Plot Setup, check (or uncheck) InvCross or In a program, type: 1 X InvCross âto in vert the cr os shairs . 0 X InvCross âfo r solid cr osshairs (def ault) . Isect Function Contains the last value found by the Intersection function in the Plot-FCN menu. Labels All Aplets Draws labels in Plot view showing X and Y ranges. From Plot Setup, check (or uncheck) Labels or In a program, type 1 X Labels âto turn labe ls on. 0 X Labels âto turn labe ls off (defa ult) . hp40g .book Page 33 Friday, December 9, 2005 1:03 AM
21-34 Programm ing Nmin / Nmax Sequence Defines the minimum and maxi mum independent variable values. Appears as the NRNG fields in the Plot Setup input form. From Plot Setup, enter values for NRNG . or In a program, type X Nmin X Nmax whe re Recenter All Aplets Recenters at the crosshairs locations when zooming. From Plot-Zoom-Set Factors, c heck (or uncheck) Recenter or In a program, type 1 X Recenter â to turn r ecenter on (defa ult). 0 X Recenter âto turn r ecente r off . Root Function Contains the last value found by the Root function in the Plot-FCN menu. S1markâS5mark Statistics Sets the mark to use for scatter plots. From Plot Setup for two-variable statistics, S1mark- S5mark , then choose a mark. or In a program, type n X S1mark whe re n is 1,2,3,...5 SeqPlot Sequence Enables you to choose types of sequ ence plot: Stairstep or Cobweb. From Plot Setup, select SeqPlot , then choose Stairstep or Cobweb . or In a program, type 1 X SeqPlot âfor Stairstep. 2 X SeqPlot âfor Cobw eb. n 1 n 2 n 2 n 1 > hp40g .book Page 34 Friday, December 9, 2005 1:03 AM
Programming 21-35 Simult Function Parametric Polar Sequence Enables you to choose between simultaneous and sequential graphing of all selected expressions. From Plot Setup, check (or uncheck) _ SIMULT or In a program, type 1 X Simult âfo r simultaneous gr aphing (defa ult). 0 X Simult âfo r sequenti al gra phing. Slope Function Contains the last value found by the Slope function in the Plot-FCN menu. StatPlot Statistics Enables you to choose types of 1-variable statistics plot between Histogram or Box-and-Whisker. From Plot Setup, select StatPlot , then choose Histogram or BoxWhisker . or In a program, type 1 X StatPlot âfor Histogram. 2 X StatPlot âfor Box-and-Whisker. Umin/Umax Polar Sets the minimum and maxi mum independent values. Appears as the URNG field in the Plot Setup input form. From the Plot Setup input form, enter values for URNG . or In a program, type X Umin X Umax whe re Ustep Polar Sets the step size for an independent variable. From the Plot Setup input form, enter values for USTEP . or In a program, type n X Ustep whe re n 1 n 2 n 2 n 1 > n 0 > hp40g .book Page 35 Friday, December 9, 2005 1:03 AM
21-36 Programm ing Tmin / Tmax Parametric Sets the minimum and maxi mum independent variable values. Appears as the TRNG field in the Plot S etup input form. From Plot Setup, enter values for TRNG . or In a pr ogram , type X Tmin X Tmax wher e Tracing All Aplets Turns the tracing mode on or off in Plot view. In a program, type 1 X Tracing âto turn T rac ing mode on (default). 0 X Tracing âto turn T rac ing mode off. Tstep Parametric Sets the step size for the independent variable. From the Plot Setup input form, enter values for TSTEP . or In a program, type n X Tstep wher e Xcross All Aplets Sets the horizontal coordinate of the crosshai rs. Only works with TRACE off. In a program, type n X Xcross Ycross All Aplets Sets the vertical coordinate of the crosshairs. Only works with TRACE off. In a program, type n X Ycross n 1 n 2 n 2 n 1 > n 0 > hp40g .book Page 36 Friday, December 9, 2005 1:03 AM
Programming 21-37 Xtick AAll Aplets Sets the distance between tick marks for the horizontal axis. From the Plot Setup input form, enter a value for Xtick . or In a program, type n X Xtick whe re Ytick All Aplets Sets the distance between tick marks for the vertical axis. From the Plot Setup input form, enter a value for Ytick . or In a program, type n X Ytick whe re Xmin / Xmax All Aplets Sets the minimum and maximum horizontal values of the plot screen. Appears as the XRNG fields (horizontal range) in the Plot Setup input form. From Plot Setup, enter values for XRNG . or In a program, type X Xmin X Xmax whe re Ymin / Ymax All Aplets Sets the minimum and maximum vertical values of the plot screen. Appears as the YRNG fields (vertical range) in the Plot Setup input form. From Plot Setup, enter the values for YRNG . or In a program, type X Ymin X Ymax whe re n 0 > n 0 > n 1 n 2 n 2 n 1 > n 1 n 2 n 2 n 1 > hp40g .book Page 37 Friday, December 9, 2005 1:03 AM
21-38 Programm ing Xzoom All Aplets Sets the horizontal zoom factor. From Plot-ZOOM-Set Factors, enter the value for XZOOM . or In a program, type n X XZOOM wher e The default value is 4. Yzoom All Aplets Sets the vertical zoom factor. From Plot-ZOOM-Set Factors, enter the value for YZOOM . or In a program, type n X YZOOM The default value is 4. Symbolic-view variables Angle All Aplets Sets the angle mode. From Symbolic Setup, choose Degrees, Radians , or Grads for angle measure. or In a program, type 1 X Angle âfor Degrees. 2 X Angle âfor Radians. 3 X Angle âfor Grads. F1...F9, F0 Function Can contain any expression. Independent vari able is X . Example 'SIN( X)' X F1( X ) You must put single quotes ar ound an expression to keep it from being evaluated before it is stored. Use CHARS to type the single quote mark. n 0 > hp40g .book Page 38 Friday, December 9, 2005 1:03 AM
Programming 21-39 X1, Y1...X9,Y9 X0,Y0 Parametric Can contain any expression. Independent variable is T. Example 'SIN(4*T)' X Y1(T):'2*SIN(6*T)' X X1(T) R1...R9, R0 Polar Can contain any expression. Independent variable is θ . Example '2*SIN(2* θ)' X R1( θ ) U1...U9, U0 Sequence Can contain any expression. Independent variable is N. Example RECURSE (U,U(N-1)*N,1,2) X U1(N) E1...E9, E0 Solve Can contain any equation or expression. Independent variable is selected by high lighting it in Numeric View. Example 'X Y*X-2=Y' X E1 S1fit...S5fit Statistics Sets the type of fit to be used by the FIT operation in drawing the regression line. From Symbolic Se tup view, spec ify the fit in the field for S1FIT, S2FIT, etc. or In a program, store one of the following constant numbers or names into a variable S1fit, S2fit , etc. 1 Linear 2 LogFit 3 ExpFit 4 Power 5 QuadFit 6 Cubic 7 Logist 8 ExptFit 9 TrigFit 10 User hp40g .book Page 39 Friday, December 9, 2005 1:03 AM
21-40 Programm ing Example Cubic X S2fit or 6 X S2fit Numeric-view variables The following aplet variable s control the Numeric view. The value of the variable applies to the current aplet only. C1...C9, C0 Statistics C0 through C9 , for columns of data. Can contain lists. Enter data in the Numeric view or In a program, type LIST X C n wher e n = 0, 1, 2, 3 ... 9 Digits All Aplets Number of decimal places to use for Number format in the HOME view and for labeling axes in the Plot view. From the Modes view, enter a value in the second field of Number Format . or In a program, type n X Digits wher e Format All Aplets Defines the number display format to use for numeric format on the HOME view and for labeling axes in the Plot view. From the Modes view, choose Standard , Fixed , Scientific , Engineering, Fraction or Mixed Fraction in the Number Format field. or In a program, store the constant number (or its name) into the variable Format . 0 n 11 << hp40g .book Page 40 Friday, December 9, 2005 1:03 AM
Programming 21-41 1 Standard 2 Fixed 3 Sci 4 Eng 5 Fraction 6 MixFraction Note: if Fraction or Mixed Fracti on is chosen, the setting will be disregarded when labeling axes in the Plot view. A setting of Scientific will be used instead. Example Scientific X Format or 3 X Format NumCol All Aplets except Statistics aplet Sets the column to be highlighted in Numeric view. In a program, type n X NumCol where n can be 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 . NumFont Function Parametric Polar Sequence Statistics Enables you to choose the font size in Numeric view. Does not appear in the Num Setup input form. Corresponds to the key in Numeric view. In a program, type 0 X NumFont for small (de fault). 1 X NumFont for big. NumIndep Function Parametric Polar Sequence Specifies the list of independent values to be used by Build Your Own Table. In a program, type LIST X NumIndep NumRow All Aplets except Statistics aplet Sets the row to be highlighted in Numeric view. In a program, type n X NumRow whe re n 0 > hp40g .book Page 41 Friday, December 9, 2005 1:03 AM
21-42 Programm ing NumStart Function Parametric Polar Sequence Sets the starting value for a table in Numeric view. From Num Setup, enter a value for NUMSTART . or In a program, type n X NumStart NumStep Function Parametric Polar Sequence Sets the step size (increment value) for an independ ent variable in Numeric view. From Num Setup, enter a value for NUMSTEP . or In a program, type n X NumStep whe re NumType Function Parametric Polar Sequence Sets the table format. From Num Setup, choose Automatic or Build Your Own . or In a program, type 0 X NumType for B u il d Y o ur Own. 1 X NumType for A utomati c (default). NumZoom Function Parametric Polar Sequence Sets the zoom factor in the Numeric view. From Num Setup, type in a value for NUMZOOM . or In a program, type n X NumZoom whe re StatMode Statistics Enables you to choose between 1- variable and 2-va riable statistics in the Statistics aplet. Does not appear in the Plot Setup input form. Corresponds to the and menu keys in Numeric View. In a program, store the constant name (or its number) into the variable StatMode. 1VAR = 1 , 2VAR = 2. n 0 > n 0 > hp40g .book Page 42 Friday, December 9, 2005 1:03 AM
Programming 21-43 Example 1VAR X StatMode or 1 X StatMode Note variables The following aplet variable is availa ble in Note view. NoteText All Aplets Use NoteText to recall text previously entered in Note view. Sketch variables The following aplet variables are available in Sketch view. Page All Aplets Sets a pa ge in a sketch set. The graphics can be viewed one at a time using the and keys. The Page variable refers to the currently displayed page of a sketch set. In a program, type gra phicname X Page PageNum All Aplets Sets a number for referring to a particular page of the sketch set (in Sketch view). In a program, type the page that is shown when SKETCH is pressed. n X PageNum hp40g .book Page 43 Friday, December 9, 2005 1:03 AM
hp40g .book Page 44 Friday, December 9, 2005 1:03 AM
Extending aplets 22-1 22 Extending aplets Aplets are the application environments where you explore different classes of m athematical operations. You can extend the capabili ty of the HP 40gs i n the following ways: ⢠Creat e new aplets , based on ex isting aplets, with spec ifi c confi gurati ons suc h as angle measur e, gra phical or tabular settings, and annota tions . ⢠T ransmit aplets between HP 40gs calc ulators v ia a ser ial o r USB cable . ⢠Dow nload e-lessons (teaching a plets) fr om Hew lett-P ack ar dâs Calculator w eb site . ⢠Progr am ne w aplets. See c hapter 21, âPr ogramming â, f or further details. Creating new aplets based on existing aplets You can create a new aplet ba sed on an existing aplet. To create a new aplet, save an existing aplet under a new name, then modify the aplet to add the configurations and the functionality that you want. Information that defines an aplet is saved a utomatically as it is entered into the calculator. To keep as much memory available for storage as possible, delete any aplets you no longer need. Example This example demonstrates how to create a new aplet by saving a copy of the built- in Solve aplet. The new aplet is saved under the name âTRIANG LESâ and contains the formulas commonly used in calculations i nvolving right-angled triangles. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
22-2 Ext ending aplets 1. Open the Solve aplet and sav e it under th e new name . Solve | T R I A N G L E S 2 . Ent er th e fou r fo rmu la s: θ O H θ A H θ OA AB C 3 . Deci de whether y ou w ant the aplet to oper ate in Degree s, R adians, or Gr ads. MODES Degrees 4. Vi ew the A plet L ibrary . The â TRIANGLE Sâ aplet is listed in the Aplet Libr ary . The So lv e aplet can no w be re set and used for other problems . hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
Extending aplets 22-3 Using a customized aplet To use the âTrianglesâ aplet, simply select the appropria te formula, change to the Numeric view and solve for the missing variable. Find the length of a ladder leaning against a vertical wall if it forms an angle of 35 o with the horizontal and extends 5 metres up the wall. 1. Select the a plet. TRIANGLES 2 . Choo se the sine for mula in E1. 3 . Change to the Numer ic view a n d e n te r t h e kno wn values . 35 5 4. Solv e for the missing val u e. The le ngth of the ladder is appro x imately 8.7 2 metres Resetting an aplet Resetting an aplet clears all data and resets all default settings. To reset an aplet, open the Library, select the aplet and press . You can only reset an aplet tha t is based on a built-in aplet if the programmer who created it has pr ovided a Reset option. hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
22-4 Ext ending aplets Annotating an aplet with notes The Note view ( NOTE ) attaches a note to the current aplet. See Chapter 2 0, âNotes and sketchesâ . Annotating an aplet with sketches The Sketch view ( SKETCH ) attaches a picture to the current aplet. See chapter 20, âNotes and sketchesâ. HINT Notes and sketches that you attach to an aplet b ecome part of the aplet. When y ou transf er the aplet to another calculator , the associ ated note a nd sketch ar e transferr ed as well. Downloading e-lessons from the web In addition to the standard aplets that come with the calculator, you can download aplets from the world wide web. For example, Hewlett-Packardâs Calculators web site contains aplets that de monstrate certain mathematical concepts. Note that you need the Graphing Calculator Connectivity Kit in order to load aplets from a PC. Hewlett-Packardâs Calculators web site c an be found at: http://www.hp.com/calculators Sending and receiving aplets A convenient way to distribute or share problems in class and to turn in homework is to transmit (copy) aplets d i r e c t l y f r o m o n e H P 4 0 g s t o a n o t h e r . T h i s c a n t a k e p l a c e via a suitable cable. ( You can use a serial cable with a 4-pin mini-USB connector, which plugs i nto the RS232 port on the calculator. The ser ial cable is available as a separate accessory.) You can also send aplets to, and receive aplets from, a PC. This requires special softwa re running on the PC (such as the PC Connectivity Kit). A USB cable with a 5-pin mini- USB connector is provided with the hp40gs for connecting with a PC. It plugs into the USB port on the calculator. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
Extending aplets 22-5 To transmit an aplet 1. Connec t the PC o r aplet disk dr iv e to the calc ulator b y an appropr iate cable. 2 . Sending calc ulator : Open the L ibr ary , highli ght the aplet to send , and pres s . â Th e SEND TO menu appears w ith the follo w ing options: HP39/40 (USB) = to send via the U SB port HP39/40 (SER) = to send via the RS2 3 2 serial port USB DISK DRIVE = to send to a disk dri ve v ia the U SB port SER. DISK DRIVE = to send to a disk dr iv e v ia the RS 232 s e r i a l p o r t Note : ch oose a disk dr iv e option if y ou are using the hp40gs co nnecti vity kit to tr ansfer the aplet. Highli ght yo ur selecti on and pres s . â If transmitting to a disk dri v e, y ou ha ve the options o f sending to the c urr ent (de fault) directory or to another directory . 3 . Rece iv ing calculator : Open the aplet library and pres s . â Th e RECEIVE FROM menu appears w ith the follow ing options: HP39/40 (USB) = to rece iv e vi a the USB port HP39/40 (SER) = to recei v e via the R S2 3 2 serial po rt USB DISK DRIVE = to recei ve fr om a disk dri ve v ia the USB po r t SER. DISK DRIVE = to r ecei ve f r om a disk dri v e vi a the RS 232 s e r i a l p o r t Note : ch oose a disk dr iv e option if y ou are using the hp40gs co nnecti vity kit to tr ansfer the aplet. Highli ght yo ur selecti on and pres s . The T ransmit annunciatorâ âis display ed until transmissi on is complete . hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
22-6 Ext ending aplets If you are using the PC Connectivity Kit to download aplets from a PC, you will see a list of aplets in the PCâs current directory. Check as ma ny items a s you would li ke to receive. Sorting items in the aplet library menu list Once you have entered information into an aplet, you have defined a new version of an aplet. The information is automatically saved under the current aplet name, such as âFunction.â To create additional aplets of the same type, you must give the current aplet a new name. The advantage of storing an ap let is to allow you to keep a copy of a working environment for later use. The aplet library is where you go to manage your aplets. Press . Highlight (using the arrow keys) the name of the aplet you want to act on. To sort the aplet list In the aplet library, press . Select the sorting scheme and press . ⢠Chronologically pr oduces a chr onological order based on the date an aplet w as last us ed. (T he last- used aplet appe ars first , and so on.) ⢠Alphabetically pr oduces an alphabetical order by a plet name. To delete an aplet You cannot delete a built-in aplet. You can only clear its data and reset its default settings. To delete a customized aplet, open the aplet library, highlight the aplet to be deleted, and press . To delete all custom aplets, press CLEAR . hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
R-1 R Re ference inf ormation Glossary aplet A small application, limited to one topic. The built-in aplet types are Function, Parametric, Polar, Sequence, Solve, Statistics, Inference, Finance, Trig Explorer, Quad Explorer, Linear Explorer and Triangle Solve. An aplet can be filled with the data and solutions for a specific problem. It is reusable (like a program, but easier to use) and it records all your settings and definitions. command An oper ation for use in programs. Commands can store results in variables, but do no t display re sults. Arguments are separated by semi- colons, such as DISP expression ; line# . expression A number, variable, or algebraic expression (numbers plus functions) that produces a value. function An operation, possibly with arguments, that returns a result. It does not store results in variables. The arguments must be enclosed in parentheses and separated with commas (or periods in Comma mode), such as CROSS ( matrix1,matrix2 ). HOME The basic starting point of the calculator. Go to HOME to do calculations. Library For aplet management: to start, save, reset, send and receive aplets. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
R-2 list A set of values separated by commas (periods if the Decimal Mark mode is set to Comma ) and enclosed in braces. Lists are commonly used to enter statistical data and to evaluate a function with multiple values. Created and manipulated by the List editor and catalog. matrix A two-dimensional array of values separated by commas (periods if the Decimal Mark mode is set to Comma ) and enclosed in nested brackets. Created and manipulated by the Matrix catalog and editor. Vectors are also handled by the Matrix catalog and editor. menu A choice of options given in the display. It can appear as a list or as a set of menu-key labels across the bottom of the display. menu keys The top row of keys. Their operatio ns depend on the current context. The labels along the bottom of the display show the current meanings. note Text that you write in the Notepad or in the Note view for a specific aplet. program A reusable set of instructions that you record using the Program editor. sketch A drawing that you make in the Sketch view for a specific aplet. variable The name of a number, list, matrix, note, or graphic that is stored in memory. Use to store and use to retrieve. vector A one-dimensional array of values separated by commas (periods if the Decimal Mark mode is set to Comma ) and enclosed in single brackets. Created and manipulated by the Matrix catalog and editor. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
R-3 Resetting the HP 40gs If the calculator âlocks upâ and seems to be stuck, you must reset it. This is much like resetting a PC. It cancels certain operations, restores ce rtain conditions, and clears temporary memory locations. However, it does not clear stored data (variables, aplet datab ases, programs) unless you use th e procedur e, âTo erase all memory an d reset defaultsâ. To reset using the keyboard Press and hold the key and the third menu key simultaneously, then release them. If the calcu lator does no t respond to the above key sequence, then: 1. T urn the calculator o ver and locate the small hole in the back o f the calculato r . 2 . Insert the end of a straightened metal paper clip into the hole as f ar as it will go . Hold it ther e fo r 1 second , then remo ve it . 3 . Pr ess If necessary , press and the fir st and last menu k e ys simultaneousl y . (Note: This w ill er ase y our calculat or memory .) To erase all memory and reset defaults If the calculator does not respond to the above resetting procedures, you might need to restart it by erasing all of memory. You will lose everything you have stored. All factory-default settings are restored. 1. Pr ess and hold the ke y , the firs t menu k ey , and the last menu ke y simultaneously . 2 . Re lease all k ey s in the r ev erse or der . Note: T o cancel this process , relea se only the top-r ow k ey s, then pr es s the third men u ke y . views The possible contexts for an aplet: Plot, Plot Setup, Numeric, Numeric Setup, Symbolic, Symbolic Setup, Sketch, Note, and special views like split screens. ReferenceInfo.fm Pa ge 3 Friday, Dec ember 16, 2005 11:26 AM
R-4 If the calculator does not turn on If the HP 40gs does not turn on follow the steps below until the calculator turns on. You may find that the calculator turns on before you have completed the procedure. If the calculator still does not turn on, please contact Customer Support for further information. 1. Pres s and hold the ke y fo r 10 seconds. 2 . Pres s and hold the ke y and the th ird men u ke y simultaneou sly . Re lease the thir d menu k ey , then release the ke y . 3 . Pres s and hold the ke y , the fir st menu k ey , and the six th menu k ey sim ultaneousl y . Releas e the six th menu k e y , then releas e the fir st menu k ey , and then release the ke y . 4. Locat e the small hole in the back of the calc ulator . Insert the end of a straightened metal paper clip into the hole as fa r as it will go . Hold it ther e for 1 second , then r emov e it . Press the k ey . 5 . Remo ve the batteri es (see âBatter ies â on page R-4) , pres s and hold the key f or 10 seconds, and then put the batterie s back in. Pr es s the ke y . Operating details Operating temperature: 0 ° to 45 ° C (32 ° to 113 ° F). Storage temperature: â20 ° to 65 ° C (â 4 ° to 149 ° F). Operating and storage humidity: 90% relative humidity at 40 ° C (104 °F) maximum. Avoid getting the calculator wet. Battery operates at 6.0V dc, 80mA maximum. Batteries The calculator uses 4 AAA(LR03) batteries as main power and a CR2032 lithium battery for memory backup. Before using the calculator , please install the batteries according to the following procedure. hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
R-5 To install the main batteries a. Slide up the battery compartment cover as illustrated. b. Insert 4 new AAA (LR03) batteries into the main compartment. Make sure each batte ry is inserted in the indicated direction. To install the backup battery a. Press down the holder. Push the plate to the shown direction and lift it. b. Insert a new CR2032 lithium battery. Make sure its positive ( ) side is facing up. c. Replace the plate and push it to the original place. After installing the batteries, press to turn the power on. Warning: It is recommended that you replace this battery every 5 ye ars. When the low battery icon is displaye d, you need to replace the batte ries as soon as possible. However, avoid removing th e backup battery and main batteries at the same time to avoid data lost. hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
R-6 Variables Home variables The home variables are: Category Available name Complex Z1... Z9, Z0 Graphic G1 ... G9, G0 Library Function Parametric Polar Sequence Solve Statistics User-named List L1 ... L9 , L0 Matrix M1 ... M9 , M0 Modes Ans Date HAngle HDigits HFormat Ierr Time Notepad User-named Program Editline User-named Real A...Z, θ hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
R-7 Function aplet variables The function aplet variables are: Category Availa ble name Plot A xes Connect Coord FastRes Grid Indep InvCross Labels Recenter Simult Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Plot-FCN Area Extremum Isect Root Slope Symbolic Angle F1 F2 F3 F4 F5 F6 F7 F8 F9 F0 Numeri c Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
R-8 Parametric aplet variables The parametric aplet variables are: Category Available name Plot Axe s Connect Coord Grid Indep InvCross Labels Recenter Simult Tmin Tmax Tracing Tstep Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yzoom Symbolic Angle X1 Y1 X2 Y2 X3 Y3 X4 Y4 X5 Y5 X6 Y6 X7 Y7 X8 Y8 X9 Y9 X0 Y0 Numeric Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
R-9 Polar aplet variables The polar aplet variables are: Category Available names Plot A xes Connect Coord Grid Indep InvCross Labels Recenter Simult Umin Umax θ step Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle R1 R2 R3 R4 R5 R6 R7 R8 R9 R0 Numeri c Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
R-10 Sequence aplet variables The sequence aplet variables are: Category Available name Plot Axe s Coord Grid Indep InvCross Labels Nmin Nmax Recenter SeqPlot Simult Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yzoom Symbolic Angle U1 U2 U3 U4 U5 U6 U7 U8 U9 U0 Numeric Digits Format NumCol NumFont NumIndep NumRow NumStart NumStep NumType NumZoom Note NoteText Sketch Page PageNum hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
R-11 Solve aplet variables The solve aplet variables are: Category Availa ble name Plot A xes Connect Coord FastRes Grid Indep InvCross Labels Recenter Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle E1 E2 E3 E4 E5 E6 E7 E8 E9 E0 Numeri c Digits Format NumCol NumRow Note NoteText Sketch Page PageNum hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
R-12 Statistics aplet variables The statistics aplet variables are: Category Available name Plot Axe s Connect Coord Grid Hmin Hmax Hwidth Indep InvCross Labels Recenter S1mark S2mark S3mark S4mark S5mark StatPlot Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle S1fit S2fit S3fit S4fit S5fit Numeric C0,...C9 Digits Format NumCol NumFont NumRow StatMode Stat-One Max Σ Mean Σ Median Min Σ N Σ Q1 Q3 PSDev SSDev PVar Σ SVar Σ Tot Σ Stat-Two Corr Cov Fit MeanX MeanY RelErr Σ X Σ X2 Σ XY Σ Y Σ Y2 Note NoteText Sketch Page PageNum hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
R-13 MATH menu categories Math functions The math functions are: Category Availa ble name Calculus TAYLOR Complex ARG CONJ IM RE Constant e i MAXREAL MINREAL Ï Hyperb . ACOSH ASINH ATANH COSH SINH TANH ALOG EXP EXPM1 LNP1 List CONCAT Î LIST MAKELIST Ï LIST POS REVERSE SIZE Σ LIST SORT Loop ITERATE RECURSE Σ â â« hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
R-14 Matrix COLNORM COND CROSS DET DOT EIGENVAL EIGENVV IDENMAT INVERSE LQ LSQ LU MAKEMAT QR RANK ROWNORM RREF SCHUR SIZE SPECNORM SPECRAD SVD SVL TRACE TRN Polynom. POLYCOEF POLYEVAL POLYFORM POLYROOT Prob. COMB ! PERM RANDOM UTPC UTPF UTPN UTPT Real CEILING DEG âRAD FLOOR FNROOT FRAC HMS â â HMS INT MANT MAX MIN MOD % %CHANGE %TOTAL RAD âDEG ROUND SIGN TRUNCATE XPON Stat-Two PREDX PREDY Symbolic = ISOLATE LINEAR? QUAD QUOTE | Category Available name (Continued) hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
R-15 Program constants The program constants are: Tests < ⤠= = â > ⥠AND IFTE NOT OR XOR Trig ACOT ACSC ASEC COT CSC SEC Category Av ailable name (Continued) Category Availa ble name Angle Degrees Grads Radians Format Standard Fixed Sci Eng Fraction SeqPlot Cobweb Stairstep S1...5fit Linear LogFit ExpFit Power Trigonometric QuadFit Cubic Logist User Exponent StatMode Stat1Var Stat2Var StatPlot Hist BoxW hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
R-16 Physical Constants The physical constants are: Category Available Nam e Chemist ⢠Avogadro (A vagadr o âs Number , NA) ⢠Boltz . (Boltmann, k) ⢠mol. vo... (molar v olume , Vm) ⢠univ gas (univ er sal gas, R) ⢠std temp (standard temper ature , St d T) ⢠std pres (standard pr essur e , St d P) Phyics ⢠StefBolt (S tef an -Boltzmann, Ï ) â¢l ight s... (speed of light , c) ⢠permitti (permitti vity , ε 0) ⢠permeab (permeability , μ 0) ⢠acce gr... (acceleration of gra v ity , g) ⢠gravita... (gra v itation , G) Quantum ⢠Plankâs (Plankâs cons tant , h) ⢠Diracâs (Diracâs , hbar) ⢠e charge (electr onic c harge , q) ⢠e mass (electr on mass, me) ⢠q/me ra... (q/me rati o , qme) ⢠proton m (pr oton mass , mp) ⢠mp/me r... (mp/me rati o , mpme) ⢠fine str (fine st ructur e , α ) ⢠mag flux (magnetic flu x , Ï ) ⢠Faraday (F arada y , F) ⢠Rydberg (Ry dberg , ) ⢠Bohr rad (Bohr r adius, a0) ⢠Bohr mag (Bohr magneton, μ B) ⢠nuc. mag (nuclear magnet on, μ N) ⢠photon... (photon w av elength, λ ) ⢠photon... (photon fr equenc y , f0) ⢠Compt w... (Compton wa ve length, λ c) R â hp40g .book Page 16 Friday, December 9, 2005 1:03 AM
R-17 CAS functions CAS functions are: Category Function Algebra COLLECT DEF EXPAND FACTOR PARTFRAC QUOTE STORE | SUBST TEXPAND UNASSIGN Complex i ABS ARG CONJ DROITE IM â RE SIGN Constant e i â Ï Diff & Int DERIV DERVX DIVPC FOURIER IBP INTVX lim PREVAL RISCH SERIES TABVAR TAYLOR0 TRUNC Hyperb . ACOSH ASINH ATANH COSH SINH TANH Integer DIVIS EULER FACTOR GCD IDIV2 IEGCD IQUOT IREMAINDER ISPRIME? LCM MOD NEXTPRIME PREVPRIME Modular ADDTMOD DIVMOD EXPANDMOD FACTORMOD GCDMOD INVMOD MODSTO MULTMOD POWMOD SUBTMOD hp40g .book Page 17 Friday, December 9, 2005 1:03 AM
R-18 Polynom. EGCD FACTOR GCD HERMITE LCM LEGENDRE PARTFRAC PROPFRAC PTAYL QUOT REMAINDER TCHEBYCHEFF Real CEILING FLOOR FRAC INT MAX MIN Rewrite DISTRIB EPSX0 EXPLN EXP2POW FDISTRIB LIN LNCOLLECT POWEXPAND SINCOS SIMPLIFY XNUM XQ Solve DESOLVE ISOLATE LDEC LINSOLVE SOLVE SOLVEVX Tests ASSUME UNASSUME > ⥠< ⤠= = â AND OR NOT IFTE Trig ACOS2S ASIN2C ASIN2T ATAN2S HALFTAN SINCOS TAN2CS2 TAN2SC TAN2SC2 TCOLLECT TEXPAMD TLIN TRIG TRIGCOS TRIGSIN TRIGTAN Catego ry Fu nction (Con tinued) hp40g .book Page 18 Friday, December 9, 2005 1:03 AM
R-19 Program commands The program commands are: Category Command Aplet CHECK SELECT SETVIEWS UNCHECK Branch IF THEN ELSE END CASE IFERR RUN STOP Drawing ARC BOX ERASE FREEZE LINE PIXOFF PIXON TLINE Graphic DISPLAY â â DISPLAY â GROB GROBNOT GROBOR GROBXOR MAKEGROB PLOT â â PLOT REPLACE SUB ZEROGROB Loop FOR = TO STEP END DO UNTIL END WHILE REPEAT END BREAK Matrix ADDCOL ADDROW DELCOL DELROW EDITMAT RANDMAT REDIM REPLACE SCALE SCALEADD SUB SWAPCOL SWAPROW Print PRDISPLAY PRHISTORY PRVAR Prompt BEEP CHOOSE CLRVAR DISP DISPXY DISPTIME EDITMAT FREEZE GETKEY INPUT MSGBOX PROMPT WAIT Stat-One DO1VSTATS RANDSEED SETFREQ SETSAMPLE hp40g .book Page 19 Friday, December 9, 2005 1:03 AM
Status messages Stat-Two DO2VSTATS SETDEPEND SETINDEP Category Command (Continued) Message Meaning Bad Argument Type Incorrect input for this operation. Bad Argument Value The value is out of range for this operation. Infinite Result Math exception, such as 1/0. Insufficient Memory You must recover some memory to continue operation. Delete one or more matrices, lists, notes, or programs (using catalogs), or custom (not built- in) aplets (using MEMORY ). Insufficient Statistics Data Not enough data points for the calculation. For two-variable statistics there must be two columns of data, and each column must have at least four numbers. Invalid Dimension Array argument had wrong dimensions. Invalid Statistics Data Need two columns with equal numbers of data values. hp40g .book Page 20 Friday, December 9, 2005 1:03 AM
R-21 Invalid Syntax The function or command you entered does not include the proper arguments or order of arguments. The delimiters (parentheses, commas, periods, and semi-colons) must also be correct. Look up the function name in the index to find its proper syntax. Name Conflict The | (where) function attempted to assign a value to the variable of integration or summation index. No Equ ation s Checked You must ente r and check a n equation (Symbolic view) before evaluating this function. (OFF SCREEN) Function value, root, extremum, or intersection is not visible in the current screen. Receive Error Problem with data reception from another calculator. Re- send the data. Too Few Arguments The command requires more arguments than you supplied. Undefined Name The global variable named does not exis t. Undefined Result The calculation has a mathematically undefined result (such as 0/0). Out of Memory You must recover a lot of memory to continue operation. Delete one or more matrices, lists, notes, or programs (using catalogs), or custom (not built- in) aplets (using MEMORY ). Message Meaning (Continued) hp40g .book Page 21 Friday, December 9, 2005 1:03 AM
hp40g .book Page 22 Friday, December 9, 2005 1:03 AM
W-1 Limited W arranty HP 40gs Graphing Calculator; Warranty period: 1 2 months 1. HP warr ants to y ou, the end-user c ustomer , that HP hard war e, accessor ies and supplies w i ll be fr ee fr om defec ts in materi als and wo rkmanship after the date of pur chase , for the per iod spec ifi ed abov e. If HP recei ves notice of such defects during the warr ant y peri od, HP w ill , at its option, e ither repair o r replace produc ts whic h pro ve to be defecti ve . Replacement produc ts may be either ne w or lik e -new . 2 . HP war ran ts to you that HP so ftware w ill not fail to ex ec ute its pr ogr amming instruc tions after the date of pur chase , f or the period s pecif ied abo ve , due to defec ts in materi al and wor kmanship when pr operl y installed and used . If HP rece iv es notice of suc h defec ts during the w arr anty period , HP w ill replace softwar e media whic h does not ex ecute its progr amming instruc tions due to such de fects . 3 . HP does not w arr ant that the oper ation of HP produc ts will be uninter rupted or err or fr ee. If HP is unable , within a r easona ble time, to r epair or r eplace any pr oduct to a condition as w arr anted, y ou w ill be entitled to a r efund of the pur chas e pri ce upon pr ompt r eturn o f the pr oduct w ith pr oof of pur c hase . 4. HP pr oducts may con tain re manufactur ed parts equiv alent to ne w in perfor mance or may hav e been subj ect to inci dental u se . 5 . W a rr anty does not apply to defects r esulting fr om (a) impr oper or inadequate maintenance or calibr ation , (b) software , interfacing , par ts or suppl ies not supplied b y HP , (c) unauthori z ed modifi cation or mis use, (d ) o perat ion out sid e of th e pub li sh ed env ir onmental spec ifi cations f or the produc t, or (e) impr oper site prepar ation o r maintenance. hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
W-2 6. HP MAKE S NO O THER EXP RE S S W ARRANTY OR CONDIT ION WHE THER WRITTEN OR ORAL. T O THE EXTENT ALL OWED B Y L OCAL L A W , ANY IMPLIED W ARRANTY OR CONDIT ION OF MERCHANT ABILITY , SA TI SF ACT OR Y QU ALITY , OR FITNE SS FOR A P AR TICULAR PURP OSE IS LIMI TED T O THE DURA TION OF THE EXPRE SS W ARRANTY SET F ORTH AB OVE . Some countri es, st ates or pro vinces do not allo w limitations o n the durati on of an implied warr anty , so th e abov e limitation or ex clusion mi ght not appl y to y ou . Th is war ran ty giv es yo u specif ic legal ri ghts and yo u might also hav e other ri ghts that v ary from co untry to country , state to state , or pro v ince to pro v ince. 7 . T O THE EXTENT ALL O WED B Y L OCAL LA W , THE REMEDIES IN THIS W ARRANTY ST A TEMENT ARE Y OU R S OLE AND EXCL US IVE REMEDIES . EX CEPT A S INDICA TED ABO VE , IN NO EVENT WILL HP OR I TS SUP PLIER S BE LIABLE FOR L OS S OF DA T A OR FOR DIRECT , SPEC IAL, INCIDENT AL , CONSE QUENTIAL (INCL UDING L O S T PROFI T OR D A T A) , OR O THER DA MA GE , WHETHER B A SED IN CONTRA CT , TOR T , OR O THERWI SE . Some countr ies , States or pr ov inces do not allo w the ex c lusion or limitati on of inc iden tal or consequen tial damages, so the abov e limitation o r ex clusion may no t apply to y ou . 8. The only w arr anties for HP pr oducts and services ar e set forth in the expres s warr anty statements accompany ing such pr oducts and serv ices . HP shall not be liable f or tec hnical or editor ial er ror s or omissions c ontaine d herein. FOR CONSUMER TRANSACTIONS IN AUSTRALIA AND NEW ZEALAND: THE WARRANTY TERMS CONTAINED IN THIS STATEMENT, EXCEPT TO THE EXTENT LAWFULLY PERMITTED, DO NOT EXCLUDE, RESTRICT OR MODIFY AND ARE IN ADDITION TO THE MANDATORY STATUTORY RIGHTS APPLICABLE TO THE SALE OF THIS PRODUCT TO YOU. hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
W-3 Service Europe Country : T elephone numbers Austr ia 43-1-3 60 2 771203 Belgium 3 2 - 2 - 712 6 219 D e n m a r k 45 - 8 - 233 284 4 Ea st e r n Eu ro p e countr ies 4 20 -5- 414 2 2 5 2 3 Fi n l a n d 35 - 8964 0 0 0 9 Fr ance 3 3-1 - 4 9 9 3 9006 German y 49-6 9-9 5 30 7103 Gr eece 4 20 -5- 414 2 25 2 3 Holland 31- 2 -06 5 45 301 Italy 3 9-02 - 7 5419 7 82 Nor way 4 7 -6384 9 309 P ortugal 351- 2 2 9 5 7 0 200 Spain 34-915-64 209 5 S weden 46 -8519 9 206 5 Sw i t ze r l a n d 4 1 - 1 - 43953 58 (German) 41- 22 -8 2 7 8 7 80 (F renc h) 3 9-02 - 7 5419 7 82 (Italian) T urk ey 4 20 -5- 414 2 2 5 2 3 UK 44 - 20 7 - 45 80161 Cz ec h Repu blic 4 20 -5-414 2 2 5 2 3 South Af rica 2 7 -11- 23 7 6 2 00 Lu x embourg 3 2 - 2 - 712 6 219 Other Eur opean countr ies 4 20 -5- 414 2 2 5 2 3 Asia P acific Country : Telephone numbers Au str alia 61-3-9 841-5 211 Singapor e 61-3-98 41-5 211 hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
W-4 P lease logon to http://www .hp .com for th e la test ser vice and suppo rt informati on .h L.Ame ric a Country: T elephone numbers Ar gentina 0 -810 -55 5-5 5 20 Bra zil Sao P aulo 3 7 4 7 - 7 7 99; RO T C 0 -800 -15 77 51 M e xi c o M x C i t y 5258- 9922; RO T C 01-800 - 4 7 2 -6 68 4 Ven e z u e l a 0 8 0 0 - 47 4 6 - 8368 Chil e 8 00 - 360 999 C o l u m b i a 9 - 8 0 0 - 1 1 4726 P eru 0- 800 -10111 Central America & Caribbe an 1-800 - 711- 28 84 Guatemala 1-800 -99 9-5105 Pu e r t o R i c o 1 - 877-232- 0 5 89 Cos ta Ri ca 0 - 800 -011-05 2 4 N.America Country : Telephone numbers U .S . 1800 -HP INVENT Ca na d a (905 ) 2 0 6 - 4663 o r 800- HP INVENT RO T C = Rest of th e c ou ntr y hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
W-5 Regulatory Notices Federal Commu- nications Commission Notice This equipment has been tested and found to comply with the limits for a Class B digital device , pursuant to Part 15 of the FCC Rules. These limi ts are designed to provide reasonable protection agains t harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, i f not installed and used in accordance with th e instructions, may cause harmful interference to r adio communications. However, there is no guarantee that interference will not occur in a particular installa tion. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interfer ence by one or more of the following measures: ⢠Reorient or relocate the receiving antenna. ⢠Increase the separation be tween the equipment and the receiver. ⢠Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. ⢠Consult the dealer or an experien ced radio or television technician for help. Modifications The FCC requires the user to be notified that any changes or modifications made to this device that are not expressly approved by Hewlett-Packard Company may void the user's authority to operate the equipment. Cables Connections to this device mu st be made with shielded cables with metallic RFI/EMI connector hoods to maintain compliance with FCC rules and regulations. Declaration of Conformity for Products Marked with FCC Logo, United States Only This device complies with Pa rt 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. For questions regarding your product, contact: hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
W-6 Hewlett-Packard Company P. O. Box 692000, Mail Sto p 530113 Houston, Texas 77269-2000 Or, call 1-800-474-6836 For questions regarding this FCC declaration, co ntact: Hewlett-Packard Company P. O. Box 692000, Mail Sto p 510101 Houston, Texas 77269-2000 Or, call 1-281-514-3333 To identify this product, refer to the part, series, or model number found on the product. Canadian Notice This Class B digital apparatus meets all requirements of the Canadian Interference-Causing Equipment Regulations. Avis Canadien Cet appa reil numérique de la classe B respecte toutes les ex igences du Règlement sur le ma téri el brouilleur du Can ad a . European Union Regulatory Notice This product complies with the following EU Directives: ⢠Low Voltage Directive 73/23/EEC ⢠EMC Directive 89/336/EEC Compliance with these direct ives implies conformity to applicable harmonized Eur opean standards (European Norms) which are listed on the EU Declaration of Conformity issued by Hewlett- Packard for this product or product family. This compliance is indicated by the following conformity marking placed on the product: This marking is v alid for non-Tele com products and EU harmonize d Telecom products (e.g . Bluetooth). xxxx * This marking is valid f or EU non-harmonized Tel ecom products . *Notified body num ber (used only if applica ble - refer to the pr oduct label) hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
W-7 Japanese Notice ã ã®è£ ç½®ã¯ ã æ å ± å¦çè£ ç½®ç黿³¢é害èªä¸»è¦å¶åè° ä¼ ï¼VCCIï¼ ã®åºæº ã« åº ã¥ ã 㯠㩠㹠B æ å ±æè¡è£ ç½® ã§ ã ã ã ã®è£ ç½®ã¯ã å®¶åºç° å¢ ã§ ä½¿ç¨ ã ã ã 㨠ã ç®ç 㨠ã 㦠ã ã¾ ã ãã ã ã® è£ ç½®ã 㩠㸠㪠ã ã 㬠ã 㸠㧠㳠åä¿¡æ© ã«è¿ æ¥ ã ã¦ ä½¿ç¨ ã ã ã 㨠ã åä¿¡é害 ã å¼ ã èµ· ã ã ã 㨠ã ã ã ã¾ ãã å ã æ±ãèª¬æ æ¸ã«å¾ ã£ ã¦ æ£ ã ãå ã æ±ã ã ã 㦠ã ã ã ãã Korean Notice Disposal of Waste Equipment by Users in Private Household in the European Union This s y mbol on the produ ct or on its pack aging indi cates that this pr oduct m u s t n o t b e d i s p o s e d o f w i t h y o u r o t h e r household waste . Instead, it is your res ponsibil ity to dispose of your waste equipment b y handing it ov er to a designat ed collectio n point f or the rec yc ling of wa ste electr ical and electroni c equipm ent . The separate collection and r ecyc ling of y our waste equipment at the time of dispos al w ill help to conserv e natural r esource s and ensur e that it is r ecyc led in a manner that pro tects human health and the env ironment . F or more inf ormation about wher e y ou can drop off y our waste equipment for rec ycling , please contact your local c it y office , your household waste disposal service or the shop wher e you pur chased the produc t. hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
I-1 Index A ABCUV 14-62 ABS 14-45 absolute value 13-6 ACOS2S 14-38 add 13-4 ADDTMOD 14-51 ALGB menu 14-10 algebraic entry 1-19 alpha characters typing 1-6 alphabetical sorting 22-6 angle measure 1-10 in statistics 10-12 setting 1-11 animation 20-5 creating 20-5 annunciators 1-3 Ans (last answer) 1-24 antiderivative 14-68 , 14-69 antilogarithm 13-4, 13-10 aplet attaching notes 22-4 clearing 22-3 copying 22-4 definition of R-1 deleting 22-6 Function 13-21 Inference 11-1 key 1-4 library 22-6 Linear Solver 8-1 opening 1-16 Parametric 4-1 Polar 5-1 receiving 22-5 resetting 22-3 sending 22-4, 22 -5 Sketch view 20-1 Solve 7-1 sorting 22-6 statistics 10-1 transmitting 22-5 Triangle Solver 9-1 aplet commands CHECK 21-14 SELECT 21-14 SETVIEWS 21-17 UNCHECK 21-17 aplet variables definition 17-1, 17-8 in Plot view 21-31 new 17-1 aplet views canceling operations in 1-1 changing 1-19 note 1-18 Numeric view 1-17 Plot view 1-16 sketch 1-18 split-screen 1-17 Symbolic view 1-16 approximation 14-32 arc cosecant 13-20 arc cosine 13-5 arc cotangent 13-20 arc secant 13-20 arc sine 13-4 arc tangent 13-5 area graphical 3-10 interactive 3-10 variable 21-31 ARG 13-7 arguments with matrices 18-10 ASIN2C 14-39 ASIN2T 14-39 ASSUME 14-61 ATAN2S 14-39 attaching a note to an aplet 20-1 a sketch to an aplet 20-3 auto scale 2-14 axes plotting 2-7 variable 21-31 B bad argument R-20 hp40g .book Page 1 Friday, December 9, 2005 1:03 AM
I-2 bad guesses error message 7-7 batteries R-4 Bernoulliâs number 14-65 box-and-whisker plot 10-16 branch commands CASE...END 21-18 IF...THEN...ELSE...END 21-18 IFERR...THEN...ELSE 21-18 branch structu res 21-17 build your own table 2-19 C calculus operation s 13-7 CAS 14-1, 15-1 configurat ion 15-3 help 15-4 history 14-8 in HOME 14-7 list of functions 14-9, R-17 modes 14-5, 15-3 online help 14-8 variables 14-4 catalogs 1-30 CFG 15-3 Chinese remainders 14-62, 14- 65 CHINREM 14-62 chronological sorting 22-6 circle drawi ng 20-4 clearing aplet 22-3 characters 1-22 display 1-22 display history 1-25 edit line 1-22 lists 19-6 plot 2-7 cobweb graph 6-1 coeffici ents polynomial 13-11 COLLECT 14-10 columns changing position 21-25 combinations 13-12 commands aplet 21-14 branch 21-17 definition of R-1 drawing 21-19 graphic 21-21 loop 21-23 print 21-25 program 21-4, R-19 stat-one 21-29 stat-two 21-30 with matrices 18-10 complex number functions 13-6, 13-17 conjugate 13-7 imaginary part 13-7 real part 13-8 complex numbers 1-29 entering 1-29 math functions 13-7 storing 1-29 computer algebra system Se e CAS confidence intervals 11-15 CONJ 13-7 conjugate 13-7 connecting data points 10-19 variable 21-31 via serial cable 22-5 via USB cable 22-5 connectivity kit 22-4 constant? error message 7-7 constants e 13-8 i 13-8 maximum real number 13-8 minimum real number 13-8 physical 1-8, 13-25, R-16 program R-15, R-16 contrast decreasing display 1-2 increasing display 1-2 conversions 13-8 coordinate display 2-9 copying display 1-22 graphics 20-6 notes 20-8 programs 21-8 correlation coefficient 10-17 CORR 10-17 statistical 10-15 cosecant 13-20 hp40g .book Page 2 Friday, December 9, 2005 1:03 AM
I-3 cosine 13-4 inverse hyperbolic 13-9 cotangent 13-20 covariance statistical 10-15 creating aplet 22-1 lists 19-1 matrices 18-2 notes in Notepad 20-6 programs 21-4 sketches 20-3 critical value(s) displayed 11-4 cross product vector 18-11 curve fitting 10-12, 10-17 CYCLOTOMIC 14-63 D data set definition 10-8 date, setting 21-27 debugging programs 21-7 decimal changing format 1-10 scaling 2-14, 2-15 decreasing display con trast 1-2 DEF 14-10 definite integral 13-6 deleting aplet 22-6 lists 19-6 matrices 18-4 programs 21-9 statistical data 10-11 delimiters, programming 21-1 DERIV 14-16 derivative 14-16 derivatives definition of 13-6 in Function aplet 13-22 in Home 13-21 DERVX 14-16 DESOLVE 14-33 determinant square matrix 18-11 DIFF me nu 14-16 differential equations 14-33 , 14-35 , 14-57 differentiation 13-6 , 14-33 digamma function 14-67, 14-68 display 21-2 1 adjusting contrast 1-2 annunciator line 1-2 capture 21-21 clearing 1-2 date and time 21-27 element 18-5 elements 19-4 engineeri ng 1-10 fixed 1-10 fraction 1-10 history 1-22 line 1-23 matrices 18-5 parts of 1-2 printing contents 21-25 rescaling 2-13 scientific 1-10 scrolling through history 1-25 soft key labels 1-2 standard 1-10 DISTRIB 14-28 distributivity 14-12 , 14-28 , 14-30 divide 13-4 DIVIS 14-47 DIVMOD 14-52 DIVPC 14-17 drawing circles 20-4 keys 20-4 lines and boxes 20-3 drawing commands ARC 21-19 BOX 21-20 ERASE 21-20 FREEZE 21-20 LINE 21-20 PIXOFF 21-20 PIXON 21-20 TLINE 21-20 DROITE 14-45 E e 13-8 edit line 1-2 editing matrices 18-4 hp40g .book Page 3 Friday, December 9, 2005 1:03 AM
I-4 notes 20-2 programs 21-5 Editline Program catalog 21-2 editors 1-30 EGCD 14-55 eigenvalues 18-11 eigenvectors 18-11 element storing 18-6 E-lessons 1-12 engineering number format 1-11 EPSX0 14-29 equals for equations 13-17 logical test 13-19 Equation Writer 14-2, 15-1, 16-1 selecting terms 15-5 equations solving 7-1 erasing a line in Sketch view 21-20 error messages bad guesses 7-7 constant? 7-7 Euclidean division 14-48, 14-49 EULER 14-47 exclusive OR 13-20 exiting views 1-19 EXP2HYP 14-63 EXP2POW 14-29 EXPAND 14-12 EXPANDMOD 14-52 expansion 14-25, 14-27 EXPLN 14-29 exponent fit 10-13 minus 1 13-10 of value 13-17 raising to 13-5 exponentials 14-30, 14-63 expression defining 2-1, R-1 entering in HOME 1-19 evaluating in aplets 2-3 literal 13-18 plot 3-3 extended greatest common divisor 14-55 extremu m 3-10 F FACTOR 14-12 , 14-47 , 14-56 factorial 13-13 factorization 14-12 FACTORMOD 14-53 FastRes variable 21-32 FDISTRIB 14-30 fit a curve to 2VAR data 10-17 choosing 10-12 defining your own 10-13 fixed number format 1-10 font size change 3-8, 15-2, 20-5 forecasting 10-20 FOURIER 14-17 fraction number format 1-11 full-precision display 1-10 function analyze graph with FCN tools 3-4 definition 2-2, R-1 entering 1-19 gamma 13-13 intersection point 3-5 math menu R-13, R-17 slope 3-5 syntax 13-2 tracing 2-8 Function aplet 2-20, 3-1 function variables area 21-31 axes 21-31 connect 21-31 fastres 21-32 grid 21-32 in menu map R-7 indep 21-33 isect 21-33 labels 21-34 Recenter 21-34 root 21-34 ycross 21-37 G GAMMA 14-64 GCD 14-47 , 14-56 GCDMOD 14-53 hp40g .book Page 4 Friday, December 9, 2005 1:03 AM
I-5 glossary R-1 graph analyzing statistical data in 10-19 auto scale 2-14 box-and-wh isker 10-16 capture current display 21-21 cobweb 6-1 comparing 2-5 connected points 10-17 defining the independent variable 21-36 drawing axes 2-7 expressions 3-3 grid points 2-7 histogram 10-15 in Solve aplet 7-7 one-variable statistics 10-18 overlaying 2-15 scatter 10-15, 10-17 split-sc reen view 2-14 splitting into plot and close-up 2-13 splitting into plot and table 2-13 stairsteps 6-1 statistical data 10-15 t values 2-6 tickmarks 2-6 tracing 2-8 two-variable statistics 10-18 Graphic commands â GROB 21-21 DISPLAY â 21-21 GROBNOT 21-21 GROBOR 21-21 GROBXOR 21-22 MAKEGROB 21-22 PLOT â 21-22 REPLACE 21-22 SUB 21-22 ZEROGROB 21-22 graphics copying 20-6 copying into Sketch vi ew 20-6 storing and recalling 20-6, 21-21 greatest common divisor 14-56 H HALFTAN 14-40 HERMITE 14-56 histogram 10-15 adjusting 10-16 range 10-18 setting min/max values for bars 21-32 width 10-18 history 1-2, 14-8, 21-25 Home 1-1 calculating in 1-19 display 1-2 evaluating expressions 2-4 reusing lines 1-23 variables 17-1, 17-7, R-6 home 14-7 horizontal zoom 21-38 hyperbolic maths functions 13-10 hyperbolic trigonometry ACOSH 13-9 ALOG 13-10 ASINH 13-9 ATANH 13-9 COSH 13-10 EXP 13-10 EXPM1 13-10 LNP1 13-10 SINH 13-10 TANH 13-10 hypothes is alternative 11-2 inference tests 11-8 null 11-2 tests 11-2 I i 13-8 , 14-45 IABCUV 14-64 IBERNOULLI 14-65 IBP 14-18 ICHINREM 14-65 IDIV2 14-48 IEGCD 14-48 ILAP 14-65 IM 13-7 implied mu ltiplicati on 1-20 importing graphics 20-6 notes 20-8 increasing display contrast 1-2 indefinite integral hp40g .book Page 5 Friday, December 9, 2005 1:03 AM
I-6 using symbolic variables 13-23 independent values adding to table 2-19 independent variable defined for Tracing mode 21-33 inference confidence intervals 11-15 hypothesis tests 11-8 One-Proportion Z- Interval 11-17 One-Sampl e Z-Interva l 11-15 One-Sampl e Z-Test 11-8 Two-Proportion Z-Interval 11-17 Two-Proportion Z-T est 11-11 Two-Sample T-Interval 11-19 Two-Sample Z-Interva l 11-16 infinite result R-20 initial guess 7-5 input forms resetting default values 1-9 setting Modes 1-11 insufficient memory R-20 insufficient statistics data R-20 integer rank matrix 18-12 integer scaling 2-14, 2-15 integral definite 13-6 indefinite 13-23 integration 13-6, 14-18, 14-24 interpreting intermediate guesses 7-7 intersection 3-11 INTVX 14-19 invalid dimension R-20 statistics data R-20 syntax R-21 inverse hyperbolic cosine 13-9 inverse hyperbolic functions 13-10 inverse hyperbolic sine 13-9 inverse hyperbolic tangent 13 -9 inverse Laplace transform 14-66 inverting matrices 18-8 INVMOD 14-53 IQUOT 14-49 IREMAINDER 14-49 isect variable 21-33 ISOLATE 14-34 ISPRIME? 14-50 K keyboard editing keys 1-5 entry keys 1-5 inactive keys 1-8 list keys 19-2 math functions 1-7 menu keys 1-4 Notepad keys 20-8 shifted keystrokes 1-6 L labeling axes 2-7 parts of a sketch 20-5 LAP 14-67 Laplace transform 14-65 Laplace transform, inverse 14-66 LCM 14-50, 14-57 LDEC 14-35 least common multiple 14-50, 14-57 LEGENDRE 14-57 letters, typing 1-6 library, managing aplets in 22-6 lim 14-21 limits 14-21 LIN 14-30 linear fit 10-13 Linear Solver aplet 8-1 linear systems 14-35 linearize 14-30 , 14-43 LINSOLVE 14-35 list arithmetic with 19-7 calculate sequence of elements 19-8 calculating product of 19-8 composed from differences 19-7 concatenating 19-7 counting elements in 19-9 creating 19-1, 19-3, 19-4, 19-5 deleting 19-6 deleting list items 19-3 displaying 19-4 displaying list elements 19-4 editing 19-3 hp40g .book Page 6 Friday, December 9, 2005 1:03 AM
I-7 finding statistical values in list ele- ments 19-9 generate a series 19-8 list function syntax 19-6 list variables 19-1 returning position of element in 19-8 reversing order in 19-8 sending and receiving 19-6 sorting elements 19-9 storing elements 19-1 , 19-4 , 19-5 storing one element 19-6 LNCOLLECT 14-31 logarithm 13-4 logarithmic fit 10-13 functions 13-4 logarithms 14-31 logical operators AND 13-19 equals (logical test) 13-19 greater than 13-19 greater than or equal to 13-19 IFTE 13-19 less than 13-19 less than or equal to 13-19 NOT 13-19 not equal to 13-19 OR 13-19 XOR 13-20 logistic fit 10-13 loop commands BREAK 21-23 DO...UNTIL...END 21-23 FOR I= 21-23 WHILE...REPEAT...END 21-23 loop functions ITERATE 13-10 RECURSE 13-11 summation 13-11 low battery 1-1 lowercase letters 1-6 M mantissa 13-15 math functions complex number 13-7 hyperbolic 13-10 in menu map R-13, R-17 keyboard 13-3 logical operators 13-19 menu 1-7 polynomial 13-11 probability 13-12 real-number 13-14 symbolic 13-17 trigonometry 13-20 MATH menu 13-1 math operations 1-19 enclosing arguments 1-21 in scientific notation 1-20 negative numbers in 1-20 matric es adding rows 21-24 addition and subtrac tion 18-6 arguments 18-10 arithmetic operations in 18-6 assembly from vectors 18-1 changing row position 21-25 column norm 18-10 comma 19-7 commands 18-10 condition number 18-11 create identity 18-13 creating 18-3 creating in Home 18-5 deleting 18-4 deleting columns 21-24 deleting rows 21-24 determinant 18-11 display eigenvalues 18-11 displaying 18-5 displaying matrix elements 18-5 dividing by a sq uare matrix 18-8 dot product 18-11 editing 18-4 extracting a portion 21-25 finding the trace of a square ma- trix 18-13 inverting 18-8 matrix calculations 18-1 multiplying and divid ing by scalar 18-7 multiplying by vector 18-7 multiplying row by value and add- ing result to second row 21-25 multiplying row number by value 21-25 negating elements 18-8 opening Matrix Editor 21-28 raised to a power 18-7 hp40g .book Page 7 Friday, December 9, 2005 1:03 AM
I-8 redimension 21-24 replacing portion of matrix or vec- tor 21-25 sending or receiving 18-4 singular value decomposition 18-13 singular values 18-13 size 18-12 spectral norm 18-13 spectral radius 18-13 start Matrix Editor 21-24 storing elements 18-3, 18-5 storing matrix elements 18-6 swap column 21-25 swap row 21-25 transposing 18-13 variables 18-1 matrix functions 18-10 COLNORM 18-10 COND 18-11 CROSS 18-11 DET 18-11 DOT 18-11 EIGENVAL 18-11 EIGENVV 18-11 IDENMAT 18-11 INVERSE 18-11 LQ 18-11 LSQ 18-11 LU 18-12 MAKEMAT 18-12 QR 18-12 RANK 18-12 ROWNORM 18-12 RREF 18-12 SCHUR 18-12 SIZE 18-12 SPECNORM 18-13 SPECRAD 18-13 SVD 18-13 SVL 18-13 TRACE 18-13 TRN 18-13 maximum real number 1-22, 13-8 memory R-20 clearing all R-3 organizing 17-9 out of R-21 saving 1-25, 22-1 viewing 17-1 menu lists searching 1-9 minimum real number 13-8 mixed fraction format 1-1 1 modes angle measure 1-10 CAS 14-5 decimal mark 1-11 number format 1-10 MODSTO 14-53 modular arithmetic 14-51 multiple solutions plotting to find 7-7 multiplication 13-4, 14-28 implied 1-20 MULTMOD 14-54 N name conflict R-21 naming programs 21-4 natural exponential 13-4, 13-10 natural log plus 1 13-10 natural logarithm 13-4 negation 13-5 negative numbers 1-20 NEXTPRIME 14-51 no equations checked R-21 non-rational 14-6 Normal Z-distribution, confidence in- tervals 11-15 note copying 20-8 editing 20-2 importing 20-8 printing 21-26 viewing 20-1 writing 20-1 Notepad 20-1 catalog keys 20-7 creating notes 20-6 writing in 20-6 n th root 13-6 null hypothesis 11-2 number format engineering 1-11 fixed 1-10 fraction 1-11 in Solve aplet 7-5 hp40g .book Page 8 Friday, December 9, 2005 1:03 AM
I-9 mixed fraction 1-11 scientific 1-10 Standard 1-10 numeric precision 17-9 Numeric view adding values 2-19 automatic 2-16 build your own table 2-19 display defining function for col- umn 2-17 recalculating 2-19 setup 2-16, 2-19 O off automatic 1-1 power 1-1 on/cancel 1-1 One-Proportion Z-Interval 11-17 One-Sample T-Interval 11-18 One-Sample T-Test 11-12 One-Sample Z-Interval 11-15 One-Sample Z-Test 11-8 online help 14-8 order of precedence 1-21 overlaying plots 2-15, 4-3 P Ï 13-8 PA2B2 14-67 paired columns 10-11 parametric variables axes 21-31 connect 21-31 grid 21-32 in menu map R-8 indep 21-33 labels 21-34 recenter 21-34 ycross 21-37 parentheses to close arguments 1-21 to specify order of operation 1-21 PARTFRAC 14-13, 14-57 partial derivative 14-16 partial fraction expansi on 14-13 partial integration 14-18 pause 21-29 permutations 13-13 pictures attaching in Sketch view 20-3 plot analyzing statistical data in 10-19 auto scale 2-14 box-and-whisker 10-16 cobweb 6-1 comparing 2-5 connected points 10-17, 10-19 decimal scaling 2-14 defining the independent variable 21-36 drawing axes 2-7 expressions 3-3 grid points 2-7 histogram 10-15 in Solve aplet 7-7 integer scaling 2-14 one-variable statistics 10-18 overlay plot 2-13 overlaying 2-15, 4- 3 scaling 2-13 scatter 10-15, 10-17 sequence 2-6 setting up 2-5, 3-2 split-screen view 2-14 splitting 2-14 splitting into plot and close-up 2-13 splitting into plot and table 2-13 stairsteps 6-1 statistical data 10-15 statistics parameters 10-18 t values 2-6 tickmarks 2-6 to capture current display 21-21 tracing 2-8 trigonometric scaling 2-14 two-variable statistics 10-18 plotting resolution and tracing 2-8 plot-view variables area 21-31 connect 21-31 fastres 21-32 function 21-31 grid 21-32 hmin/hmax 21-32 hwidth 21-33 isect 21-33 hp40g .book Page 9 Friday, December 9, 2005 1:03 AM
I-10 labels 21-34 recenter 21-34 root 21-34 s1mark-s5mark 21-34 statplot 21-35 tracing 21-33 umin/umax 21-35 ustep 21-35 polar variables axes 21-31 connect 21-31 grid 21-32 in menu map R-9 indep 21-33 labels 21-34 recenter 21-34 ycross 21-37 polynomial coefficients 13-11 evaluation 13-11 form 13-12 roots 13-12 Taylor 13-7 polynomial functions POLYCOEF 13-11 POLYEVAL 13-11 POLYFORM 13-12 POLYROOT 13-12 ports 22-5 position argument 21-21 power (x rai sed to y) 13-5 powers 14-6 POWEXPAND 14-31 POWMOD 14-54 precedence 1-22 predicted values statistical 10-20 PREVAL 14-23 PREVPRIME 14-51 prime factors 14-47 prime numbers 14-50, 14-51 primitive 14-23 , 14-24 print contents of display 21-25 name an d content s of varia ble 21-26 object in h istory 21-25 variables 21-26 probability functions ! 13-13 COMB 13-12 RANDOM 13-13 UTPC 13-13 UTPF 13-13 UTPN 13-13 UTPT 13-14 program commands 21-4 copying 21-8 creating 21-4 debugging 21-7 deleting 21-9 delimiters 21-1 editing 21-5 naming 21-4 pausing 21-29 printing 21-26 sending and receiving 21-8 structured 21-1 prompt commands beep 21-26 create choose box 21-26 create input form 21-28 display item 21-27 display me ssage box 21-29 halt program execution 21-29 insert line breaks 21-29 prevent sc reen display being up- dated 21-28 set date and time 21-27 store keycode 21-28 PROPFRAC 14-58 PSI 14-67 Psi 14-68 PTAYL 14-58 Q quadratic extremum 3-6 fit 10-13 function 3-4 QUOT 14-58 QUOTE 14-13 quotes in program names 21-4 R random numbers 13-13 hp40g .book Page 10 Friday, December 9, 2005 1:03 AM
I-11 RE 13-8 real number maximum 13-8 minimum 13-8 real part 13-8 real-number functions 13-14 % 13-16 %CHANGE 13-16 %TOTAL 13-16 CEILING 13-14 DEGtoRAD 13-14 FNROOT 13-14 HMSto 13-15 INT 13-15 MANT 13-15 MAX 13-15 MIN 13-15 MOD 13-15 RADtoDEG 13-16 ROUND 13-16 SIGN 13-16 TRUNCATE 13-17 XPON 13-17 reatest common divisor 14-47 recalculation for table 2-19 receive error R-21 receiving aplet 22-5 lists 19-6 matrices 18-4 programs 21-8 redrawing table of numbers 2-18 reduced row echelon 18-12 regression analysis 10-17 fit models 10-13 formula 10-12 user-defined fit 10-13 relative error statistical 10-18 REMAINDER 14-59 REORDER 14-68 resetting aplet 22-3 calculator R-3 memory R-3 result copying to edit line 1-22 reusing 1-22 rigorous 14-6 RISCH 14-24 root interactive 3-10 n th 13-6 variable 21-34 root-finding displaying 7-7 interactive 3-9 operations 3-10 variables 3-10 S S1mark-S5mark variables 21-34 scaling automatic 2-14 decimal 2-10, 2-14 integer 2-10, 2-14, 2-1 5 options 2-13 resetting 2-13 trigonometric 2-14 scatter plot 10-15, 10-17 connected 10-17 , 10-19 SCHUR decomposition 18-12 scientific number format 1-10 , 1-20 scrolling in Trace mode 2-8 searching menu lists 1-9 speed searches 1-9 secant 13-20 Sending 22-5 sending aplets 22-4 lists 19-6 programs 21-8 sequence definition 2-2 sequence variables Axes 21-31 Grid 21-32 in menu map R-10 Indep 21-33 Labels 21-34 Recenter 21-34 Ycross 21-37 serial port connectivity 22-5 SERIES 14-24 setting hp40g .book Page 11 Friday, December 9, 2005 1:03 AM
I-12 date 21-27 time 21-27 SEVAL 14-68 SIGMA 14-68 SIGMAVX 14-69 SIGN 14-46 sign revers al 7-6 SIMPLIFY 14-32 simplify 14-68, 14-70 SINCOS 14-31 , 14-40 sine 13-4 inverse hyper bolic 13-9 singular value decomposition matrix 18-13 singular values matrix 18-13 sketches creating 20-5 creating a blank graph ic 21-22 creating a set of 20-5 erasing a line 21-20 labeling 20-5 opening view 20-3 sets 20-5 storing in graphics variable 20-5 slope 3-10 soft key labels 1-2 SOLVE 14-37 solve error messages 7-7 initial guesses 7-5 interpreting intermediate guesses 7-7 interpreting results 7-6 plotting to find guesses 7-7 setting number format 7-5 solve variables axes 21-31 connect 21-31 fastres 21-32 grid 21-32 in menu map R-11 indep 21-33 labels 21-34 recenter 21-34 ycross 21-37 SOLVEVX 14-38 sorting 22-6 aplets in alphabetic order 22-6 aplets in chronological order 22-6 elements in a list 19-9 spectral norm 18-13 spectral radius 18-13 square root 13-5 stack history printing 21-25 stairsteps graph 6-1 standard number format 1-10 statistics analysis 10-1 analyzing plots 10-19 angle mode 10-12 calculate one-variable 21-30 calculate two-variable 21-30 data set variables 21-40 data structure 21-40 define one-var iable sample 21-30 define two-variable data setâs de- pendent column 21-30 define two-variable data setâs in- dependent column 21-30 defining a fit 10-12 defining a regression model 10-12 deleting data 10-11 editing data 10-11 frequency 21-30 inserting data 10-11 plot type 10-18 plotting data 10-15 predicted values 10-20 regression curve (fit) models 10-12 saving data 10-10 sorting data 10-11 specifying angle setting 10-12 toggling between one-variable and two-variable 10-12 tracing plots 10-19 troubleshooting with plots 10-19 zooming in plots 10-19 statistics variables Axes 21-31 Connect 21-31 Grid 21-32 Hmin/Hmax 21-32 Hwidth 21-33 in menu map R-12 Indep 21-33 hp40g .book Page 12 Friday, December 9, 2005 1:03 AM
I-13 Labels 21-34 Recenter 21-34 S1mark-S5mark 21-34 Ycross 21-37 step size of independent variable 21-36 step-by-step 14-6 STORE 14-14 storing list elements 19-1, 19- 4 , 19-5 , 19-6 matrix elemen ts 18-3, 18-5, 18-6 results of calculation 17-2 value 17-2 strings literal in symbolic operations 13-18 STURMAB 14-69 SUBST 14-15 substitution 14-14 SUBTMOD 14-55 subtract 13-4 summation function 13-11 symbolic calculations in Function aplet 13-21 defining expressions 2-1 differentiation 13-21 displaying definitions 3-8 evaluating variables in view 2-3 setup view for statistics 10-12 symbolic calculations 14-1 symbolic functions | (where) 13-18 equals 13-17 ISOLATE 13-17 LINEAR? 13-18 QUAD 13-18 QUOTE 13-18 Symbolic view defining expressions 3-2 syntax 13-2 syntax errors 21-7 T table navigate around 3-8 numeric values 3-7 numeric view setup 2-16 TABVAR 14-27 TAN2CS2 14-40 TAN2SC 14-41 TAN2SC2 14-41 tangent 13-4 inverse hyperbolic 13-9 Taylor polynomial 13-7 TAYLOR0 14-27 TCHEBYCHEFF 14-59 TCOLLECT 14-41 tests 14-61 TEXPAND 14-15 , 14-42 tickmarks for plotting 2-6 time 13-15 setting 21-27 time, converting 13-15 times sign 1-20 TLIN 14-43 tmax 21-36 tmin 21-36 too few arguments R-21 TOOL menu 15-1 tracing functions 2-8 more than one curve 2-8 not matching plot 2-8 plots 2-8 transcendental expressions 14-42 transmitting lists 19-6 matrices 18-4 programs 21-8 transposing a matrix 18-13 Triangle Solver aplet 9-1 TRIG 14-43 TRIGCOS 14-44 trigonometric fit 10-13 functions 13-20 scaling 2-10, 2- 14 , 2-15 trigonometry functions ACOS2S 14-38 ACOT 13-20 ACSC 13-20 ASEC 13-20 ASIN2C 14-39 ASIN2S 14-39 ASIN2T 14-39 hp40g .book Page 13 Friday, December 9, 2005 1:03 AM
I-14 COT 13-20 CSC 13-20 HALFTAN 14-40 SEC 13-20 SINCOS 14-40 TAN2CS2 14-40 TAN2SC 14-41 TAN2SC2 14-41 TRIGCOS 14-44 TRIGSIN 14-44 TRIGTAN 14-44 TRIGSIN 14-44 TRIGTAN 14-4 4 TRUNC 14-28 truncating values to decimal places 13-17 TSIMP 14-70 tstep 21-36 Two-Prop ortion Z-Interv al 11-17 Two-Prop ortion Z-Test 11-11 Two-Sample T-Interva l 11-19 Two-Sample T-test 11- 14 Two-Sample Z-Interval 11-16 typing letters 1-6 U UNASSIGN 14-15 UNASSUME 14-61 undefined name R-21 result R-21 un-zoom 2-11 upper-tail chi-squared probability 13-13 upper-tail normal probability 13-13 upper-tail Snedec orâs F 13-13 upper-tail studentâs t-probability 13-14 USB connectivity 22-5 user defined regression fit 10-13 V value recall 17-3 storing 17-2 variables aplet 17-1 CAS 14-4 categories 17-7 clearing 17-3 definition 17-1, 17-7, R-2 in equations 7-10 in Symbolic view 2-3 independent 14-6, 21-36 local 17-1 previous resu lt (Ans) 1-23 printing 21-26 root 21-34 root-finding 3-10 step size of independent 21-36 types 17-1, 17 -7 use in calculations 17-3 variation table 14-27 VARS menu 17-4 , 17-5 vectors column 18-1 cross product 18-11 definition of R-2 VER 14-70 verbose 14-6 version 14-70 views 1-18 configuration 1-18 definition of R-3 W warning symbol 1-8 where command ( | ) 13-18 X Xcross variable 21-36 XNUM 14-32 XQ 14-32 Y Ycross variable 21-37 Z Z-Interval 11-15 zoom 2-17 axes 2-12 box 2-9 center 2-9 examples of 2-11 factors 2-13 hp40g .book Page 14 Friday, December 9, 2005 1:03 AM
I-15 in 2-9 options 2-9, 3-8 options within a table 2-18 out 2-9 redrawing table of numbers op- tions 2-18 square 2-10 un-zoom 2-11 within Numeric view 2-18 X-zoom 2-9 Y-zoom 2-10 hp40g .book Page 15 Friday, December 9, 2005 1:03 AM
hp40g .book Page 16 Friday, December 9, 2005 1:03 AM