hit counter script
HP 50g User Manual

HP 50g User Manual

Graphing calculator
Hide thumbs Also See for 50g:
Table of Contents

Advertisement

Quick Links

HP g graphing calculator
user's guide
H
Edition 1
HP part number F2229AA-90006

Advertisement

Table of Contents
loading

Summary of Contents for HP 50g

  • Page 1 HP g graphing calculator user’s guide Edition 1 HP part number F2229AA-90006...
  • Page 2 Notice REGISTER YOUR PRODUCT AT: www.register.hp.com THIS MANUAL AND ANY EXAMPLES CONTAINED HEREIN ARE PROVIDED “AS IS” AND ARE SUBJECT TO CHANGE WITHOUT NOTICE. HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MANUAL, INCLUDING, BUT LIMITED...
  • Page 3 HP 50g should be thought of as a graphics/programmable hand-held computer. The HP 50g can be operated in two different calculating modes, the Reverse Polish Notation (RPN) mode and the Algebraic (ALG) mode (see page 1-13 for additional details).
  • Page 4 Whether it is advanced mathematical applications, specific problem solution, or data logging, the programming languages available in your calculator make it into a very versatile computing device. We hope your calculator will become a faithful companion for your school and professional applications.
  • Page 5: Table Of Contents

    Chapter 1 - Getting started ,1-1 Basic Operations ,1-1 Batteries ,1-1 Turning the calculator on and off ,1-2 Adjusting the display contrast ,1-2 Contents of the calculator’s display ,1-2 Menus ,1-3 SOFT menus vs. CHOOSE boxes ,1-4 Selecting SOFT menus or CHOOSE boxes ,1-5...
  • Page 6 Chapter 2 - Introducing the calculator ,2-1 Calculator objects ,2-1 Editing expressions on the screen ,2-3 Creating arithmetic expressions ,2-3 Editing arithmetic expressions ,2-6 Creating algebraic expressions ,2-7 Editing algebraic expressions ,2-8 Using the Equation Writer (EQW) to create expressions ,2-10...
  • Page 7 CHOOSE boxes vs. Soft MENU ,2-67 Selected CHOOSE boxes ,2-69 Chapter 3 - Calculation with real numbers ,3-1 Checking calculators settings ,3-1 Checking calculator mode ,3-2 Real number calculations ,3-2 Changing sign of a number, variable, or expression ,3-3 The inverse function ,3-3...
  • Page 8 The IFTE function ,3-36 Combined IFTE functions ,3-37 Chapter 4 - Calculations with complex numbers ,4-1 Definitions ,4-1 Setting the calculator to COMPLEX mode ,4-1 Entering complex numbers ,4-2 Polar representation of a complex number ,4-3 Simple operations with complex numbers ,4-4...
  • Page 9 INTEGER menu ,5-10 POLYNOMIAL menu ,5-10 MODULO menu ,5-11 Applications of the ARITHMETIC menu ,5-12 Modular arithmetic ,5-12 Finite arithmetic rings in the calculator ,5-14 Polynomials ,5-17 Modular arithmetic with polynomials ,5-17 The CHINREM function ,5-17 The EGCD function ,5-18...
  • Page 10 The PROOT function ,5-21 The PTAYL function ,5-21 The QUOT and REMAINDER functions ,5-21 The EPSX0 function and the CAS variable EPS ,5-22 The PEVAL function ,5-22 The TCHEBYCHEFF function ,5-22 Fractions ,5-23 The SIMP2 function ,5-23 The PROPFRAC function ,5-23 The PARTFRAC function ,5-23 The FCOEF function ,5-24 The FROOTS function ,5-24...
  • Page 11 Variable EQ ,6-26 The SOLVR sub-menu ,6-26 The DIFFE sub-menu ,6-29 The POLY sub-menu ,6-29 The SYS sub-menu ,6-30 The TVM sub-menu ,6-30 Chapter 7 - Solving multiple equations ,7-1 Rational equation systems ,7-1 Example 1 – Projectile motion ,7-1 Example 2 –...
  • Page 12 List size ,8-10 Extracting and inserting elements in a list ,8-10 Element position in the list ,8-11 HEAD and TAIL functions ,8-11 The SEQ function ,8-11 The MAP function ,8-12 Defining functions that use lists ,8-13 Applications of lists ,8-15 Harmonic mean of a list ,8-15 Geometric mean of a list ,8-16 Weighted average ,8-17...
  • Page 13 Definitions ,10-1 Entering matrices in the stack ,10-2 Using the Matrix Writer ,10-2 Typing in the matrix directly into the stack ,10-3 Creating matrices with calculator functions ,10-3 Functions GET and PUT ,10-6 Functions GETI and PUTI ,10-6 Function SIZE ,10-7...
  • Page 14 Function VANDERMONDE ,10-13 Function HILBERT ,10-14 A program to build a matrix out of a number of lists ,10-14 Lists represent columns of the matrix ,10-15 Lists represent rows of the matrix ,10-17 Manipulating matrices by columns ,10-17 Function COL ,10-18 Function COL Function COL+ ,10-19 Function COL- ,10-20...
  • Page 15 Solving multiple set of equations with the same coefficient matrix ,11-28 Gaussian and Gauss-Jordan elimination ,11-29 Step-by-step calculator procedure for solving linear systems ,11-38 Solution to linear systems using calculator functions ,11-41 Residual errors in linear system solutions (Function RSD) ,11-44...
  • Page 16 Function KER ,11-56 Function MKISOM ,11-56 Chapter 12 - Graphics ,12-1 Graphs options in the calculator ,12-1 Plotting an expression of the form y = f(x) ,12-2 Some useful PLOT operations for FUNCTION plots ,12-5 Saving a graph for future use ,12-7...
  • Page 17 Fast 3D plots ,12-34 Wireframe plots ,12-36 Ps-Contour plots ,12-38 Y-Slice plots ,12-39 Gridmap plots ,12-40 Pr-Surface plots ,12-41 The VPAR variable ,12-42 Interactive drawing ,12-43 DOT+ and DOT- ,12-44 MARK ,12-44 LINE ,12-44 TLINE ,12-45 BOX ,12-45 CIRCL ,12-45 LABEL ,12-45 DEL ,12-46 ERASE ,12-46...
  • Page 18 The SYMBOLIC menu and graphs ,12-49 The SYMB/GRAPH menu ,12-50 Function DRAW3DMATRIX ,12-52 Chapter 13 - Calculus Applications ,13-1 The CALC (Calculus) menu ,13-1 Limits and derivatives ,13-1 Function lim ,13-2 Derivatives ,13-3 Functions DERIV and DERVX ,13-3 The DERIV&INTEG menu ,13-4 Calculating derivatives with The chain rule ,13-6 Derivatives of equations ,13-7...
  • Page 19 Integration with units ,13-21 Infinite series ,13-22 Taylor and Maclaurin’s series ,13-23 Taylor polynomial and reminder ,13-23 Functions TAYLR, TAYLR0, and SERIES ,13-24 Chapter 14 - Multi-variate Calculus Applications ,14-1 Multi-variate functions ,14-1 Partial derivatives ,14-1 Higher-order derivatives ,14-3 The chain rule for partial derivatives ,14-4 Total differential of a function z = z(x,y) ,14-5 Determining extrema in functions of two variables ,14-5 Using function HESS to analyze extrema ,14-6...
  • Page 20 The variable ODETYPE ,16-8 Laplace Transforms ,16-10 Definitions ,16-10 Laplace transform and inverses in the calculator ,16-11 Laplace transform theorems ,16-12 Dirac’s delta function and Heaviside’s step function ,16-15 Applications of Laplace transform in the solution of linear ODEs ,16-17...
  • Page 21 Numerical solution of first-order ODE ,16-57 Graphical solution of first-order ODE ,16-59 Numerical solution of second-order ODE ,16-61 Graphical solution for a second-order ODE ,16-63 Numerical solution for stiff first-order ODE ,16-65 Numerical solution to ODEs with the SOLVE/DIFF menu ,16-67 Function RKF ,16-67 Function RRK ,16-68 Function RKFSTEP ,16-69...
  • Page 22 Chapter 18 - Statistical Applications ,18-1 Pre-programmed statistical features ,18-1 Entering data ,18-1 Calculating single-variable statistics ,18-2 Obtaining frequency distributions ,18-5 Fitting data to a function y = f(x) ,18-10 Obtaining additional summary statistics ,18-13 Calculation of percentiles ,18-14 The STAT soft menu ,18-15 The DATA sub-menu ,18-16 The PAR sub-menu ,18-16 The 1VAR sub menu ,18-17...
  • Page 23 Paired sample tests ,18-41 Inferences concerning one proportion ,18-41 Testing the difference between two proportions ,18-42 Hypothesis testing using pre-programmed features ,18-43 Inferences concerning one variance ,18-47 Inferences concerning two variances ,18-48 Additional notes on linear regression ,18-50 The method of least squares ,18-50 Additional equations for linear regression ,18-51 Prediction error ,18-52 Confidence intervals and hypothesis testing in linear regression ,18-52...
  • Page 24 Custom menus (MENU and TMENU functions) ,20-2 Menu specification and CST variable ,20-4 Customizing the keyboard ,20-5 The PRG/MODES/KEYS sub-menu ,20-5 Recall current user-defined key list ,20-6 Assign an object to a user-defined key ,20-6 Operating user-defined keys ,20-7 Un-assigning a user-defined key ,20-7 Assigning multiple user-defined keys ,20-7 Chapter 21 - Programming in User RPL language ,21-1 An example of programming ,21-1...
  • Page 25 “De-tagging” a tagged quantity ,21-33 Examples of tagged output ,21-34 Using a message box ,21-37 Relational and logical operators ,21-43 Relational operators ,21-43 Logical operators ,21-45 Program branching ,21-46 Branching with IF ,21-47 The IF…THEN…END construct ,21-47 The CASE construct ,21-51 Program loops ,21-53 The START construct ,21-53 The FOR construct ,21-59...
  • Page 26 Examples of program-generated plots ,22-17 Drawing commands for use in programming ,22-19 PICT ,22-20 PDIM ,22-20 LINE ,22-20 TLINE ,22-20 BOX ,22-21 ARC ,22-21 PIX?, PIXON, and PIXOFF ,22-21 PVIEW ,22-22 PX C ,22-22 C PX ,22-22 Programming examples using drawing functions ,22-22 Pixel coordinates ,22-25 Animating graphics ,22-26 Animating a collection of graphics ,22-27...
  • Page 27 Chapter 24 - Calculator objects and flags ,24-1 Description of calculator objects ,24-1 Function TYPE ,24-2 Function VTYPE ,24-2 Calculator flags ,24-3 System flags ,24-3 Functions for setting and changing flags ,24-3 User flags ,24-4 Chapter 25 - Date and Time Functions ,25-1...
  • Page 28 Checking solutions ,27-11 Appendices Appendix A - Using input forms ,A-1 Appendix B - The calculator’s keyboard ,B-1 Appendix C - CAS settings ,C-1 Appendix D - Additional character set ,D-1 Appendix E - The Selection Tree in the Equation Writer ,E-1...
  • Page 29 Appendix F - The Applications (APPS) menu ,F-1 Appendix G - Useful shortcuts ,G-1 Appendix H - The CAS help facility ,H-1 Appendix I - Command catalog list ,I-1 Appendix J - MATHS menu ,J-1 Appendix K - MAIN menu ,K-1 Appendix L - Line editor commands ,L-1 Appendix M - Table of Built-In Equations ,M-1 Appendix N - Index ,N-1...
  • Page 30: Chapter 1 - Getting Started

    Insert 4 new AAA (LR03) batteries into the main compartment. Make sure each battery is inserted in the indicated direction. To install the backup battery a. Make sure the calculator is OFF. Press down the holder. Push the plate to the shown direction and lift it. Page 1-1...
  • Page 31: Turning The Calculator On And Off

    The $ key is located at the lower left corner of the keyboard. Press it once to turn your calculator on. To turn the calculator off, press the right-shift key @ (first key in the second row from the bottom of the keyboard), followed by the $ key.
  • Page 32 The second line shows the characters: { HOME } indicating that the HOME directory is the current file directory in the calculator’s memory. In Chapter 2 you will learn that you can save data in your calculator by storing them in files or variables. Variables can be organized into directories and sub-directories.
  • Page 33 However, SOFT menus are not the only way to access collections of related functions in the calculator. The alternative way will be referred to as CHOOSE boxes. To see an example of a choose box, activate the TOOL menu (press I), and then press the keystroke combination ‚ã(associated with...
  • Page 34 You can select the format in which your menus will be displayed by changing a setting in the calculator system flags (A system flag is a calculator variable that controls a certain calculator operation or mode. For more information about flags, see Chapter 24).
  • Page 35 If you now press ‚ã, instead of the CHOOSE box that you saw earlier, the display will now show six soft menu labels as the first page of the STACK menu: To navigate through the functions of this menu, press the L key to move to the next page, or „«(associated with the L key) to move to the previous page.
  • Page 36: Setting Time And Date

    CLEAR CLEAR the display or stack The calculator has only six soft menu keys, and can only display 6 labels at any point in time. However, a menu can have more than six entries. Each group of 6 entries is called a Menu page. The TOOL menu has eight entries arranged in two pages.
  • Page 37 9 key the TIME choose box is activated. This operation can also be represented as ‚Ó. The TIME choose box is shown in the figure below: As indicated above, the TIME menu provides four different options, numbered 1 through 4. Of interest to us as this point is option 3. Set time, date... Using the down arrow key, ˜, highlight this option and press the !!@@OK#@ soft menu key.
  • Page 38 Let’s change the minute field to 25, by pressing: 25 !!@@OK#@ . The seconds field is now highlighted. Suppose that you want to change the seconds field to 45, use: 45 !!@@OK#@ The time format field is now highlighted. setting you can either press the W key (the second key from the left in the fifth row of keys from the bottom of the keyboard), or press the @CHOOS soft menu key ( B).
  • Page 39 Setting the date After setting the time format option, the SET TIME AND DATE input form will look as follows: To set the date, first set the date format. The default format is M/D/Y (month/ day/year). To modify this format, press the down arrow key. This will highlight the date format as shown below: Use the @CHOOS soft menu key to see the options for the date format: Highlight your choice by using the up and down arrow keys,—...
  • Page 40 Introducing the calculator’s keyboard The figure below shows a diagram of the calculator’s keyboard with the numbering of its rows and columns. The figure shows 10 rows of keys combined with 3, 5, or 6 columns. Row 1 has 6 keys, rows 2 and 3 have 3 keys each, and rows 4 through 10 have 5 keys each.
  • Page 41: Selecting Calculator Modes

    MTH, CAT and P, indicate which is the main function (SYMB), and which of the other three functions is associated with the left-shift „(MTH), right-shift … (CAT ) , and ~ (P) keys. For detailed information on the calculator keyboard operation referee to Appendix B . Selecting calculator modes This section assumes that you are now at least partially familiar with the use of choose and dialog boxes (if you are not, please refer to Chapter 2).
  • Page 42: Operating Mode

    The calculator offers two operating modes: Reverse Polish Notation (RPN) mode. The default mode is the Algebraic mode (as indicated in the figure above), however, users of earlier HP calculators may be more familiar with the RPN mode. To select an operating mode, first open the CALCULATOR MODES input form by pressing the H button.
  • Page 43 To enter this expression in the calculator we will first use the equation writer, Please identify the following keys in the keyboard, besides the ‚O. numeric keypad keys: !@.#*+-/R Q¸Ü‚Oš™˜—` The equation writer is a display mode in which you can build mathematical expressions using explicit mathematical notation including fractions, derivatives, integrals, roots, etc.
  • Page 44 Notice that the display shows several levels of output labeled, from bottom to top, as 1, 2, 3, etc. This is referred to as the stack of the calculator. The different levels are referred to as the stack levels, i.e., stack level 1, stack level 2, etc.
  • Page 45 3.` Enter 3 in level 1 5.` Enter 5 in level 1, 3 moves to y 3.` Enter 3 in level 1, 5 moves to level 2, 3 to level 3 3.* Place 3 and multiply, 9 appears in level 1 23.`Enter 23 in level 1, 14.66666 moves to level 2.
  • Page 46 To select a number format, first open the CALCULATOR MODES input form by pressing the H button. Then, use the down arrow key, ˜, to select the option Number format.
  • Page 47 Press the !!@@OK#@ soft menu key, with the Number format set to Std, to return to the calculator display. Enter the number 123.4567890123456. Notice that this number has 16 significant figures. Press the ` key. The number is rounded to the maximum 12 significant figures, and is displayed as...
  • Page 48 Notice that the Number Format mode is set to Fix followed by a zero (0). This number indicates the number of decimals to be shown after the decimal point in the calculator’s display. Press the !!@@OK#@ soft menu key to return to the calculator display. The number now is shown as: This setting will force all results to be rounded to the closest integer (0 digit displayed after the comma).
  • Page 49 Press the !!@@OK#@ soft menu key to complete the selection: Press the !!@@OK#@ soft menu key return to the calculator display. The number now is shown as: Notice how the number is rounded, not truncated. 123.4567890123456, for this setting, is displayed as 123.457, and not as 123.456 because the digit after 6 is >...
  • Page 50 Fixed number of decimals in the example above). Press the !!@@OK#@ soft menu key return to the calculator display. The number now is shown as: This result, 1.23E2, is the calculator’s version of powers-of-ten notation, i.e., 1.235 x 10...
  • Page 51 Press the !!@@OK#@ soft menu key return to the calculator display. The number now is shown as: Because this number has three figures in the integer part, it is shown with four significative figures and a zero power of ten, while using the Engineering format.
  • Page 52: Angle Measure

    Press the !!@@OK#@ soft menu key return to the calculator display. The number 123.456789012, entered earlier, now is shown as: Angle Measure Trigonometric functions, for example, require arguments representing plane angles. The calculator provides three different Angle Measure modes for...
  • Page 53 key. If using the latter approach, use up and down arrow keys,— ˜, to select the preferred mode, and press the !!@@OK#@ complete the operation. For example, in the following screen, the Radians mode is selected: Coordinate System The coordinate system selection affects the way vectors and complex numbers are displayed and entered.
  • Page 54 Beep, Key Click, and Last Stack The last line of the CALCULATOR MODES input form include the options: By choosing the check mark next to each of these options, the corresponding option is activated. These options are described next: _Beep : When selected, , the calculator beeper is active.
  • Page 55: Selecting Cas Settings

    The _Beep option can be useful to advise the user about errors. You may want to deselect this option if using your calculator in a classroom or library. The _Key Click option can be useful as an audible way to check that each keystroke was entered as intended.
  • Page 56: Selecting Display Modes

    DISPLAY MODES input form, press the @@@OK@@@ soft menu key. This will take you back to the CALCULATOR MODES input form. calculator display at this point, press the @@@OK@@@ soft menu key once more. Selecting the display font Changing the font display allows you to have the calculator look and feel changed to your own liking.
  • Page 57 When done with a font selection, press the @@@OK@@@ soft menu key to go back to the CALCULATOR MODES input form. To return to normal calculator display at this point, press the @@@OK@@@ soft menu key once more and see how the stack display change to accommodate the different font.
  • Page 58 Selecting properties of the equation writer (EQW) First, press the H button to activate the CALCULATOR MODES input form. Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key to display the DISPLAY MODES input form. Press the down arrow key, ˜, three...
  • Page 59 Selecting the size of the header First, press the H button to activate the CALCULATOR MODES input form. Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key to display the DISPLAY MODES input form. Press the down arrow key, ˜, four times, to get to the Header line.
  • Page 60 right arrow key (™) to select the underline in front of the options _Clock or _Analog. Toggle the @ @CHK@@ soft menu key until the desired setting is achieved. If the _Clock option is selected, the time of the day and date will be shown in the upper right corner of the display.
  • Page 61: Calculator Objects

    In this chapter we present a number of basic operations of the calculator including the use of the Equation Writer and the manipulation of data objects in the calculator. Study the examples in this chapter to get a good grasp of the capabilities of the calculator for future applications.
  • Page 62 Refer to Appendix C for more details. Mixing integers and reals together or mistaking an integer for a real is a common occurrence. The calculator will detect such mixing of objects and ask you if you want to switch to approximate mode.
  • Page 63: Editing Expressions On The Screen

    Binary integers, objects of type 10, are used in some computer science applications. Graphics objects, objects of type 11, store graphics produced by the calculator. Tagged objects, objects of type 12, are used in the output of many programs to identify results.
  • Page 64 – see Chapter 1): In this case, when the expression is entered directly into the stack. As soon as you press `, the calculator will attempt to calculate a value for the expression. If the expression is entered between quotes, however, the calculator will reproduce the expression as entered.
  • Page 65 …ï. To recover the expression from the existing stack, use the following keystrokes: ƒƒ…ï We will now enter the expression used above when the calculator is set to the RPN operating mode. We also set the CAS to Exact and the display to Textbook.
  • Page 66 (see Appendix C). Editing arithmetic expressions Suppose that we entered the following expression, between quotes, with the calculator in RPN mode and the CAS set to EXACT: rather than the intended expression: was entered by using: ³5*„Ü1+1/1.75™/...
  • Page 67 Press ` to return to the stack The edited expression is now available in the stack. Editing of a line of input when the calculator is in Algebraic operating mode is exactly the same as in the RPN mode. You can repeat this example in Algebraic mode to verify this assertion.
  • Page 68 We set the calculator operating mode to Algebraic, the CAS to Exact, and the display to Textbook. To enter this algebraic expression we use the following keystrokes: ³2*~l*R„Ü1+~„x/~r™/ „ Ü ~r+~„y™+2*~l/~„b Press ` to get the following result: Entering this expression when the calculator is set in the RPN mode is exactly the same as this Algebraic mode exercise.
  • Page 69 Press the delete key, ƒ, once, to delete the left parenthesis of the set inserted above. Press ` to return to normal calculator display. The result is shown next: Notice that the expression has been expanded to include terms such as |R|, the absolute value, and SQ(b R), the square of b R.
  • Page 70: Using The Equation Writer (Eqw) To Create Expressions

    Pressing ` once more to return to normal display. To see the entire expression in the screen, we can change the option _Small Stack Disp in the DISPLAY MODES input form (see Chapter 1). After effecting this change, the display will look as follows: Note: To use Greek letters and other characters in algebraic expressions use the CHARS menu.
  • Page 71: Creating Arithmetic Expressions

    This is useful to insert CAS commands in an expression available in the Equation Writer. @HELP: activates the calculator’s CAS help facility to provide information and examples of CAS commands. Some examples for the use of the Equation Writer are shown below.
  • Page 72 The result is the expression The cursor is shown as a left-facing key. The cursor indicates the current edition location. Typing a character, function name, or operation will enter the corresponding character or characters in the cursor location. For example, for the cursor in the location indicated above, type now: *„Ü5+1/3 The edited expression looks as follows:...
  • Page 73 Suppose that now you want to add the fraction 1/3 to this entire expression, i.e., you want to enter the expression: First, we need to highlight the entire first term by using either the right arrow (™) or the upper arrow (—) keys, repeatedly, until the entire expression is highlighted, i.e., seven times, producing: NOTE: Alternatively, from the original position of the cursor (to the right of the 2 in the denominator of...
  • Page 74 For example, to evaluate the entire expression in this exercise, first, highlight the entire expression, by pressing ‚ ‘. Then, press the @EVAL soft menu key. If your calculator is set to Exact CAS mode (i.e., the _Approx CAS mode is not checked), then you will get the following symbolic result: If you want to recover the unevaluated expression at this time, use the function UNDO, i.e., …¯(the first key in the third row of keys from the top of the...
  • Page 75 If you want a floating-point (numerical) evaluation, use the (i.e., …ï). The result is as follows: Use the function UNDO ( …¯) once more to recover the original expression: Evaluating a sub-expression Suppose that you want to evaluate only the expression in parentheses in the denominator of the first fraction in the expression above.
  • Page 76 A symbolic evaluation once more. Suppose that, at this point, we want to evaluate the left-hand side fraction only. Press the upper arrow key (—) three times to select that fraction, resulting in: Then, press the @EVAL soft menu key to obtain: Let’s try a numerical evaluation of this term at this point.
  • Page 77 Editing arithmetic expressions We will show some of the editing features in the Equation Writer as an exercise. We start by entering the following expression used in the previous exercises: And will use the editing features of the Equation Editor to transform it into the following expression: In the previous exercises we used the arrow keys to highlight sub-expressions for evaluation.
  • Page 78 Press the down arrow key (˜) to trigger the clear editing cursor. The screen now looks like this: By using the left arrow key (š) you can move the cursor in the general left direction, but stopping at each individual component of the expression. For example, suppose that we will first will transform the expression /2 into the expression LN(...
  • Page 79 Next, we’ll convert the 2 in front of the parentheses in the denominator into a 2/3 by using: At this point the expression looks as follows: The final step is to remove the 1/3 in the right-hand side of the expression. This is accomplished by using: —————™ƒƒƒƒƒ...
  • Page 80 Use the following keystrokes: 2 / R3 ™™ * ~‚n+ „¸\ ~‚m ™™ * ‚¹ ~„x + 2 * ~‚m * ~‚c ~„y ——— / ~‚t Q1/3 This results in the output: In this example we used several lower-case English letters, e.g., x (~„x), several Greek letters, e.g., (~‚n), and even a combination of Greek and English letters, namely, y (~‚c~„y).
  • Page 81 Editing algebraic expressions The editing of algebraic equations follows the same rules as the editing of algebraic equations. Namely: Use the arrow keys (š™—˜) to highlight expressions Use the down arrow key (˜), repeatedly, to trigger the clear editing cursor . In this mode, use the left or right arrow keys (š™) to move from term to term in an expression.
  • Page 82 10. the 2 in the 2/ 3 fraction At any point we can change the clear editing cursor into the insertion cursor by pressing the delete key (ƒ). Let’s use these two cursors (the clear editing cursor and the insertion cursor) to change the current expression into the following: If you followed the exercise immediately above, you should have the clear editing cursor on the number 2 in the first factor in the expression.
  • Page 83 Evaluating a sub-expression Since we already have the sub-expression highlighted, let’s press the @EVAL soft menu key to evaluate this sub-expression. The result is: Some algebraic expressions cannot be simplified anymore. Try the following keystrokes: —D. You will notice that nothing happens, other than the highlighting of the entire argument of the LN function.
  • Page 84 3 in the first term of the numerator. Then, press the right arrow key, ™, to navigate through the expression. Simplifying an expression Press the @BIG soft menu key to get the screen to look as in the previous figure (see above).
  • Page 85 Press ‚¯to recover the original expression. Next, enter the following keystrokes: ˜˜˜™™™™™™™———‚™ to select the last two terms in the expression, i.e., press the @FACTO soft menu key, to get Press ‚¯to recover the original expression. Now, let’s select the entire expression by pressing the upper arrow key (—) once.
  • Page 86 Next, select the command DERVX (the derivative with respect to the variable X, the current CAS independent variable) by using: ~d˜˜˜ . Command DERVX will now be selected: Press the @@OK@@ soft menu key to get: Next, press the L key to recover the original Equation Writer menu, and press the @EVAL@ soft menu key to evaluate this derivative.
  • Page 87 Using the editing functions BEGIN, END, COPY, CUT and PASTE To facilitate editing, whether with the Equation Writer or on the stack, the calculator provides five editing functions, BEGIN, END, COPY, CUT and PASTE, activated by combining the right-shift key (‚) with keys (2,1), (2,2), (3,1), (3,2), and (3,3), respectively.
  • Page 88 Equation Writer, as follows: ‚—A The line editor screen will look like this (quotes shown only if calculator in RPN mode): To select the sub-expression of interest, use: ™™™™™™™™‚¢...
  • Page 89: Creating And Editing Summations, Derivatives, And Integrals

    We can now copy this expression and place it in the denominator of the LN argument, as follows:‚¨™™… (27 times) … ™ ƒƒ… (9 times) … ƒ ‚¬ The line editor now looks like this: Pressing ` shows the expression in the Equation Writer (in small-font format, press the @BIG soft menu key): Press ` to exit the Equation Writer.
  • Page 90 To see the corresponding expression in the line editor, press ‚— and the A soft menu key, to show: This expression shows the general form of a summation typed directly in the stack or line editor: (index = starting_value, ending_value, summation expression) Press ` to return to the Equation Writer.
  • Page 91 and the variable of differentiation. To fill these input locations, use the following keystrokes: ~„t™~‚a*~„tQ2 ™™+~‚b*~„t+~‚d The resulting screen is the following: To see the corresponding expression in the line editor, press ‚— and the A soft menu key, to show: This indicates that the general expression for a derivative in the line editor or in the stack is: variable(function of variables)
  • Page 92 Note: The notation notation for total derivatives (i.e., derivatives of one variable) is calculator, however, does not distinguish between partial and total derivatives. Definite integrals We will use the Equation Writer to enter the following definite ∫ sin( integral: press ‚ Á to enter the integral sign. Notice that the sign, when entered into the Equation Writer screen, provides input locations for the limits of integration, the integrand, and the variable of integration.
  • Page 93: Organizing Data In The Calculator

    Organizing data in the calculator You can organize data in your calculator by storing variables in a directory tree. To understand the calculator’s memory, we first take a look at the file directory. Press the keystroke combination „¡ (first key in second row of keys from the top of the keyboard) to get the calculator’s File Manager screen:...
  • Page 94: Functions For Manipulation Of Variables

    ˜, and press @CHDIR. This action closes the File Manager window and returns us to normal calculator display. You will notice that the second line from the top in the display now starts with the characters { HOME CASDIR } indicating that the current directory is CASDIR within the HOME directory.
  • Page 95: The Casdir Sub-Directory

    The HOME directory, as pointed out earlier, is the base directory for memory operation for the calculator. To get to the HOME directory, you can press the UPDIR function („§) -- repeat as needed -- until the {HOME} spec is shown in the second line of the display header.
  • Page 96 @@OK@@ soft menu key or `, to get the following screen: The screen shows a table describing the variables contained in the CASDIR directory. These are variables pre-defined in the calculator memory that establish certain parameters for CAS operation (see appendix C). The table above contains 4 columns: The first column indicate the type of variable (e.g., ‘EQ’...
  • Page 97: Typing Directory And Variable Names

    For example, pressing cz followed by `, shows the same value of the variable in the stack, if the calculator is set to Algebraic. If the calculator is set to RPN mode, you need only press the soft menu key for `.
  • Page 98 To unlock the upper-case locked keyboard, press ~ Let’s try some exercises typing directory/variable names in the stack. Assuming that the calculator is in the Algebraic mode of operation (although the instructions work as well in RPN mode), try the following keystroke sequences.
  • Page 99: Creating Subdirectories

    Using the FILES menu Regardless of the mode of operation of the calculator (Algebraic or RPN), we can create a directory tree, based on the HOME directory, by using the functions activated in the FILES menu. Press „¡ to activate the FILES menu.
  • Page 100 Next, we will create a sub-directory named INTRO (for INTROduction), within MANS, to hold variables created as exercise in subsequent sections of this chapter. Press the $ key to return to normal calculator display (the TOOLS menu will be shown). Then, press J to show the HOME directory contents in the soft menu key labels.
  • Page 101 To move into the MANS directory, press the corresponding soft menu key (A in this case), and ` if in algebraic mode. The directory tree will be shown in the second line of the display as {HOME M NS}. However, there will be no labels associated with the soft menu keys, as shown below, because there are no variables defined within this directory.
  • Page 102 Use the down arrow key (˜) to select the option 2. MEMORY… , or just press 2. Then, press @@OK@@. This will produce the following pull-down menu: Use the down arrow key (˜) to select the 5. DIRECTORY option, or just press 5.
  • Page 103: Moving Among Subdirectories

    Press the @@OK@ soft menu key to activate the command, to create the sub- directory: Moving among subdirectories To move down the directory tree, you need to press the soft menu key corresponding to the sub-directory you want to move to. The list of variables in a sub-directory can be produced by pressing the J (VARiables) key.
  • Page 104 The ‘S2’ string in this form is the name of the sub-directory that is being deleted. The soft menu keys provide the following options: @YES@ Proceed with deleting the sub-directory (or variable) @ALL@ Proceed with deleting all sub-directories (or variables) !ABORT Do not delete sub-directory (or variable) from a list @@NO@@...
  • Page 105 Use the down arrow key (˜) to select the option 2. MEMORY… Then, press @@OK@@. This will produce the following pull-down menu: Use the down arrow key (˜) to select the 5. DIRECTORY option. Then, press @@OK@@. This will produce the following pull-down menu: Use the down arrow key (˜) to select the 6.
  • Page 106 Press @@OK@@, to get: Then, press ) @ @S3@@ to enter ‘S3’ as the argument to PGDIR. Press ` to delete the sub-directory: Command PGDIR in RPN mode To use the PGDIR in RPN mode you need to have the name of the directory, between quotes, already available in the stack before accessing the command.
  • Page 107: Creating Variables

    ‘B’, ‘a’, ‘b’, ‘ ’, ‘ ’, ‘A1’, ‘AB12’, ‘ A12’,’Vel’,’Z0’,’z1’, etc. A variable can not have the same name than a function of the calculator. You can not have a SIN variable for example as there is a SIN command in the calculator.
  • Page 108 Name Using the FILES menu We will use the FILES menu to enter the variable A. We assume that we are in the sub-directory {HOME M NS INTRO}. To get to this sub-directory, use the following: „¡ and select the INTRO sub-directory as shown in this screen: Press @@OK@@ to enter the directory.
  • Page 109 To enter variable A (see table above), we first enter its contents, namely, the number 12.5, and then its name, A, as follows: 12.5 @@OK@@ ~a@@OK@@. Resulting in the following screen: Press @@OK@@ once more to create the variable. The new variable is shown in the following variable listing: The listing indicates a real variable ( 10.5 bytes of memory.
  • Page 110 Using the STO command A simpler way to create a variable is by using the STO command (i.e., the K key). We provide examples in both the Algebraic and RPN modes, by creating the remaining of the variables suggested above, namely: Name Algebraic mode Use the following keystrokes to store the value of –0.25 into variable :...
  • Page 111 z1: 3+5*„¥ K~„z1` (if needed, accept change to Complex mode) p1: ‚å‚é~„r³„ì* ~„rQ2™™™ K~„p1`. The screen, at this point, will look as follows: You will see six of the seven variables listed at the bottom of the screen: p1, z1, R, Q, A12, . RPN mode Use the following keystrokes to store the value of –0.25 into variable : .25\`³~‚a`.
  • Page 112: Algebraic Mode

    z1: ³3+5*„¥ ³~„z1 K(if needed, accept change to Complex mode) p1: ‚å‚é~„r³„ì* ~„rQ2™™™ ³ ~„p1™` K. The screen, at this point, will look as follows: You will see six of the seven variables listed at the bottom of the screen: p1, z1, R, Q, A12, .
  • Page 113 Pressing the soft menu key corresponding to p1 will provide an error message (try L @@@p1@@ `): Note: By pressing @@@p1@@ ` we are trying to activate (run) the p1 program. However, this program expects a numerical input. Try the following exercise: $@@@p1@ „Ü5`.
  • Page 114 At this point, the screen looks like this: To see the contents of A, use: L @@@A@@@. To run program p1 with r = 5, use: L5 @@@p1@@@. Notice that to run the program in RPN mode, you only need to enter the input (5) and press the corresponding soft menu key.
  • Page 115: Replacing The Contents Of Variables

    Use the keystroke combination ‚˜ to list the contents of all variables in the screen. For example: Press $ to return to normal calculator display. Replacing the contents of variables Replacing the contents of a variable can be thought of as storing a different value in the same variable name.
  • Page 116: Copying Variables

    Press „¡@@OK@@ to produce the following list of variables: Use the down-arrow key ˜ to select variable A (the last in the list), then press @@COPY@. The calculator will respond with a screen labeled PICK DESTINATION: „î K @@@z1@@ `. To check the new contents...
  • Page 117 Here is a way to use the history (stack) to copy a variable from one directory to another with the calculator set to the Algebraic mode. Suppose that we are within the sub-directory {HOME MANS INTRO}, and want to copy the contents of variable z1 to sub-directory {HOME MANS}.
  • Page 118 The following is an exercise to demonstrate how to copy two or more variables using the stack when the calculator is in Algebraic mode. Suppose, once more, that we are within sub-directory {HOME MANS INTRO} and that we want to copy the variables R and Q into sub-directory {HOME MANS}.
  • Page 119: Reordering Variables In A Directory

    The following is an exercise to demonstrate how to copy two or more variables using the stack when the calculator is in RPN mode. We assume, again, that we are within sub-directory {HOME MANS INTRO} and that we want to copy the variables R and Q into sub-directory {HOME MANS}.
  • Page 120: Moving Variables Using The Files Menu

    A12 to sub-directory {HOME MANS}. Here is how to do it: Press „¡@@OK@@ to show a variable list. Use the down-arrow key ˜ to select variable A12, then press @@MOVE@. The calculator will respond with a PICK DESTINATION screen. Use the up arrow key — to select the sub-directory MANS and press @@OK@@.
  • Page 121: Deleting Variables

    Notice that variable A12 is no longer there. If you now press „§, the screen will show the contents of sub-directory MANS, including variable A12: Note: You can use the stack to move a variable by combining copying with deleting a variable. Procedures for deleting variables are demonstrated in the next section.
  • Page 122: Undo And Cmd Functions

    variable p1. Press I @PURGE@ J@@p1@@ `. The screen will now show variable p1 removed: You can use the PURGE command to erase more than one variable by placing their names in a list in the argument of PURGE. For example, if now we wanted to purge variables R and Q, simultaneously, we can try the following exercise.
  • Page 123 Once you have selected the command to enter, press @@@OK@@@. The CMD function operates in the same fashion when the calculator is in RPN mode, except that the list of commands only shows numbers or algebraics. It does not show functions entered.
  • Page 124 A flag is a Boolean value, that can be set or cleared (true or false), that specifies a given setting of the calculator or an option in a program. Flags in the calculator are identified by numbers. There are 256 flags, numbered from - 128 to 128.
  • Page 125: Example Of Flag Setting: General Solutions Vs. Principal Value

    By pressing the @ @CHK@@ soft menu key you can change system flag 01 to Principal value. This setting will force the calculator to provide a single value known as the principal value of the solution.
  • Page 126: Other Flags Of Interest

    03 Function symb: 27 ‘X+Y*i’ (X,Y): 60 [ ][ ] locks: Press @@OK@@ twice to return to normal calculator display. ³~ „t` ƒ³ ~ „t` Constant values (e.g., ) are kept as symbols Functions are not automatically evaluated, instead they are loaded as symbolic expressions.
  • Page 127: Choose Boxes Vs. Soft Menu

    CHOOSE boxes vs. Soft MENU In some of the exercises presented in this chapter we have seen menu lists of commands displayed in the screen. These menu lists are referred to as CHOOSE boxes. For example, to use the ORDER command to reorder variables in a directory, we use, in algebraic mode: „°˜...
  • Page 128 To activate the ORDER command we press the C(@ORDER) soft menu key. Although not applied to a specific example, this exercise shows the two options for menus in the calculator (CHOOSE boxes and soft MENUs). Page 2-68...
  • Page 129 Note: most of the examples in this user guide assume that the current setting of flag 117 is its default setting (that is, not set). If you have set the flag but want to strictly follow the examples in this guide, you should clear the flag before continuing.
  • Page 130 The CMDS (CoMmanDS) menu, activated within the Equation Writer, i.e., ‚O L @CMDS Page 2-70...
  • Page 131: Checking Calculators Settings

    Chapter 1), use menus and choose boxes (see Chapter 1), and operate with variables (see Chapter 2). Checking calculators settings To check the current calculator and CAS settings you need to just look at the top line in the calculator display in normal operation. For example, you may see the following setting:...
  • Page 132: Checking Calculator Mode

    (as opposite to Complex) mode. In some cases, a complex result may show up, and a request to change the mode to Complex will be made by the calculator. Exact mode is the default mode for most operations. Therefore, you may want to start your calculations in this mode.
  • Page 133 \ key, e.g., 2.5\. Result = -2.5. If you use the \ function while there is no command line, the calculator will apply the NEG function (inverse of sign) to the object on the first level of the stack.
  • Page 134: Using Parentheses

    Alternatively, in RPN mode, you can separate the operands with a space (#) before pressing the operator key. Examples: 3.7#5.2 + 6.3#8.5 - 4.2#2.5 * 2.3#4.5 / Using parentheses Parentheses can be used to group operations, as well as to enclose arguments of functions.
  • Page 135: Squares And Square Roots

    Squares and square roots The square function, SQ, is available through the keystroke combination: „º. When calculating in the stack in ALG mode, enter the function before the argument, e.g., „º\2.3` In RPN mode, enter the number first, then the function, e.g., The square root function, , is available through the R key.
  • Page 136: Natural Logarithms And Exponential Function

    Using powers of 10 in entering data Powers of ten, i.e., numbers of the form -4.5´10 V key. For example, in ALG mode: Or, in RPN mode: Natural logarithms and exponential function Natural logarithms (i.e., logarithms of base e = 2.7182818282) are calculated by the keystroke combination ‚¹...
  • Page 137: Real Number Functions In The Mth Menu

    ALOG, LN, EXP, SIN, COS, TAN, ASIN, ACOS, ATAN, can be combined with the fundamental operations (+-*/) to form more complex expressions. The Equation Writer, whose operations is described in Chapter 2, is ideal for building such expressions, regardless of the calculator operation mode. Differences between functions and operators Functions like ABS, SQ, , LOG, ALOG, LN, EXP, SIN, COS, TAN, ASIN, ACOS, ATAN require a single argument.
  • Page 138 117 (see Chapter 2), the MTH menu is shown as the following menu list: As they are a great number of mathematic functions available in the calculator, the MTH menu is sorted by the type of object the functions apply on. For example, options 1.
  • Page 139: Hyperbolic Functions And Their Inverses

    Hyperbolic functions and their inverses Selecting Option 4. HYPERBOLIC.. , in the MTH menu, and pressing @@OK@@, produces the hyperbolic function menu: The hyperbolic functions are: Hyperbolic sine, SINH, and its inverse, ASINH or sinh Hyperbolic cosine, COSH, and its inverse, ACOSH or cosh Hyperbolic tangent, TANH, and its inverse, ATANH or tanh This menu contains also the functions: Finally, option 9.
  • Page 140 The result is: The operations shown above assume that you are using the default setting for system flag 117 (CHOOSE boxes). If you have changed the setting of this flag (see Chapter 2) to SOFT menu, the MTH menu will show as labels of the soft menu keys, as follows (left-hand side in ALG mode, right –hand side in RPN mode): Pressing L shows the remaining options:...
  • Page 141: Real Number Functions

    TANH(2.5) = 0.98661.. EXPM(2.0) = 6.38905…. Once again, the general procedure shown in this section can be applied for selecting options in any calculator menu. Real number functions Selecting option 5. REAL.. in the MTH menu, with system flag 117 set to...
  • Page 142 : calculates 100 x/y, i.e., the percentage total, the portion These functions require two arguments, we illustrate the calculation of %T(15,45), i.e., calculation 15% of 45, next. We assume that the calculator is set to ALG mode, and that system flag 117 is set to CHOOSE boxes. The procedure is as follows: „´...
  • Page 143 „´ 5 @@OK@@ 3 @@OK@@ Note: The exercises in this section illustrate the general use of calculator functions having 2 arguments. The operation of functions having 3 or more arguments can be generalized from these examples. As an exercise for percentage-related functions, verify the following values: %(5,20) = 1, %CH(22,25) = 13.6363.., %T(500,20) = 4...
  • Page 144: Special Functions

    Please notice that MOD is not a function, but rather an operator, i.e., in ALG mode, MOD should be used as y MOD x, and not as MOD(y,x). Thus, the operation of MOD is similar to that of +, -, *, /. As an exercise, verify that 15 MOD 4 = 15 mod 4 = residual of 15/4 = 3 Absolute value, sign, mantissa, exponent, integer and fractional parts ABS(x)
  • Page 145 Factorial of a number The factorial of a positive integer number n is defined as n!=n (n-1)×(n-2) …3×2×1, with 0! = 1. The factorial function is available in the calculator by using ~‚2. In both ALG and RPN modes, enter the number first, followed by the sequence ~‚2.
  • Page 146: Calculator Constants

    PSI(1.5,3) = 1.40909.., and Psi(1.5) = 3.64899739..E-2. These calculations are shown in the following screen shot: Calculator constants The following are the mathematical constants used by your calculator: the base of natural logarithms. the imaginary unit, i the ratio of the length of the circle to its diameter.
  • Page 147: Operations With Units

    „ì. Finally, i is available by using „¥. Operations with units Numbers in the calculator can have units associated with them. Thus, it is possible to calculate results involving a consistent system of units and produce a result with the appropriate combination of units.
  • Page 148 The user will recognize most of these units (some, e.g., dyne, are not used very often nowadays) from his or her physics classes: N = newtons, dyn = dynes, gf = grams – force (to distinguish from gram-mass, or plainly gram, a unit of mass), kip = kilo-poundal (1000 pounds), lbf = pound-force (to distinguish from pound-mass), pdl = poundal.
  • Page 149: Available Units

    Note: Use the L key or the „«keystroke sequence to navigate through the menus. Available units The following is a list of the units available in the UNITS menu. The unit symbol is shown first followed by the unit name in parentheses: LENGTH m (meter), cm (centimeter), mm (millimeter), yd (yard), ft (feet), in (inch), Mpc (Mega parsec), pc (parsec), lyr (light-year), au (astronomical unit), km...
  • Page 150 (foot-pound), therm (EEC therm), MeV (mega electron-volt), eV (electron- volt) POWER W (watt), hp (horse power), PRESSURE Pa (pascal), atm (atmosphere), bar (bar), psi (pounds per square inch), torr (torr), mmHg (millimeters of mercury), inHg (inches of mercury), inH20 (inches...
  • Page 151 P (poise), St (stokes) Units not listed Units not listed in the Units menu, but available in the calculator include: gmol (gram-mole), lbmol (pound-mole), rpm (revolutions per minute), dB (decibels). These units are accessible through menu 117.02, triggered by using MENU(117.02) in ALG mode, or 117.02 ` MENU in RPN mode.
  • Page 152: Converting To Base Units

    Converting to base units To convert any of these units to the default units in the SI system, use the function UBASE. For example, to find out what is the value of 1 poise (unit of viscosity) in the SI units, use the following: In ALG mode, system flag 117 set to CHOOSE boxes: ‚Û...
  • Page 153: Attaching Units To Numbers

    The screen will look like the following: Note: If you forget the underscore, the result is the expression 5*N, where N here represents a possible variable name and not Newtons. To enter this same quantity, with the calculator in RPN mode, use the following keystrokes: ‚Û...
  • Page 154 Notice that the underscore is entered automatically when the RPN mode is active. The result is the following screen: As indicated earlier, if system flag 117 is set to SOFT menus, then the UNITS menu will show up as labels for the soft menu keys. This set up is very convenient for extensive operations with units.
  • Page 155 ___________________________________________________ (*) In the SI system, this prefix is da rather than D. Use D for deka in the calculator, however. To enter these prefixes, simply type the prefix using the ~ keyboard. For example, to enter 123 pm (1 picometer), use: 123‚Ý~„p~„m...
  • Page 156 which shows as 65_(m yd). To convert to units of the SI system, use function UBASE: Note: Recall that the ANS(1) variable is available through the keystroke combination „î(associated with the ` key). To calculate a division, say, 3250 mi / 50 h, enter it as (3250_mi)/(50_h) which transformed to SI units, with function UBASE, produces: Addition and subtraction can be performed, in ALG mode, without using parentheses, e.g., 5 m + 3200 mm, can be entered simply as 5_m + 3200_mm...
  • Page 157: Units Manipulation Tools

    Stack calculations in the RPN mode, do not require you to enclose the different terms in parentheses, e.g., These operations produce the following output: Also, try the following operations: 12_mm ` 1_cm^2 `* 2_s ` / These last two operations produce the following output: Note: Units are not allowed in expressions entered in the equation writer.
  • Page 158 UFACT(x,y): factors a unit y from unit object x UNIT(x,y): combines value of x with units of y The UBASE function was discussed in detail in an earlier section in this chapter. To access any of these functions follow the examples provided earlier for UBASE.
  • Page 159: Physical Constants In The Calculator

    Physical constants in the calculator Following along the treatment of units, we discuss the use of physical constants that are available in the calculator’s memory. These physical constants are contained in a constants library activated with the command CONLIB. To...
  • Page 160 The soft menu keys corresponding to this CONSTANTS LIBRARY screen include the following functions: when selected, constants values are shown in SI units ENGL when selected, constants values are shown in English units (*) UNIT when selected, constants are shown with units attached (*) VALUE when selected, constants are shown without units copies value (with or without units) to the stack...
  • Page 161 To copy the value of Vm to the stack, select the variable name, and press ! then, press @QUIT@. For the calculator set to the ALG, the screen will look like this: The display shows what is called a tagged value, Vm:359.0394. In here, Vm, is the tag of this result.
  • Page 162: Function Zfactor

    Special physical functions Menu 117, triggered by using MENU(117) in ALG mode, or 117 ` MENU in RPN mode, produces the following menu (labels listed in the display by using ‚˜): The functions include: ZFACTOR: gas compressibility Z factor function FANNING: Fanning friction factor for fluid flow DARCY: Darcy-Weisbach friction factor for fluid flow F0 : Black body emissive power function...
  • Page 163: Function F

    ZFACTOR(x ), where x is the reduced temperature, i.e., the ratio of actual temperature to pseudo-critical temperature, and y is the reduced pressure, i.e., the ratio of the actual pressure to the pseudo-critical pressure. The value of x must be between 1.05 and 3.0, while the value of y must be between 0 and 30.
  • Page 164: Defining And Using Functions

    In the following example, we assume you have set your calculator to ALG mode. Enter the following sequence of keystrokes: „à³~h„Ü~„x™‚Å ‚¹~„x+1™+„¸~„x`...
  • Page 165 Thus, the variable H contains a program defined by: This is a simple program in the default programming language of the calculator. This programming language is called UserRPL. The program shown above is relatively simple and consists of two parts, contained between the program containers <<...
  • Page 166: Functions Defined By More Than One Expression

    The contents of the variable K are: << Functions defined by more than one expression In this section we discuss the treatment of functions that are defined by two or more expressions. An example of such functions would be The function IFTE (IF-Then-Else) describes such functions. The IFTE function The IFTE function is written as If condition is true then operation_if_true is performed, else operation_if_false is...
  • Page 167: Combined Ifte Functions

    Combined IFTE functions To program a more complicated function such as you can combine several levels of the IFTE function, i.e., ‘g(x) = IFTE(x<-2, -x, IFTE(x<0, x+1, IFTE(x<2, x-1, x^2)))’ Define this function by any of the means presented above, and check that g(-3) = 3, g(-1) = 0, g(1) = 0, g(3) = 9.
  • Page 168: Setting The Calculator To Complex Mode

    , can be thought of as the reflection of z about the origin. Setting the calculator to COMPLEX mode When working with complex numbers it is a good idea to set the calculator to complex mode, using the following keystrokes: H) @ @CAS@ ˜˜™@ @CHK@ The COMPLEX mode will be selected if the CAS MODES screen shows the option _Complex checked, i.e.,...
  • Page 169: Entering Complex Numbers

    Press @@OK@@ , twice, to return to the stack. Entering complex numbers Complex numbers in the calculator can be entered in either of the two Cartesian representations, namely, x+iy, or (x,y). The results in the calculator will be shown in the ordered-pair format, i.e., (x,y). For example, with the calculator in ALG mode, the complex number (3.5,-1.2), is entered as:...
  • Page 170: Polar Representation Of A Complex Number

    (available in the catalog, ‚N). A complex number in polar representation is written as z = r e . You can enter this complex number into the calculator by using an ordered pair of the form (r, ). The angle symbol ( ) can be entered as ~‚6.
  • Page 171: Simple Operations With Complex Numbers

    (+-*/). The results follow the rules of algebra with the caveat that = -1. Operations with complex numbers are similar to those with real numbers. For example, with the calculator in ALG mode and the CAS set to Complex, we’ll attempt the following sum: (3+5i) + (6-3i):...
  • Page 172: Changing Sign Of A Complex Number

    CMPLX menus detailed later. The CMPLX menus There are two CMPLX (CoMPLeX numbers) menus available in the calculator. One is available through the MTH menu (introduced in Chapter 3) and one directly into the keyboard (‚ß). The two CMPLX menus are presented next.
  • Page 173: Cmplx Menu Through The Mth Menu

    CMPLX menu through the MTH menu Assuming that system flag 117 is set to CHOOSE boxes (see Chapter 2), the CMPLX sub-menu within the MTH menu is accessed by using: „´9 @@OK@@ . The following sequence of screen shots illustrates these steps: The first menu (options 1 through 6) shows the following functions: RE(z) : Real part of a complex number...
  • Page 174: Cmplx Menu In Keyboard

    This first screen shows functions RE, IM, and C R. Notice that the last function returns a list {3. 5.} representing the real and imaginary components of the complex number: The following screen shows functions R C, ABS, and ARG. Notice that the ABS function gets translated to |3.+5.·i|, the notation of the absolute value.
  • Page 175: Functions Applied To Complex Numbers

    The resulting menu include some of the functions already introduced in the previous section, namely, ARG, ABS, CONJ, IM, NEG, RE, and SIGN. It also includes function i which serves the same purpose as the keystroke combination „¥, i.e., to enter the unit imaginary number i in an expression. The keyboard-base CMPLX menu is an alternative to the MTH-based CMPLX menu containing the basic complex number functions.
  • Page 176: Functions From The Mth Menu

    Note: When using trigonometric functions and their inverses with complex numbers the arguments are no longer angles. Therefore, the angular measure selected for the calculator has no bearing in the calculation of these functions with complex arguments. To understand the way that trigonometric functions, and other functions, are defined for complex numbers consult a book on complex variables.
  • Page 177 Function DROITE is found in the command catalog (‚N). Using EVAL(ANS(1)) simplifies the result to: Page 4-10...
  • Page 178: Entering Algebraic Objects

    Chapter 5 Algebraic and arithmetic operations An algebraic object, or simply, algebraic, is any number, variable name or algebraic expression that can be operated upon, manipulated, and combined according to the rules of algebra. Examples of algebraic objects are the following: A number: 12.3, 15.2_m, ‘...
  • Page 179 (exponential, logarithmic, trigonometry, hyperbolic, etc.), as you would any real or complex number. To demonstrate basic operations with algebraic objects, let’s create a couple of objects, say ‘ *R^2’ and ‘g*t^2/4’, and store them in variables A1 and A2 (See Chapter 2 to learn how to create variables and store values in them).
  • Page 180: Functions In The Alg Menu

    Rather than listing the description of each function in this manual, the user is invited to look up the description using the calculator’s help facility: I L @) H ELP@ ` . To locate a particular function, type the first letter of the function.
  • Page 181 We notice that, at the bottom of the screen, the line See: EXPAND FACTOR suggests links to other help facility entries, the functions EXPAND and FACTOR. To move directly to those entries, press the soft menu key @SEE1! for EXPAND, and @SEE2! for FACTOR.
  • Page 182: Factor

    FACTOR: LIN: SOLVE: TEXPAND: Note: Recall that, to use these, or any other functions in the RPN mode, you must enter the argument first, and then the function. For example, the example for TEXPAND, in RPN mode will be set up as: ³„¸+~x+~y` At this point, select function TEXPAND from menu ALG (or directly from the catalog ‚N), to complete the operation.
  • Page 183: Other Forms Of Substitution In Algebraic Expressions

    Other forms of substitution in algebraic expressions Functions SUBST, shown above, is used to substitute a variable in an expression. A second form of substitution can be accomplished by using the ‚¦ (associated with the I key). For example, in ALG mode, the following entry will substitute the value x = 2 in the expression x+x .
  • Page 184: Operations With Transcendental Functions

    Expansion and factoring using log-exp functions The „Ð produces the following menu: Information and examples on these commands are available in the help facility of the calculator. Some of the command listed in the EXP&LN menu, i.e., LIN, Page 5-7...
  • Page 185 (asin(x)). Description of these commands and examples of their applications are available in the calculator’s help facility (IL@HELP). The user is invited to explore this facility to find information on the commands in the TRIG menu. Notice that the first command in the TRIG menu is the HYPERBOLIC menu, whose functions were introduced in Chapter 2.
  • Page 186: Functions In The Arithmetic Menu

    Functions in the ARITHMETIC menu The ARITHMETIC menu contains a number of sub-menus for specific applications in number theory (integers, polynomials, etc.), as well as a number of functions that apply to general arithmetic operations. The ARITHMETIC menu is triggered through the keystroke combination „Þ (associated with the 1 key).
  • Page 187: Polynomial Menu

    LGCD (Greatest Common Denominator): PROPFRAC (proper fraction) SIMP2: The functions associated with the ARITHMETIC submenus: INTEGER, POLYNOMIAL, MODULO, and PERMUTATION, are the following: INTEGER menu EULER Number of integers < n, co -prime with n IABCUV Solves au + bv = c, with a,b,c = integers IBERNOULLI n-th Bernoulli number ICHINREM...
  • Page 188 FACTOR Factorizes an integer number or a polynomial FCOEF Generates fraction given roots and multiplicity FROOTS Returns roots and multiplicity given a fraction Greatest common divisor of 2 numbers or polynomials HERMITE n-th degree Hermite polynomial HORNER Horner evaluation of a polynomial LAGRANGE Lagrange polynomial interpolation Lowest common multiple of 2 numbers or polynomials...
  • Page 189: Applications Of The Arithmetic Menu

    ARITHMETIC menu functions. Definitions are presented next regarding the subjects of polynomials, polynomial fractions and modular arithmetic. The examples presented below are presented independently of the calculator setting (ALG or RPN) Modular arithmetic Consider a counting system of integer numbers that periodically cycles back on itself and starts again, such as the hours in a clock.
  • Page 190 multiplying j times k in modulus n arithmetic is, in essence, the integer remainder of j k/n in infinite arithmetic, if j k>n. For example, in modulus 12 arithmetic we have 7 3 = 21 = 12 + 9, (or, 7 3/12 = 21/12 = 1 + 9/12, i.e., the integer reminder of 21/12 is 9).
  • Page 191 -n/2+1, …,-1, 0, 1,…,n/2-1, n/2, if n is even, and –(n-1)/2, -(n-3)/2,…,-1,0,1,…,(n-3)/2, (n-1)/2, if n is odd. For example, for n = 8 (even), the finite arithmetic ring in the calculator includes the numbers: (-3,-2,-1,0,1,3,4), while for n = 7 (odd), the corresponding calculator’s finite arithmetic ring is given by (-3,-2,-1,0,1,2,3).
  • Page 192 In the examples of modular arithmetic operations shown above, we have used numbers that not necessarily belong to the ring, i.e., numbers such as 66, 125, 17, etc. The calculator will convert those numbers to ring numbers before 0 (mod 12)
  • Page 193 operating on them. You can also convert any number into a ring number by using the function EXPANDMOD. For example, The modular inverse of a number Let a number k belong to a finite arithmetic ring of modulus n, then the modular inverse of k, i.e., 1/k (mod n), is a number j, such that j k modular inverse of a number can be obtained by using the function INVMOD in the MODULO sub-menu of the ARITHMETIC menu.
  • Page 194 Note: Refer to the help facility in the calculator for description and examples on other modular arithmetic. Many of these functions are applicable to polynomials. For information on modular arithmetic with polynomials please refer to a textbook on number theory.
  • Page 195 2 and 1 before using GCD. The results will be a polynomial or a list representing the greatest common denominator of the two polynomials or of each list of polynomials. Examples, in RPN mode, follow (calculator set to Exact mode): ‘X^3-1’`’X^2-1’`GCD Results in: ‘X-1’...
  • Page 196 -5*X The variable VX A variable called VX exists in the calculator’s {HOME CASDIR} directory that takes, by default, the value of ‘X’. This is the name of the preferred independent variable for algebraic and calculus applications. Avoid using the variable VX in your programs or equations, so as to not get it confused with the CAS’...
  • Page 197 For example, for n = 2, we will write: Check this result with your calculator: LAGRANGE([[ x1,x2],[y1,y2]]) = ‘((y1-y2)*X+(y2*x1-y1*x2))/(x1-x2)’. Other examples: LAGRANGE([[1, 2, 3][2, 8, 15]]) = ‘(X^2+9*X-6)/2’ LAGRANGE([[0.5,1.5,2.5,3.5,4.5][12.2,13.5,19.2,27.3,32.5]]) = ‘-(.1375*X^4+ -.7666666666667*X^3+ - .74375*X^2 + 1.991666666667*X-12.92265625)’. Note: Matrices are introduced in Chapter 10.
  • Page 198: The Proot Function

    The PCOEF function Given an array containing the roots of a polynomial, the function PCOEF generates an array containing the coefficients of the corresponding polynomial. The coefficients correspond to decreasing order of the independent variable. For example: PCOEF([-2,–1,0,1,1,2]) = [1. –1. –5. 5. 4. –4. 0.], which represents the polynomial X The PROOT function Given an array containing the coefficients of a polynomial, in decreasing order,...
  • Page 199: The Epsx0 Function And The Cas Variable Eps

    The EPSX0 function and the CAS variable EPS The variable (epsilon) is typically used in mathematical textbooks to represent a very small number. The calculator’s CAS creates a variable EPS, with default value 0.0000000001 = 10 , when you use the EPSX0 function. You can change this value, once created, if you prefer a different value for EPS.
  • Page 200: The Simp2 Function

    Fractions Fractions can be expanded and factored by using functions EXPAND and FACTOR, from the ALG menu (‚×). For example: EXPAND(‘(1+X)^3/((X-1)*(X+3))’) = ‘(X^3+3*X^2+3*X+1)/(X^2+2*X-3)’ EXPAND(‘(X^2)*(X+Y)/(2*X-X^2)^2)’) = ‘(X+Y)/(X^2-4*X+4)’ EXPAND(‘X*(X+Y)/(X^2-1)’) = ‘(X^2+Y*X)/(X^2-1)’ EXPAND(‘4+2*(X-1)+3/((X-2)*(X+3))-5/X^2’) = ‘(2*X^5+4*X^4-10*X^3-14*X^2-5*X+30)/(X^4+X^3-6*X^2)’ FACTOR(‘(3*X^3-2*X^2)/(X^2-5*X+6)’) = ‘X^2*(3*X-2)/((X-2)*(X-3))’ FACTOR(‘(X^3-9*X)/(X^2-5*X+6)’ ) = ‘X*(X+3)/(X-2)’ FACTOR(‘(X^2-1)/(X^3*Y-Y)’) = ‘(X+1)/((X^2+X+1)*Y)’ The SIMP2 function Functions SIMP2 and PROPFRAC are used to simplify a fraction and to produce a proper fraction, respectively.
  • Page 201: The Fcoef Function

    If you have the Complex mode active, the result will be: ‘2*X+(1/2/(X+i)+1/2/(X-2)+5/(X-5)+1/2/X+1/2/(X-i))’ The FCOEF function The function FCOEF is used to obtain a rational fraction, given the roots and poles of the fraction. Note: If a rational fraction is given as F(X) = N(X)/D(X), the roots of the fraction result from solving the equation N(X) = 0, while the poles result from solving the equation D(X) = 0.
  • Page 202: Step-By-Step Operations With Polynomials And Fractions

    [0 –2. 1 –1. – ((1+i* 3)/2) –1. – ((1–i* 3)/2) –1. 3 1. 2 1.]. Step-by-step operations with polynomials and fractions By setting the CAS modes to Step/step the calculator will show simplifications of fractions or operations with polynomials in a step-by-step fashion. This is very useful to see the steps of a synthetic division.
  • Page 203: The Convert Menu And Algebraic Operations

    The CONVERT Menu and algebraic operations The CONVERT menu is activated by using „Ú key (the 6 key). This menu summarizes all conversion menus in the calculator. The list of these menus is shown next: The functions available in each of the sub-menus are shown next.
  • Page 204: Base Convert Menu (Option)

    BASE convert menu (Option 2) This menu is the same as the UNITS menu obtained by using ‚ã. The applications of this menu are discussed in detail in Chapter 19. TRIGONOMETRIC convert menu (Option 3) This menu is the same as the TRIG menu obtained by using ‚Ñ. The applications of this menu are discussed in detail in this Chapter.
  • Page 205 Function NUM has the same effect as the keystroke combination ‚ï (associated with the ` key). Function NUM converts a symbolic result into its floating-point value. Function Q converts a floating-point value into a fraction. Function Q converts a floating-point value into a fraction of , if a fraction of can be found for the number;...
  • Page 206 POWEREXPAND LNCOLLECT SIMPLIFY Page 5-29...
  • Page 207: Symbolic Solution Of Algebraic Equations

    Chapter 6 Solution to single equations In this chapter we feature those functions that the calculator provides for solving single equations of the form f(X) = 0. Associated with the 7 key there are two menus of equation-solving functions, the Symbolic SOLVer („Î), and the NUMerical SoLVer (‚Ï).
  • Page 208: Function Solve

    Using the RPN mode, the solution is accomplished by entering the equation in the stack, followed by the variable, before entering function ISOL. Right before the execution of ISOL, the RPN stack should look as in the figure to the left. After applying ISOL, the result is shown in the figure to the right: The first argument in ISOL can be an expression, as shown above, or an equation.
  • Page 209: Function Solvevx

    The very last solution is not visible because the result occupies more characters than the width of the calculator’s screen. However, you can still see all the solutions by using the down arrow key (˜), which triggers the line editor (this operation can be used to access any output line that is wider than the calculator’s screen):...
  • Page 210: Function Zeros

    In the first case SOLVEVX could not find a solution. In the second case, SOLVEVX found a single solution, X = 2. The following screens show the RPN stack for solving the two examples shown above (before and after application of SOLVEVX): The equation used as argument for function SOLVEVX must be reducible to a rational expression.
  • Page 211: Numerical Solver Menu

    Numerical Solver features of the calculator. Numerical solver menu The calculator provides a very powerful environment for the solution of single algebraic or transcendental equations. To access this environment we start the numerical solver (NUM.SLV) by using ‚Ï. This produces a drop-down...
  • Page 212: Polynomial Equations

    Polynomial Equations Using the Solve poly… option in the calculator’s SOLVE environment you can: (1) find the solutions to a polynomial equation; (2) obtain the coefficients of the polynomial having a number of given roots; (3) obtain an algebraic expression for the polynomial as a function of X.
  • Page 213 Generating polynomial coefficients given the polynomial's roots Suppose you want to generate the polynomial whose roots are the numbers [1, 5, -2, 4]. To use the calculator for this purpose, follow these steps: ‚Ϙ˜@@OK@@ ˜„Ô1‚í5 ‚í2\‚í...
  • Page 214 Generating an algebraic expression for the polynomial You can use the calculator to generate an algebraic expression for a polynomial given the coefficients or the roots of the polynomial. The resulting expression will be given in terms of the default CAS variable X. (The examples below shows how you can replace X with any other variable by using the function |.)
  • Page 215: Financial Calculations

    „sÒ (associated with the 9 key). Before discussing in detail the operation of this solving environment, we present some definitions needed to understand financial operations in the calculator. Definitions Often, to develop projects, it is necessary to borrow money from a financial institution or from public funds.
  • Page 216 The reason why the value of PMT turned out to be negative is because the calculator is looking at the money amounts from the point of view of the borrower. The borrower has + US $ 2,000,000.00 at time period t = 0, then he starts paying, i.e., adding -US $...
  • Page 217 The value shown in the screen above is simply round-off error resulting from the numerical solution. Press $or `, twice, to return to normal calculator display. Example 3 – Calculating payment with payments at beginning of period Let’s solve the same problem as in Examples 1 and 2, but using the option that...
  • Page 218 Notes: 1. The financial calculator environment allows you to solve for any of the terms involved, i.e., n, I%YR, PV, FV, P/Y, given the remaining terms in the loan calculation.
  • Page 219: Solving Equations With One Unknown Through Num.slv

    Before the command PURGE is entered, the RPN stack will look like this: Solving equations with one unknown through NUM.SLV The calculator's NUM.SLV menu provides item types of equations in a single variable, including non-linear algebraic and transcendental equations. For example, let's solve the equation: e Simply enter the expression as an algebraic object and store it into variable EQ.
  • Page 220 ³„¸~„x™-S„ì *~„x/3™‚Å 0™ Function STEQ Function STEQ, available through the command catalog, ‚N, will store its argument into variable EQ, e.g., in ALG mode: In RPN mode, enter the equation between apostrophes and activate command STEQ. Thus, function STEQ can be used as a shortcut to store an expression into variable EQ.
  • Page 221 The solution the calculator seeks is determined by the initial value present in the unknown input field. If no value is present, the calculator uses a default value of zero. Thus, you can search for more than one solution to an equation by changing the initial value in the unknown input field.
  • Page 222 The equation is strain in the x-direction, in the directions of the x-, y-, and z-axes, E is Young’s modulus or modulus of elasticity of the material, n is the Poisson ratio of the material, expansion coefficient of the material, and T is a temperature increase. Suppose that you are given the following data: = 500 psi, E = 1200000 psi, n = 0.15, To calculate the strain e...
  • Page 223 With the ex: field highlighted, press @SOLVE@ to solve for ex: The solution can be seen from within the SOLVE EQUATION input form by pressing @EDIT while the ex: field is highlighted. The resulting value is 2.470833333333E-3. Press @@@OK@@ to exit the EDIT feature. Suppose that you now, want to determine the Young’s modulus that will produce a strain of e = 0.005 under the same state of stress, neglecting thermal...
  • Page 224 Specific energy in an open channel is defined as the energy per unit weight measured with respect to the channel bottom. Let E = specific energy, y = channel depth, V = flow velocity, g = acceleration of gravity, then we write The flow velocity, in turn, is given by V = Q/A, where Q = water discharge, A = cross-sectional area.
  • Page 225 Solve for y. The result is 0.149836.., i.e., y = 0.149836. It is known, however, that there are actually two solutions available for y in the specific energy equation. The solution we just found corresponds to a numerical solution with an initial value of 0 (the default value for y, i.e., whenever the solution field is empty, the initial value is zero).
  • Page 226: Function For Pipe Flow: Darcy

    Re = VD/ = VD/ , where the fluid, respectively, and The calculator provides a function called DARCY that uses as input the relative roughness /D and the Reynolds number, in that order, to calculate the friction factor f. The function DARCY can be found through the command catalog: For example, for /D = 0.0001, Re = 1000000, you can find the friction factor...
  • Page 227 Example 3 – Flow in a pipe You may want to create a separate sub-directory (PIPES) to try this example. The main equation governing flow in a pipe is, of course, the Darcy-Weisbach equation. Thus, type in the following equation into EQ: Also, enter the following variables (f, A, V, Re): In this case we stored the main equation (Darcy-Weisbach equation) into EQ, and then replaced several of its variables by other expressions through the...
  • Page 228 Thus, in the example below we place 0_m in the D: field before solving the problem. The solution is shown in the screen to the right: Press ` to return to normal calculator display. The solution for D will be listed in the stack.
  • Page 229 Here, G is the universal gravitational constant, whose value can be obtained through the use of the function CONST in the calculator by using: We can solve for any term in the equation (except G) by entering the equation...
  • Page 230 Solve for F, and press to return to normal calculator display. The solution is F : 6.67259E-15_N, or F = 6.67259 10 Note: When using units in the numerical solver make sure that all the variables have the proper units, that the units are compatible, and that the equation is dimensionally homogeneous.
  • Page 231 Type an equation, say X^2 - 125 = 0, directly on the stack, and press @@@OK@@@ . At this point the equation is ready for solution. Alternatively, you can activate the equation writer after pressing @EDIT to enter your equation. Press ` to return to the numerical solver screen. Another way to enter an equation into the EQ variable is to select a variable already existing in your directory to be entered into EQ.
  • Page 232: The Solve Soft Menu

    The SOLVE soft menu The SOLVE soft menu allows access to some of the numerical solver functions through the soft menu keys. To access this menu use in RPN mode: 74 MENU, or in ALG mode: MENU(74). Alternatively, you can use ‚(hold) 7 to activate the SOLVE soft menu.
  • Page 233 Example 1 - Solving the equation t -5t = -4 For example, if you store the equation ‘t^2-5*t=-4’ into EQ, and press @) S OLVR, it will activate the following menu: This result indicates that you can solve for a value of t for the equation listed at the top of the display.
  • Page 234 You can also solve more than one equation by solving one equation at a time, and repeating the process until a solution is found. For example, if you enter the following list of equations into variable EQ: { ‘a*X+b*Y = c’, ‘k*X*Y=s’}, the keystroke sequence @) R OOT @) S OLVR, within the SOLVE soft menu, will produce the following screen: The first equation, namely, a*X + b*Y = c, will be listed in the top part of the...
  • Page 235: The Diffe Sub-Menu

    Using units with the SOLVR sub-menu These are some rules on the use of units with the SOLVR sub-menu: Entering a guess with units for a given variable, will introduce the use of those units in the solution. If a new guess is given without units, the units previously saved for that particular variable are used.
  • Page 236: The Sys Sub-Menu

    This function produces the coefficients [a polynomial a , …, r ]. For example, a vector whose roots are given by [-1, 2, 2, 1, 0], will produce the following coefficients: [1, -4, 3, 4, -4, 0]. The polynomial is x - 4x Function PEVAL This function evaluates a polynomial, given a vector of its coefficients, [a...
  • Page 237 Press J to exit the SOLVR environment. Find your way back to the TVM sub- menu within the SOLVE sub-menu to try the other functions available. Function TVMROOT This function requires as argument the name of one of the variables in the TVM problem.
  • Page 238: Rational Equation Systems

    Rational equation systems Equations that can be re-written as polynomials or rational algebraic expressions can be solved directly by the calculator by using the function SOLVE. You need to provide the list of equations as elements of a vector. The list of variables to solve for must also be provided as a vector.
  • Page 239: Example 2 – Stresses In A Thick Wall Cylinder

    Notice that the right-hand sides of the two equations differ only in the sign between the two terms. Therefore, to write these equations in the calculator, I suggest you type the first term and store in a variable T1, then the second term, and store it in T2.
  • Page 240 We enter a vector with the unknowns: , use the command SOLVE from the S.SLV menu („Î), To solve for P and P it may take the calculator a minute to produce the result: {[‘Pi=-((( - r)*r^2-( + r)*a^2)/(2*a^2))’ , i.e., ‘Po=-(((...
  • Page 241: Solution To Simultaneous Equations With Mslv

    Notice that the result includes a vector [ ] contained within a list { }. To remove the list symbol, use μ. Finally, to decompose the vector, use function OBJ . The result is: These two examples constitute systems of linear equations that can be handled equally well with function LINSOLVE (see Chapter 11).
  • Page 242: Example 1 - Example From The Help Facility

    Example 1 - Example from the help facility As with all function entries in the help facility, there is an example attached to the MSLV entry as shown above. Notice that function MSLV requires three arguments: 1. A vector containing the equations, i.e., ‘[SIN(X)+Y,X+SIN(Y)=1]’ 2.
  • Page 243 We assume that we will be using the ALG and Exact modes in the calculator, although defining the equations and solving them with MSLV is very similar in the RPN mode. Create a sub-directory, say CHANL (for open CHANneL), and...
  • Page 244 μ@@@EQ1@@ μ @@@EQ2@@. The equations are listed in the stack as follows (small font option selected): We can see that these equations are indeed given in terms of the primitive variables b, m, y, g, S , n, Cu, Q, and H In order to solve for y and Q we need to give values to the other variables.
  • Page 245 Next, we’ll enter variable EQS: LL@@EQS@ , followed by vector [y,Q]: ‚í„Ô~„y‚í~q™ and by the initial guesses ‚í„Ô5‚í 10. Before pressing `, the screen will look like this: Press ` to solve the system of equations. You may, if your angular measure is not set to radians, get the following request: Press @@OK@@ and allow the solution to proceed.
  • Page 246: Using The Multiple Equation Solver (Mes)

    In this section we use one important application of trigonometric functions: calculating the dimensions of a triangle. The solution is implemented in the calculator using the Multiple Equation Solver, or MES. Consider the triangle ABC shown in the figure below.
  • Page 247 The cosine law indicates that: In order to solve any triangle, you need to know at least three of the following six variables: a, b, c, cosine law, and sum of interior angles of a triangle, to solve for the other three variables.
  • Page 248 Then, enter the number 9, and create a list of equations by using: function LIST (use the command catalog ‚N). Store this list in the variable EQ. The variable EQ contains the list of equations that will be scanned by the MES when trying to solve for the unknowns.
  • Page 249 Press J, if needed, to get your variables menu. Your menu should show the variables @LVARI! !@TITLE @@EQ@@ . Preparing to run the MES The next step is to activate the MES and try one sample solution. Before we do that, however, we want to set the angular units to DEGrees, if they are not already set to that, by typing ~~deg`.
  • Page 250 1. Press + twice to check that they add indeed to 180 Press L to move to the next variables menu. To calculate the area use: „[ A ]. The calculator first solves for all the other variables, and then finds the area as A: 7.15454401063.
  • Page 251 Press ‚@@ALL@@ to see the solutions: When done, press $ to return to the MES environment. Press J to exit the MES environment and return to the normal calculator display. Organizing the variables in the sub directory Your variable menu will now contain the variables (press L to see the second...
  • Page 252 Programming the MES triangle solution using User RPL To facilitate activating the MES for future solutions, we will create a program that will load the MES with a single keystroke. The program should look like this: << DEG MINIT TITLE LVARI MITM MSOLVR >>, and can be typed in by using: ‚å...
  • Page 253 The soft menu key @PRINT is used to print the screen in a printer, if available. And @EXIT returns you to the MES environment for a new solution, if needed. To return to normal calculator display, press J. The following table of triangle solutions shows the data input in bold face and the solution in italics.
  • Page 254: Application 2 - Velocity And Acceleration In Polar Coordinates

    6.9837 21.92 17.5 41.92 10.27 3.26 Adding an INFO button to your directory An information button can be useful for your directory to help you remember the operation of the functions in the directory. In this directory, all we need to remember is to press @TRISO to get a triangle solution started.
  • Page 255 1.5, D = 2.3, DD = -6.5, and you are asked to find vr, v , ar, a , v, and a. Start the multiple equation solver by pressing J@SOLVE. The calculator produces a screen labeled , "vel. & acc. polar coord.", that looks as follows: To enter the values of the known variables, just type the value and press the button corresponding to the variable to be entered.
  • Page 256 5.77169819031; ar: -14.725; a : -13.95; and a: 20.2836911089.; or, b). Solve for all variables at once, by pressing „@ALL!. The calculator will flash the solutions as it finds them. When the calculator stops, you can press ‚@ALL! to list all results. For this case we have:...
  • Page 257 Page 7-20...
  • Page 258: Creating And Storing Lists

    Chapter 8 Operations with lists Lists are a type of calculator’s object that can be useful for data processing and in programming. This Chapter presents examples of operations with lists. Definitions A list, within the context of the calculator, is a series of objects enclosed between braces and separated by spaces (#), in the RPN mode, or commas (‚í), in both modes.
  • Page 259: Composing And Decomposing Lists

    The figure below shows the RPN stack before pressing the K key: Composing and decomposing lists Composing and decomposing lists makes sense in RPN mode only. Under such operating mode, decomposing a list is achieved by using function OBJ . With this function, a list in the RPN stack is decomposed into its elements, with stack level 1: showing the number of elements in the list.
  • Page 260: Changing Sign

    In RPN mode, the following screen shows the three lists and their names ready to be stored. To store the lists in this case you need to press K three times. Changing sign The sign-change key (\) , when applied to a list of numbers, will change the sign of all elements in the list.
  • Page 261: Real Number Functions From The Keyboard

    Subtraction, multiplication, and division of lists of numbers of the same length produce a list of the same length with term-by-term operations. Examples: The division L4/L3 will produce an infinity entry because one of the elements in L3 is zero: If the lists involved in the operation have different lengths, an error message is produced (Error: Invalid Dimension).
  • Page 262: Real Number Functions From The Mth Menu

    LOG and ANTILOG SIN, ASIN TAN, ATAN Real number functions from the MTH menu Functions of interest from the MTH menu include, from the HYPERBOLIC menu: SINH, ASINH, COSH, ACOSH, TANH, ATANH, and from the REAL menu: %, %CH, %T, MIN, MAX, MOD, SIGN, MANT, XPON, IP, FP, RND, TRNC, FLOOR, CEIL, D R, R D.
  • Page 263: Examples Of Functions That Use Two Arguments

    TANH, ATANH IP, FP D R, R D Examples of functions that use two arguments The screen shots below show applications of the function % to list arguments. Function % requires two arguments. The first two examples show cases in which only one of the two arguments is a list.
  • Page 264: Lists Of Complex Numbers

    %({10,20,30},{1,2,3}) = {%(10,1),%(20,2),%(30,3)} This description of function % for list arguments shows the general pattern of evaluation of any function with two arguments when one or both arguments are lists. Examples of applications of function RND are shown next: Lists of complex numbers The following exercise shows how to create a list of complex numbers given two lists of the same length, one representing the real parts and one the imaginary parts of the complex numbers.
  • Page 265: Lists Of Algebraic Objects

    The following example shows applications of the functions RE(Real part), IM(imaginary part), ABS(magnitude), and ARG(argument) of complex numbers. The results are lists of real numbers: Lists of algebraic objects The following are examples of lists of algebraic objects with the function SIN applied to them: The MTH/LIST menu The MTH menu provides a number of functions that exclusively to lists.
  • Page 266 This menu contains the following functions: LIST : Calculate increment among consecutive elements in list LIST : Calculate summation of elements in the list LIST : Calculate product of elements in the list SORT : Sorts elements in increasing order REVLIST : Reverses order of list : Operator for term-by-term addition of two lists of the same length...
  • Page 267: Manipulating Elements Of A List

    Manipulating elements of a list The PRG (programming) menu includes a LIST sub-menu with a number of functions to manipulate elements of a list. With system flag 117 set to CHOOSE boxes: Item 1. ELEMENTS.. contains the following functions that can be used for the manipulation of elements in lists: List size Function SIZE, from the PRG/LIST/ELEMENTS sub-menu, can be used to obtain...
  • Page 268: Element Position In The List

    Functions GETI and PUTI, also available in sub-menu PRG/ ELEMENTS/, can also be used to extract and place elements in a list. These two functions, however, are useful mainly in programming. Function GETI uses the same arguments as GET and returns the list, the element location plus one, and the element at the location requested.
  • Page 269: The Map Function

    SEQ is useful to produce a list of values given a particular expression and is described in more detail here. The SEQ function takes as arguments an expression in terms of an index, the name of the index, and starting, ending, and increment values for the index, and returns a list consisting of the evaluation of the expression for all possible values of the index.
  • Page 270: Defining Functions That Use Lists

    In both cases, you can either type out the MAP command (as in the examples above) or select the command from the CAT menu. The following call to function MAP uses a program instead of a function as second argument: Defining functions that use lists In Chapter 3 we introduced the use of the DEFINE function ( „à) to create functions of real numbers with one or more arguments.
  • Page 271 to replace the plus sign (+) with ADD: Next, we store the edited expression into variable @@@G@@@: Evaluating G(L1,L2) now produces the following result: As an alternative, you can define the function with ADD rather than the plus sign (+), from the start, i.e., use DEFINE('G(X,Y)=(X DD 3)*Y') : You can also define the function as G(X,Y) = (X--3)*Y.
  • Page 272: Applications Of Lists

    Applications of lists This section shows a couple of applications of lists to the calculation of statistics of a sample. By a sample we understand a list of values, say, {s Suppose that the sample of interest is the list {1, 5, 3, 1, 2, 1, 3, 4, 2, 1} and that we store it into a variable called S (The screen shot below shows this action in ALG mode, however, the procedure in RPN mode is very similar.
  • Page 273: Geometric Mean Of A List

    3. Divide the result above by n = 10: 4. Apply the INV() function to the latest result: Thus, the harmonic mean of list S is s Geometric mean of a list The geometric mean of a sample is defined as To find the geometric mean of the list stored in S, we can use the following procedure: 1.
  • Page 274: Weighted Average

    Thus, the geometric mean of list S is s Weighted average Suppose that the data in list S, defined above, namely: S = {1,5,3,1,2,1,3,4,2,1} is affected by the weights, W = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} If we define the weight list as W = {w element in list W, above, can be defined by w SEQ to generate this list, and then store it into variable @@@W@@@ as follows:...
  • Page 275: Statistics Of Grouped Data

    3. Use function LIST, once more, to calculate the denominator of s 4. Use the expression ANS(2)/ANS(1) to calculate the weighted average: Thus, the weighted average of list S with weights in list W is s Note: ANS(1) refers to the most recent result (55), while ANS(2) refers to the previous to last result (121).
  • Page 276 The class mark data can be stored in variable S, while the frequency count can be stored in variable W, as follows: Given the list of class marks S = {s W = {w , …, w represents the mean value of the grouped data, that we call s, in this context: ∑...
  • Page 277 To calculate this last result, we can use the following: The standard deviation of the grouped data is the square root of the variance: ∑ ∑ ∑ Page 8-20...
  • Page 278 >. A two dimensional version of this vector will be written as A i + A j, A = [A calculator vectors are written between brackets [ ], we will choose the notation A = [A ] or A = [A vectors from now on.
  • Page 279: Entering Vectors

    ['t','t^2','SIN(t)'] Typing vectors in the stack With the calculator in ALG mode, a vector is typed into the stack by opening a set of brackets („Ô) and typing the components or elements of the vector separated by commas (‚í). The screen shots below show the entering of a numerical vector followed by an algebraic vector.
  • Page 280: Storing Vectors Into Variables

    Storing vectors into variables Vectors can be stored into variables. The screen shots below show the vectors = [1, 2], u = [-3, 2, -2], v stored into variables @@@u2@@, @@@u3@@, @@@v2@@, and @@@v3@@, respectively. First, in ALG mode: Then, in RPN mode (before pressing K, repeatedly): Using the Matrix Writer (MTRW) to enter vectors Vectors can also be entered by using the Matrix Writer „²(third key in the fourth row of keys from the top of the keyboard).
  • Page 281 Although these two results differ only in the number of brackets used, for the calculator they represent different mathematical objects. The first one is a vector with three elements, and the second one a matrix with one row and three columns.
  • Page 282 The @+ROW@ key will add a row full of zeros at the location of the selected cell of the spreadsheet. The @-ROW key will delete the row corresponding to the selected cell of the spreadsheet. The @+COL@ key will add a column full of zeros at the location of the selected cell of the spreadsheet.
  • Page 283 Summary of Matrix Writer use for entering vectors In summary, to enter a vector using the Matrix Writer, simply activate the writer („²), and place the elements of the vector, pressing ` after each of them. Then, press ``. Make sure that the @VEC and @GO selected.
  • Page 284: Identifying, Extracting, And Inserting Vector Elements

    To recall the third element of A, for example, you could type in A(3) into the calculator. In ALG mode, simply type A(3). In RPN mode, type ‘A(3)’ `μ. You can operate with elements of the array by writing and evaluating algebraic expressions such as: More complicated expressions involving elements of A can also be written.
  • Page 285 Highlighting the entire expression and using the @EVAL@ soft menu key, we get the result: -15. Note: The vector A can also be referred to as an indexed variable because the name A represents not one, but many values identified by a sub-index. To replace an element in an array use function PUT (you can find it in the function catalog ‚N, or in the PRG/LIST/ELEMENTS sub-menu –...
  • Page 286: Simple Operations With Vectors

    Simple operations with vectors To illustrate operations with vectors we will use the vectors A, u2, u3, v2, and v3, stored in an earlier exercise. Changing sign To change the sign of a vector use the key \, e.g., Addition, subtraction Addition and subtraction of vectors require that the two vector operands have the same length: Attempting to add or subtract vectors of different length produces an error...
  • Page 287: The Mth/Vector Menu

    Absolute value function The absolute value function (ABS), when applied to a vector, produces the magnitude of the vector. For a vector A = [A ,…,A ], the magnitude is defined as . In the ALG mode, enter the function BS([1,-2,6]), name followed by the vector argument.
  • Page 288: Dot Product

    Dot product Function DOT is used to calculate the dot product of two vectors of the same length. Some examples of application of function DOT, using the vectors A, u2, u3, v2, and v3, stored earlier, are shown next in ALG mode. Attempts to calculate the dot product of two vectors of different length produce an error message: Cross product...
  • Page 289: Changing Coordinate System

    In the RPN mode, application of function V vector in the stack, e.g., V (A) will produce the following output in the RPN stack (vector A is listed in stack level 6:). Building a two-dimensional vector Function V2 is used in the RPN mode to build a vector with the values in stack levels 1: and 2:.
  • Page 290 XYZ field, and any 2-D or 3-D vector entered in the calculator is reproduced as the (x,y,z) components of the vector. Thus, to enter the vector A = 3i+2j-5k, we use [3,2,-5], and the vector is shown as:...
  • Page 291 The figure below shows the transformation of the vector from spherical to Cartesian coordinates, with x = sin( ) cos( ), y = sin ( ) cos ( ), z = cos( ). For this case, x = 3.204, y = 1.494, and z = 3.536. If the CYLINdrical system is selected, the top line of the display will show an R Z field, and a vector entered in cylindrical coordinates will be shown in its cylindrical (or polar) coordinate form (r, ,z).
  • Page 292: Application Of Vector Operations

    equivalent (r, ,z) with r = figure shows the vector entered in spherical coordinates, and transformed to polar coordinates. For this case, transformation shows that r = 3.563, and z = 3.536. (Change to DEG): Next, let’s change the coordinate system to spherical coordinates by using function SPHERE from the VECTOR sub-menu in the MTH menu.
  • Page 293: Moment Of A Force

    Suppose that you want to find the angle between vectors A = 3i-5j+6k, B = 2i+j-3k, you could try the following operation (angular measure set to degrees) in ALG mode: 1 - Enter vectors [3,-5,6], press `, [2,1,-3], press `. 2 - DOT(ANS(1),ANS(2)) calculates the dot product 3 - ABS(ANS(3))*ABS((ANS(2)) calculates product of magnitudes 4 - ANS(2)/ANS(1) calculates cos( )
  • Page 294 Thus, M = (10i+26j+25k) m N. We know that the magnitude of M is such that |M| = |r||F|sin( ), where is the angle between r and F. We can find this angle as, = sin (|M| /|r||F|) by the following operations: 1 –...
  • Page 295: Row Vectors, Column Vectors, And Lists

    The vectors presented in this chapter are all row vectors. In some instances, it is necessary to create a column vector (e.g., to use the pre-defined statistical functions in the calculator). The simplest way to enter a column vector is by enclosing each vector element within brackets, all contained within an external set of brackets.
  • Page 296: Function Obj

    In this section we will showing you ways to transform: a column vector into a row vector, a row vector into a column vector, a list into a vector, and a vector (or matrix) into a list. We first demonstrate these transformations using the RPN mode. In this mode, we will use functions OBJ , LIST, ARRY and DROP to perform the...
  • Page 297: Function Drop

    If we now apply function OBJ once more, the list in stack level 1:, {3.}, will be decomposed as follows: Function LIST This function is used to create a list given the elements of the list and the list length or size. In RPN mode, the list size, say, n, should be placed in stack level 1:.
  • Page 298: Transforming A Column Vector Into A Row Vector

    After having defined this variable , we can use it in ALG mode to transform a row vector into a column vector. Thus, change your calculator’s mode to ALG and try the following procedure: [1,2,3] ` J @@RXC@@ „ Ü „...
  • Page 299 2 - Use function OBJ 3 - Press the delete key ƒ (also known as function DROP) to eliminate the number in stack level 1: 4 - Use function LIST to create a list 5 - Use function ARRY to create the row vector These five steps can be put together into a UserRPL program, entered as follows (in RPN mode, still): ‚å„°@) T YPE! @OBJ @ @OBJ @...
  • Page 300: Transforming A List Into A Vector

    After having defined variable @@CXR@@, we can use it in ALG mode to transform a row vector into a column vector. Thus, change your calculator’s mode to ALG and try the following procedure: [[1],[2],[3]] ` J @@CXR@@ „Ü „î...
  • Page 301: Transforming A Vector (Or Matrix) Into A List

    ` @@LXV@@. After having defined variable @@LXV@@, we can use it in ALG mode to transform a list into a vector. Thus, change your calculator’s mode to ALG and try the following procedure: {1,2,3} ` J @@LXV@@ „Ü „î, resulting Transforming a vector (or matrix) into a list To transform a vector into a list, the calculator provides function AXL.
  • Page 302 Chapter 10! Creating and manipulating matrices This chapter shows a number of examples aimed at creating matrices in the calculator and demonstrating manipulation of matrix elements. Definitions A matrix is simply a rectangular array of objects (e.g., numbers, algebraics) having a number of rows and columns. A matrix A having n rows and m columns will have, therefore, n m elements.
  • Page 303: Entering Matrices In The Stack

    Entering matrices in the stack In this section we present two different methods to enter matrices in the calculator stack: (1) using the Matrix Writer, and (2) typing the matrix directly into the stack. Using the Matrix Writer As with the case of vectors, discussed in Chapter 9, matrices can be entered into the stack by using the Matrix Writer.
  • Page 304: Creating Matrices With Calculator Functions

    For future exercises, let’s save this matrix under the name A. In ALG mode use K~a. In RPN mode, use ³~a K. Creating matrices with calculator functions Some matrices can be created by using the calculator functions available in either the MTH/MATRIX/MAKE sub-menu within the MTH menu („´), Page 10-3...
  • Page 305 or in the MATRICES/CREATE menu available through „Ø: The MTH/MATRIX/MAKE sub menu (let’s call it the MAKE menu) contains the following functions: while the MATRICES/CREATE sub-menu (let’s call it the CREATE menu) has the following functions: Page 10-4...
  • Page 306 As you can see from exploring these menus (MAKE and CREATE), they both have the same functions GET, GETI, PUT, PUTI, SUB, REPL, RDM, RANM, HILBERT, VANDERMONDE, IDN, CON, DIAG, and DIAG . The CREATE menu includes the COLUMN and ROW sub-menus, that are also available under the MTH/MATRIX menu.
  • Page 307: Functions Get And Put

    Functions GET and PUT Functions GET, GETI, PUT, and PUTI, operate with matrices in a similar manner as with lists or vectors, i.e., you need to provide the location of the element that you want to GET or PUT. However, while in lists and vectors only one index is required to identify an element, in matrices we need a list of two indices {row, column} to identify matrix elements.
  • Page 308: Function Size

    Notice that the screen is prepared for a subsequent application of GETI or GET, by increasing the column index of the original reference by 1, (i.e., from {2,2} to {2,3}), while showing the extracted value, namely A(2,2) = 1.9, in stack level Now, suppose that you want to insert the value 2 in element {3 1} using PUTI.
  • Page 309: Function Con

    Try, for example, TRN(A), and compare it with TRAN(A). In RPN mode, the transconjugate of matrix A is calculated by using @@@A@@@ TRN. Note: The calculator also includes Function TRAN in the MATRICES/ OPERATIONS sub-menu: For example, in ALG mode:...
  • Page 310: Function Idn

    In RPN mode this is accomplished by using {4,3} ` 1.5 \ ` CON. Function IDN Function IDN (IDeNtity matrix) creates an identity matrix given its size. Recall that an identity matrix has to be a square matrix, therefore, only one value is required to describe it completely.
  • Page 311 vector’s dimension, in the latter the number of rows and columns of the matrix. The following examples illustrate the use of function RDM: Re-dimensioning a vector into a matrix The following example shows how to re-dimension a vector of 6 elements into a matrix of 2 rows and 3 columns in ALG mode: In RPN mode, we can use [1,2,3,4,5,6] ` {2,3} ` RDM to produce the matrix shown above.
  • Page 312: Function Ranm

    R NM({2,3}) : In RPN mode, use {2,3} ` R NM. Obviously, the results you will get in your calculator will most certainly be different than those shown above. The random numbers generated are integer numbers uniformly distributed in the range [-10,10], i.e., each one of those 21 numbers has the same probability of being selected.
  • Page 313 In RPN mode, assuming that the original 2 3 matrix is already in the stack, use {1,2} ` {2,3} ` SUB. Function REPL Function REPL replaces or inserts a sub-matrix into a larger one. The input for this function is the matrix where the replacement will take place, the location where the replacement begins, and the matrix to be inserted.
  • Page 314: Function Vandermonde

    The dimension n is, of course, the length of the list. If the input list consists of objects {x ,… x }, then, a Vandermonde matrix in the calculator is a matrix made of the following elements: Page 10-13...
  • Page 315: A Program To Build A Matrix Out Of A Number Of Lists

    The lists may represent columns of the matrix (program @CRMC) or rows of the matrix (program @CRMR). The programs are entered with the calculator set to RPN mode, and the instructions for the keystrokes are given for system flag 117 set to SOFT menus. This section is intended for you to practice accessing programming functions in the calculator.
  • Page 316: Lists Represent Columns Of The Matrix

    entered in the display as you perform those keystrokes. First, we present the steps necessary to produce program CRMC. Lists represent columns of the matrix The program @CRMC allows you to put together a p n matrix (i.e., p rows, n columns) out of n lists of p elements each.
  • Page 317 ~„n # „´ @) M ATRX! @) C OL! @COL! To save the program: Note: if you save this program in your HOME directory it will be available from any other sub-directory you use. To see the contents of the program use J ‚@CRMC. The program listing is the following: «...
  • Page 318: Manipulating Matrices By Columns

    Manipulating matrices by columns The calculator provides a menu with functions for manipulating matrices by operating in their columns. This menu is available through the MTH/MATRIX/ COL.. sequence: („´) shown in the figure below with system flag 117 set...
  • Page 319: Function Col

    Both approaches will show the same functions: When system flag 117 is set to SOFT menus, the COL menu is accessible through „´!) M ATRX ) !) @ @COL@ , or through „Ø!) @ CREAT@ !) @ @COL@ . Both approaches will show the same set of functions: The operation of these functions is presented below.
  • Page 320 In this result, the first column occupies the highest stack level after decomposition, and stack level 1 is occupied by the number of columns of the original matrix. The matrix does not survive decomposition, i.e., it is no longer available in the stack. Function COL Function COL has the opposite effect of Function...
  • Page 321: Function Cswp

    In RPN mode, enter the matrix first, then the vector, and the column number, before applying function COL+. The figure below shows the RPN stack before and after applying function COL+. Function COL- Function COL- takes as argument a matrix and an integer number representing the position of a column in the matrix.
  • Page 322: Manipulating Matrices By Rows

    Chapter. Manipulating matrices by rows The calculator provides a menu with functions for manipulating matrices by operating in their rows. This menu is available through the MTH/MATRIX/ ROW.. sequence: („´) shown in the figure below with system flag 117 set...
  • Page 323: Function Row

    When system flag 117 is set to SOFT menus, the ROW menu is accessible through „´!) M ATRX !) @ @ROW@ , or through „Ø!) @ CREAT@ !) @ @ROW@ . Both approaches will show the same set of functions: The operation of these functions is presented below.
  • Page 324 matrix does not survive decomposition, i.e., it is no longer available in the stack. Function ROW Function ROW has the opposite effect of the function ROW, i.e., given n vectors of the same length, and the number n, function ROW builds a matrix by placing the input vectors as rows of the resulting matrix.
  • Page 325: Function Rswp

    Function ROW- Function ROW- takes as argument a matrix and an integer number representing the position of a row in the matrix. The function returns the original matrix, minus a row, as well as the extracted row shown as a vector. Here is an example in the ALG mode using the matrix stored in A: In RPN mode, place the matrix in the stack first, then enter the number representing a row location before applying function ROW-.
  • Page 326: Function Rci

    As you can see, the rows that originally occupied positions 2 and 3 have been swapped. Function RCI Function RCI stands for multiplying Row I by a Constant value and replace the resulting row at the same location. The following example, written in ALG mode, takes the matrix stored in A, and multiplies the constant value 5 into row number 3, replacing the row with this product.
  • Page 327 In RPN mode, enter the matrix first, followed by the constant value, then by the row to be multiplied by the constant value, and finally enter the row that will be replaced. The following figure shows the RPN stack before and after applying function RCIJ under the same conditions as in the ALG example shown above: Page 10-26...
  • Page 328: Operations With Matrices

    RANM (random matrices). If you try this exercise in your calculator you will get different matrices than the ones listed herein, unless you store them into your calculator exactly as shown below.
  • Page 329: Addition And Subtraction

    Addition and subtraction Consider a pair of matrices A = [a subtraction of these two matrices is only possible if they have the same number of rows and columns. The resulting matrix, C = A . Some examples in ALG mode are shown below using the matrices stored above (e.g., @A22@ + @B22@) In RPN mode, the steps to follow are: 22 ` B22`+...
  • Page 330 By combining addition and subtraction with multiplication by a scalar we can form linear combinations of matrices of the same dimensions, e.g., In a linear combination of matrices, we can multiply a matrix by an imaginary number to obtain a matrix of complex numbers, e.g., Matrix-vector multiplication Matrix-vector multiplication is possible only if the number of columns of the matrix is equal to the length of the vector.
  • Page 331 Matrix multiplication Matrix multiplication is defined by C , where A = [a , B = , and C = [c . Notice that matrix multiplication is only possible if the number of columns in the first operand is equal to the number of rows of the second operand.
  • Page 332 (another row vector). For the calculator to identify a row vector, you must use double brackets to enter it: Term-by-term multiplication Term-by-term multiplication of two matrices of the same dimensions is possible through the use of function HADAMARD. The result is, of course, another matrix of the same dimensions.
  • Page 333 I is the identity matrix of the same dimensions as A. The inverse of a matrix is obtained in the calculator by using the inverse function, INV (i.e., the Y key). An example of the inverse of one of the matrices stored earlier is...
  • Page 334: Characterizing A Matrix (The Matrix Norm Menu)

    To verify the properties of the inverse matrix, consider the following multiplications: Characterizing a matrix (The matrix NORM menu) The matrix NORM (NORMALIZE) menu is accessed through the keystroke sequence „´ (system flag 117 set to CHOOSE boxes): This menu contains the following functions: These functions are described next.
  • Page 335: Function Snrm

    Function ABS Function ABS calculates what is known as the Frobenius norm of a matrix. For a matrix A = [a , the Frobenius norm of the matrix is defined as ∑∑ If the matrix under consideration in a row vector or a column vector, then the Frobenius norm , ||A|| , is simply the vector’s magnitude.
  • Page 336: Functions Rnrm And Cnrm

    Singular value decomposition To understand the operation of Function SNRM, we need to introduce the concept of matrix decomposition. Basically, matrix decomposition involves the determination of two or more matrices that, when multiplied in a certain order (and, perhaps, with some matrix inversion or transposition thrown in), produce the original matrix.
  • Page 337: Function Srad

    Function SRAD Function SRAD determines the Spectral RADius of a matrix, defined as the largest of the absolute values of its eigenvalues. For example, Definition of eigenvalues and eigenvectors of a matrix The eigenvalues of a square matrix result from the matrix equation A x = The values of that satisfy the equation are known as the eigenvalues of the matrix A.
  • Page 338: Function Rank

    Try the following exercise for matrix condition number on matrix A33. The condition number is COND(A33) , row norm, and column norm for A33 are shown to the left. The corresponding numbers for the inverse matrix, INV(A33), are shown to the right: Since RNRM(A33) >...
  • Page 339: Function Det

    where the values d are constant, we say that c columns included in the summation. (Notice that the values of j include any value in the set {1, 2, …, n}, in any combination, as long as j k.) If the expression shown above cannot be written for any of the column vectors then we say that all the columns are linearly independent.
  • Page 340 The determinant of a matrix The determinant of a 2x2 and or a 3x3 matrix are represented by the same arrangement of elements of the matrices, but enclosed between vertical lines, i.e., A 2 2 determinant is calculated by multiplying the elements in its diagonal and adding those products accompanied by the positive or negative sign as indicated in the diagram shown below.
  • Page 341: Function Trace

    For square matrices of higher order determinants can be calculated by using smaller order determinant called cofactors. The general idea is to "expand" a determinant of a n n matrix (also referred to as a n n determinant) into a sum of the cofactors, which are (n-1) (n-1) determinants, multiplied by the elements of a single row or column, with alternating positive and negative signs.
  • Page 342: Function Tran

    Function TRAN Function TRAN returns the transpose of a real or the conjugate transpose of a complex matrix. TRAN is equivalent to TRN. The operation of function TRN was presented in Chapter 10. Additional matrix operations (The matrix OPER menu) The matrix OPER (OPERATIONS) is available through the keystroke sequence „Ø...
  • Page 343: Function Axl

    MAD and RSD are related to the solution of systems of linear equations and will be presented in a subsequent section in this Chapter. In this section we’ll discuss only functions AXL and AXM. Function AXL Function AXL converts an array (matrix) into a list, and vice versa: Note: the latter operation is similar to that of the program CRMR presented in Chapter 10.
  • Page 344: Solution Of Linear Systems

    The implementation of function LCXM for this case requires you to enter: 2`3`‚@@P1@@ LCXM ` The following figure shows the RPN stack before and after applying function LCXM: In ALG mode, this example can be obtained by using: The program P1 must still have been created and stored in RPN mode. Solution of linear systems A system of n linear equations in m variables can be written as n-1,1...
  • Page 345: Using The Numerical Solver For Linear Systems

    ⎣ Using the numerical solver for linear systems There are many ways to solve a system of linear equations with the calculator. One possibility is through the numerical solver ‚Ï. From the numerical solver screen, shown below (left), select the option 4. Solve lin sys.., and press @@@OK@@@.
  • Page 346 This system has the same number of equations as of unknowns, and will be referred to as a square system. In general, there should be a unique solution to the system. The solution will be the point of intersection of the three planes in the coordinate system (x ) represented by the three equations.
  • Page 347 To check that the solution is correct, enter the matrix A and multiply times this solution vector (example in algebraic mode): Under-determined system The system of linear equations can be written as the matrix equation A x = b, if ⎡...
  • Page 348 To see the details of the solution vector, if needed, press the @EDIT! button. This will activate the Matrix Writer. Within this environment, use the right- and left- arrow keys to move about the vector: Thus, the solution is x = [15.373, 2.4626, 9.6268]. To return to the numerical solver environment, press `.
  • Page 349 (under-determined). How does the calculator came up with the solution x = [15.37… 2.46… 9.62…] shown earlier? Actually, the calculator minimizes the distance from a point, which will constitute the solution, to each of the planes represented by the equations in the linear system.
  • Page 350 Such is the approach followed by the calculator numerical solver. Let’s use the numerical solver to attempt a solution to this system of equations: ‚Ï...
  • Page 351: Least-Square Solution (Function Lsq)

    Press ` to return to the numerical solver environment. To check that the solution is correct, try the following: Press ——, to highlight the A: field. Press L @CALC@ `, to copy matrix A onto the stack. Press @@@OK@@@ to return to the numerical solver environment. Press ˜...
  • Page 352 If A is a square matrix and A is non-singular (i.e., it’s inverse matrix exist, or its determinant is non-zero), LSQ returns the exact solution to the linear system. If A has less than full row rank (underdetermined system of equations), LSQ returns the solution with the minimum Euclidean length out of an infinity number of solutions.
  • Page 353 Under-determined system Consider the system with ⎡ ⎢ ⎣ The solution using LSQ is shown next: Over-determined system Consider the system with ⎡ ⎢ ⎢ ⎢ ⎣ The solution using LSQ is shown next: + 3x –5x – 3x + 8x ⎡...
  • Page 354: Solution With The Inverse Matrix

    While the operation of division is not defined for matrices, we can use the calculator’s / key to “divide” vector b by matrix A to solve for x in the matrix equation A x = b. This is an arbitrary extension of the algebraic division operation to matrices, i.e., from A x = b, we dare to write x = b/A...
  • Page 355: Solving Multiple Set Of Equations With The Same Coefficient Matrix

    The procedure for the case of “dividing” b by A is illustrated below for the case The procedure is shown in the following screen shots: The same solution as found above with the inverse matrix. Solving multiple set of equations with the same coefficient matrix Suppose that you want to solve the following three sets of equations: X +2Y+3Z = 14, 2X +4Y+6Z = 9, 3X -2Y+ Z = 2, 3X -2Y+ Z = -5,...
  • Page 356: Gaussian And Gauss-Jordan Elimination

    To illustrate the Gaussian elimination procedure we will use the following system of 3 equations in 3 unknowns: We can store these equations in the calculator in variables E1, E2, and E3, respectively, as shown below. For backup purposes, a list containing the three equations was also created and stored into variable EQS.
  • Page 357 Next, replace the third equation, E3, with (equation 3 + 6 equation 2, i.e., E2+6 E3), to get: Notice that when we perform a linear combination of equations the calculator modifies the result to an expression on the left-hand side of the equal sign, i.e.,...
  • Page 358 an expression = 0. Thus, the last set of equations is interpreted to be the following equivalent set of equations: X +2Y+3Z = 7, Y+ Z = 3, -7Z = -14. The process of backward substitution in Gaussian elimination consists in finding the values of the unknowns, starting from the last equation and working upwards.
  • Page 359 For this exercise, we will use the RPN mode (H\@@OK@@), with system flag 117 set to SOFT menu. In your calculator, use the following keystrokes. First, enter the augmented matrix, and make an extra copy of the same in the...
  • Page 360 Multiply row 2 by –1/8: 8\Y2 @RCI! Multiply row 2 by 6 add it to row 3, replacing it: 6#2#3 @RCIJ! If you were performing these operations by hand, you would write the following: ⎛ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜...
  • Page 361 Multiply row 3 by –1/7: 7\Y 3 @RCI! Multiply row 3 by –1, add it to row 2, replacing it: #2 @RCIJ! Multiply row 3 by –3, add it to row 1, replacing it: 3\#3#1@RCIJ! Multiply row 2 by –2, add it to row 1, replacing it: 2\#2#1 @RCIJ! Writing this process by hand will result in the following steps: Pivoting...
  • Page 362 While performing pivoting in a matrix elimination procedure, you can improve the numerical solution even more by selecting as the pivot the element with the largest absolute value in the column and row of interest. This operation may require exchanging not only rows, but also columns, in some pivoting operations.
  • Page 363 Now we are ready to start the Gauss-Jordan elimination with full pivoting. We will need to keep track of the permutation matrix by hand, so take your notebook and write the P matrix shown above. First, we check the pivot a absolute value in the first row and first column is the value of a want this number to be the pivot, then we exchange rows 1 and 3, by using: 1#3L @RSWP.
  • Page 364 Having filled up with zeros the elements of column 1 below the pivot, now we proceed to check the pivot at position (2,2). We find that the number 3 in position (2,3) will be a better pivot, thus, we exchange columns 2 and 3 by using: 2#3 ‚N@@@OK@@ -1/16 25/8...
  • Page 365: Step-By-Step Calculator Procedure For Solving Linear Systems

    Gauss-Jordan elimination solution of linear equation systems. You can see the step-by-step procedure used by the calculator to solve a system of equations, without user intervention, by setting the step-by-step option in the calculator’s CAS, as follows:...
  • Page 366 L3=L3-8 L1, L1 = 2 L1--1 L2, L1=25 L1--3 L3, L2 = 25 L2-3 L3, and finally a message indicating “Reduction result” showing: When you press @@@OK@@@ , the calculator returns the final result [1 2 –1]. Calculating the inverse matrix step-by-step The calculation of an inverse matrix can be considered as calculating the solution to the augmented system [A | I ].
  • Page 367 Gauss-Jordan elimination, without pivoting. This procedure for calculating the inverse is based on the augmented matrix (A The calculator showed you the steps up to the point in which the left-hand half of the augmented matrix has been converted to a diagonal matrix. From there, the final step is to divide each row by the corresponding main diagonal pivot.
  • Page 368 The simplest way to solve a system of linear equations, A x = b, in the calculator is to enter b, enter A, and then use the division function /. If the system of linear equations is over-determined or under-determined, a “solution”...
  • Page 369 LINSOLVE([X-2*Y+Z=-8,2*X+Y-2*Z=6,5*X-2*Y+Z=-12], to produce the solution: [X=-1,Y=2,Z = -3]. Function LINSOLVE works with symbolic expressions. Functions REF, rref, and RREF, work with the augmented matrix in a Gaussian elimination approach. Functions REF, rref, RREF The upper triangular form to which the augmented matrix is reduced during the forward elimination part of a Gaussian elimination procedure is known as an "echelon"...
  • Page 370 The result shows pivots of 3, 1, 4, 1, 5, and 2, and a reduced diagonal matrix. Function SYST2MAT This function converts a system of linear equations into its augmented matrix equivalent. The following example is available in the help facility of the calculator: Page 11-43...
  • Page 371: Residual Errors In Linear System Solutions (Function Rsd)

    The result is the augmented matrix corresponding to the system of equations: Residual errors in linear system solutions (Function RSD) Function RSD calculates the ReSiDuals or errors in the solution of the matrix equation A x=b, representing a system of n linear equations in n unknowns. We can think of solving this system as solving the matrix equation: f(x) = b -A x = 0.
  • Page 372: Eigenvalues And Eigenvectors

    A. Solving the characteristic polynomial produces the eigenvalues of the matrix. The calculator provides a number of functions that provide information regarding the eigenvalues and eigenvectors of a square matrix. Some of these functions are located under the menu MATRICES/EIGEN activated through „Ø.
  • Page 373: Function Egvl

    Using the variable to represent eigenvalues, this characteristic polynomial is to be interpreted as Function EGVL Function EGVL (EiGenVaLues) produces the eigenvalues of a square matrix. For example, the eigenvalues of the matrix shown below are calculated in ALG mode using function EGVL: The eigenvalues = [ - 10, 10 ].
  • Page 374: Function Jordan

    of a matrix, while the corresponding eigenvalues are the components of a vector. For example, in ALG mode, the eigenvectors and eigenvalues of the matrix listed below are found by applying function EGV: The result shows the eigenvalues as the columns of the matrix in the result list. To see the eigenvalues we can use: GET(ANS(1),2), i.e., get the second element in the list in the previous result.
  • Page 375: Function Mad

    A list with the eigenvectors corresponding to each eigenvalue of matrix A (stack level 2) A vector with the eigenvectors of matrix A (stack level 4) For example, try this exercise in RPN mode: [[4,1,-2],[1,2,-1],[-2,-1,0]] The output is the following: 4: ‘X^3+-6*x^2+2*X+8’...
  • Page 376: Matrix Factorization

    Notice that the equation (x I-A) p(x)=m(x) I is similar, in form, to the eigenvalue equation A x = As an example, in RPN mode, try: [[4,1,-2] [1,2,-1][-2,-1,0]] M D The result is: 4: -8. 3: [[ 0.13 –0.25 –0.38][-0.25 0.50 –0.25][-0.38 –0.25 –0.88]] 2: {[[1 0 0][0 1 0][0 0 1]] [[ -2 1 –2][1 –4 –1][-2 –1 –6] [[-1 2 3][2 –4 2][3 2 7]]} 1: ‘X^3+-6*x^2+2*X+8’...
  • Page 377: Function Lu

    3, 2, and 1, respectively. The results L, U, and P, satisfy the equation P A = L U. When you call the LU function, the calculator performs a Crout LU decomposition of A using partial pivoting. For example, in RPN mode: [[-1,2,5][3,1,-2][7,6,5]] LU produces: 3:[[7 0 0][-1 2.86 0][3 –1.57 –1]...
  • Page 378: Function Schur

    decomposition, while the vector s represents the main diagonal of the matrix S used earlier. For example, in RPN mode: [[5,4,-1],[2,-3,5],[7,2,8]] SVD 3: [[-0.27 0.81 –0.53][-0.37 –0.59 –0.72][-0.89 3.09E-3 0.46]] 2: [[ -0.68 –0.14 –0.72][ 0.42 0.73 –0.54][-0.60 0.67 0.44]] 1: [ 12.15 6.88 1.42] Function SVL Function SVL (Singular VaLues) returns the singular values of a matrix A...
  • Page 379: Matrix Quadratic Forms

    1: [[1 0 0][0 0 1][0 1 0]] Note: Examples and definitions for all functions in this menu are available through the help facility in the calculator. Try these exercises in ALG mode to see the results in that mode.
  • Page 380: Function Axq

    This menu includes functions AXQ, CHOLESKY, GAUSS, QXA, and SYLVESTER. Function AXQ In RPN mode, function AXQ produces the quadratic form corresponding to a matrix A in stack level 2 using the n variables in a vector placed in stack level 1.
  • Page 381: Function Gauss

    such that x = P y, by using Q = x A x y D y Function SYLVESTER Function SYLVESTER takes as argument a symmetric square matrix A and returns a vector containing the diagonal terms of a diagonal matrix D, and a matrix P, so that P A P = D.
  • Page 382: Function Image

    Information on the functions listed in this menu is presented below by using the calculator’s own help facility. The figures show the help facility entry and the attached examples. Function IMAGE Function ISOM Page 11-55...
  • Page 383: Function Mkisom

    Function KER Function MKISOM Page 11-56...
  • Page 384: Graphs Options In The Calculator

    Right in front of the TYPE field you will, most likely, see the option Function highlighted. This is the default type of graph for the calculator. To see the list of available graph types, press the soft menu key labeled @CHOOS. This will...
  • Page 385: Plotting An Expression Of The Form Y = F(X)

    In order to proceed with the plot, first, purge the variable x, if it is defined in the current directory (x will be the independent variable in the calculator's PLOT feature, therefore, you don't want to have it pre-defined). Create a sub- directory called 'TPLOT' (for test plot), or other meaningful name, to perform the following exercise.
  • Page 386 Note: Two new variables show up in your soft menu key labels, namely EQ and Y1. To see the contents of EQ, use ‚@@@EQ@@. The content of EQ is simply the function name ‘Y1(X)’. The variable EQ is used by the calculator to store the equation, or equations, to plot.
  • Page 387 VIEW, then press @AUTO to generate the V-VIEW automatically. PLOT WINDOW screen looks as follows: Plot the graph: @ERASE @DRAW (wait till the calculator finishes the graphs) To see labels:@EDIT L @LABEL @MENU To recover the first graphics menu: LL@) P ICT To trace the curve: @TRACE @@X,Y@@ .
  • Page 388: Some Useful Plot Operations For Function Plots

    (™), and press @ROOT, the result now is Launches the line editor Moves cursor to the end of the line Modifies the expression Returns to calculator display exp( Keep the range of –4 to 4 for H-VIEW, press Here is the result of...
  • Page 389 ROOT: 1.6635... The calculator indicated, before showing the root, that it was found through SIGN REVERSAL. Press L to recover the menu. Pressing @ISECT will give you the intersection of the curve with the x-axis, which is essentially the root. Place the cursor exactly at the root and press @ISECT.
  • Page 390: Saving A Graph For Future Use

    The list has as elements an expression for the derivative of Y1(X) and Y1(X) itself. EQ contained only Y1(x). After we pressed environment, the calculator automatically added the derivative of Y1(x) to the list of equations in EQ. Saving a graph for future use If you want to save your graph to a variable, get into the PICTURE environment by pressing š.
  • Page 391: Graphics Of Transcendental Functions

    Graphics of transcendental functions In this section we use some of the graphics features of the calculator to show the typical behavior of the natural log, exponential, trigonometric and hyperbolic functions. You will not see more graphs in this chapter, instead the user should see them in the calculator.
  • Page 392 @ROOT. The calculator returns the value LL@) P ICT @CANCL to return to the PLOT WINDOW – FUNCTION. Press ` to return to normal calculator display. You will notice that the root found in the graphics environment was copied to the calculator stack.
  • Page 393: Graph Of The Exponential Function

    This value is determined by our selection for the horizontal display range. We selected a range between -1 and 10 for X. To produce the graph, the calculator generates values between the range limits using a constant increment, and storing the values generated, one at a time, in the variable @@@X@@@ as the graph is drawn.
  • Page 394: The Ppar Variable

    The PPAR variable Press J to recover your variables menu, if needed. In your variables menu you should have a variable labeled PPAR . Press ‚@PPAR to get the contents of this variable in the stack. Press the down-arrow key, , to launch the stack editor, and use the up- and down-arrow keys to view the full contents of PPAR.
  • Page 395 As indicated earlier, the ln(x) and exp(x) functions are inverse of each other, i.e., ln(exp(x)) = x, and exp(ln(x)) = x. This can be verified in the calculator by typing and evaluating the following expressions in the Equation Writer: LN(EXP(X)) and EXP(LN(X)). They should both evaluate to X.
  • Page 396: Summary Of Function Plot Operation

    Summary of FUNCTION plot operation In this section we present information regarding the PLOT SETUP, PLOT- FUNCTION, and PLOT WINDOW screens accessible through the left-shift key combined with the soft-menu keys A through D. Based on the graphing examples presented above, the procedure to follow to produce a FUNCTION plot (i.e., one that plots one or more functions of the form Y = F(X)), is the following: „ô, simultaneously if in RPN mode: Access to the PLOT SETUP window.
  • Page 397 Use @CLEAR if you want to clear all the equations currently active in the PLOT – FUNCTION window. The calculator will verify whether or not you want to clear all the functions before erasing all of them. Select YES, and press @@@OK@@@ to proceed with clearing all functions.
  • Page 398 Use @CALC to access calculator stack to perform calculations that may be necessary to obtain a value for one of the options in this window. When the calculator stack is made available to you, you will also have the soft menu key options @CANCL and @@@OK@@@ .
  • Page 399: Plots Of Trigonometric And Hyperbolic Functions

    „ó, simultaneously if in RPN mode: Plots the graph based on the settings stored in variable PPAR and the current functions defined in the PLOT – FUNCTION screen. If a graph, different from the one you are plotting, already exists in the graphic display screen, the new plot will be superimposed on the existing plot.
  • Page 400: The Tpar Variable

    The TPAR variable After finishing the table set up, your calculator will create a variable called TPAR (Table PARameters) that store information relevant to the table that is to be generated. To see the contents of this variable, press ‚@TPAR.
  • Page 401: Plots In Polar Coordinates

    With the option In highlighted, press @@@OK@@@. The table is expanded so that the x-increment is now 0.25 rather than 0.5. Simply, what the calculator does is to multiply the original increment, 0.5, by the zoom factor, 0.5, to produce the new increment of 0.25. Thus, the zoom in option is useful when you want more resolution for the values of x in your table.
  • Page 402 We will try to plot the function f( ) = 2(1-sin( )), as follows: First, make sure that your calculator’s angle measure is set to radians. Press „ô, simultaneously if in RPN mode, to access to the PLOT SETUP window.
  • Page 403: Plotting Conic Curves

    Press L@CANCL to return to the PLOT WINDOW screen. Press L@@@OK@@@ to return to normal calculator display. In this exercise we entered the equation to be plotted directly in the PLOT SETUP window. We can also enter equations for plotting using the PLOT window, i.e., simultaneously if in RPN mode, pressing „ñ.
  • Page 404 The calculator has the ability of plotting one or more conic curves by selecting as the function TYPE in the PLOT environment. Make sure to delete the Conic variables PPAR and EQ before continuing. For example, let's store the list of equations { ‘(X-1)^2+(Y-2)^2=3’...
  • Page 405: Parametric Plots

    (-0.692, 1.67), while the right intersection is near (1.89,0.5). To recover the menu and return to the PLOT environment, press L@CANCL. To return to normal calculator display, press L@@@OK@@@. Parametric plots Parametric plots in the plane are those plots whose coordinates are generated through the system of equations x = x(t) and y = y(t), where t is known as the parameter.
  • Page 406 ‘PROJM’ for PROJectile Motion, and within that sub-directory store the following variables: X0 = 0, Y0 = 10, V0 = 10 , 0 = 30, and g = 9.806. Make sure that the calculator’s angle measure is set to DEG. Next, define the functions (use „à): Y(t) = Y0 + V0*SIN( 0)*t –...
  • Page 407 EQ, PPAR, Y, X, g, 0, V0, Y0, X0. Variables t, EQ, and PPAR are generated by the calculator to store the current values of the parameter, t, of the equation to be plotted EQ (which contains ‘X(t) + I Y(t)’), and the plot...
  • Page 408: Generating A Table For Parametric Equations

    X1 and Y1. Use the arrow keys, š™—˜, to move about the table. Press $ to return to normal calculator display. This procedure for creating a table corresponding to the current type of plot can be applied to other plot types.
  • Page 409: Plotting The Solution To Simple Differential Equations

    = exp(-t conditions: x = 0 at t = 0. The calculator allows for the plotting of the solution of differential equations of the form Y'(T) = F(T,Y). For our case, we let Y x...
  • Page 410 š to move the cursor in the plot area. At the bottom of the screen you will see the coordinates of the cursor as (X,Y). The calculator uses X and Y as the default names for the horizontal and vertical axes, respectively.
  • Page 411: Truth Plots

    Note: if the window’s ranges are not set to default values, the quickest way to reset them is by using L@RESET@ (select Reset all) @@@OK@@@ L. Press @ERASE @DRAW to draw the truth plot. Because the calculator samples the entire plotting domain, point by point, it takes a few minutes to produce a truth plot.
  • Page 412: Plotting Histograms, Bar Plots, And Scatter Plots

    Press @ERASE @DRAW to draw the truth plot. Again, you have to be patient while the calculator produces the graph. If you want to interrupt the plot, press $ , once. Then press @CANCEL .
  • Page 413 Press @ERASE @DRAW to draw the bar plot. Press @CANCL to return to the PLOT WINDOW environment. Then, press $ , or L@@@OK@@@, to return to normal calculator display. The number of bars to be plotted determines the width of the bar. The H- and V- VIEW are set to 10, by default.
  • Page 414: Scatter Plots

    Press ˜˜ to highlight the select column 1 as X and column 2 as Y in the Y-vs.-X scatter plot. Press L@@@OK@@@ to return to normal calculator display. Press „ò, simultaneously if in RPN mode, to access the PLOT WINDOW screen.
  • Page 415 Press LL@) P ICT to leave the EDIT environment. Press @CANCL to return to the PLOT WINDOW environment. Then, press $ , or L@@@OK@@@, to return to normal calculator display. To plot y vs. z, use: Press „ô, simultaneously if in RPN mode, to access to the PLOT SETUP window.
  • Page 416: Slope Fields

    Press LL@) P ICT to leave the EDIT environment. Press @CANCL to return to the PLOT WINDOW environment. Then, press $ , or L@@@OK@@@, to return to normal calculator display. If you could reproduce the slope field plot in paper, you can trace by hand lines that are tangent to the line segments shown in the plot.
  • Page 417: Fast 3D Plots

    Press LL@) P ICT to leave the EDIT environment. Press @CANCL to return to the PLOT WINDOW environment. Then, press $ , or L@@@OK@@@, to return to normal calculator display. Fast 3D plots Fast 3D plots are used to visualize three-dimensional surfaces represented by equations of the form z = f(x,y).
  • Page 418 When done, press @EXIT. Press @CANCL to return to PLOT WINDOW. Press $ , or L@@@OK@@@, to return to normal calculator display. Try also a Fast 3D plot for the surface z = f(x,y) = sin (x The following figures show a couple of...
  • Page 419: Wireframe Plots

    Press @ERASE @DRAW to draw the plot. When done, press @EXIT. Press @CANCL to return to PLOT WINDOW. Press $ , or L@@@OK@@@, to return to normal calculator display. Wireframe plots Wireframe plots are plots of three-dimensional surfaces described by z = f(x,y).
  • Page 420 Press @ERASE @DRAW to see the surface plot. This time the bulk of the plot is located towards the right –hand side of the display. Press @CANCL to return to the PLOT WINDOW environment. Press $ , or L@@@OK@@@, to return to normal calculator display. XE:0 YE:-3...
  • Page 421: Ps-Contour Plots

    Press LL@) P ICT to leave the EDIT environment. Press @CANCL to return to the PLOT WINDOW environment. Then, press $ , or L@@@OK@@@, to return to normal calculator display. Ps-Contour plots Ps-Contour plots are contour plots of three-dimensional surfaces described by z = f(x,y).
  • Page 422: Y-Slice Plots

    Press @EDIT!L @LABEL @MENU to see the graph with labels and ranges. Press LL@) P ICT@CANCL to return to the PLOT WINDOW environment. Press $ , or L@@@OK@@@, to return to normal calculator display. Try also a Ps-Contour plot for the surface z = f(x,y) = sin x cos y.
  • Page 423: Gridmap Plots

    1, Y-Far: 1, Z-Low:-1, Z-High:1, Press @ERASE @DRAW to draw the three-dimensional surface. calculator produce a series of curves on the screen, that will immediately disappear. When the calculator finishes producing all the y-slice curves, then it will automatically go into animating the different curves. One of the curves is shown below.
  • Page 424: Pr-Surface Plots

    Press @EDIT L@LABEL @MENU to see the graph with labels and ranges. Press LL@) P ICT @CANCL to return to the PLOT WINDOW environment. Press $ , or L@@@OK@@@, to return to normal calculator display. Other functions of a complex variable worth trying for Gridmap plots are: (1) SIN((X,Y)) i.e., F(z) = sin(z)
  • Page 425: The Vpar Variable

    Press @EDIT!L @LABEL @MENU to see the graph with labels and ranges. Press LL@) P ICT @CANCL to return to the PLOT WINDOW environment. Press $ , or L@@@OK@@@, to return to normal calculator display. The VPAR variable The VPAR (Volume Parameter) variable contains information regarding the “volume”...
  • Page 426: Interactive Drawing

    Change EQ to ‘X’ Make sure that Indep: is set to ‘X’ also Press L@@@OK@@@ to return to normal calculator display. Press „ò, simultaneously if in RPN mode, to access the PLOT window (in this case it will be called PLOT –POLAR window).
  • Page 427: Dot+ And Dot

    Notice that the cursor at the end of this line is still active indicating that the calculator is ready to plot a line starting at that point. Press ˜ to move the cursor downwards, say about another cm, and press @LINE again. Now you...
  • Page 428 should have a straight angle traced by a horizontal and a vertical segments. The cursor is still active. To deactivate it, without moving it at all, press @LINE. The cursor returns to its normal shape (a cross) and the LINE function is no longer active.
  • Page 429 This command is used to remove parts of the graph between two MARK positions. Move the cursor to a point in the graph, and press @MARK. Move the cursor to a different point, press @MARK again. Then, press @@DEL@. The section of the graph boxed between the two marks will be deleted.
  • Page 430: Zooming In And Out In The Graphics Display

    This command copies the coordinates of the current cursor position, in user coordinates, in the stack. Zooming in and out in the graphics display Whenever you produce a two-dimensional FUNCTION graphic interactively, the first soft-menu key, labeled @) Z OOM, lets you access functions that can be used to zoom in and out in the current graphics display.
  • Page 431: Zdflt, Zauto

    The cursor will trace the zoom box in the screen. When desired zoom box is selected, press @ZOOM. The calculator will zoom in the contents of the zoom box that you selected to fill the entire screen.
  • Page 432: The Symbolic Menu And Graphs

    cursor at the center of the screen, the window gets zoomed so that the x-axis extends from –64.5 to 65.5. ZSQR Zooms the graph so that the plotting scale is maintained at 1:1 by adjusting the x scale, keeping the y scale fixed, if the window is wider than taller. This forces a proportional zooming.
  • Page 433: The Symb/Graph Menu

    SOLVER.. TRIGONOMETRIC.. EXP&LN.. The SYMB/GRAPH menu The GRAPH sub-menu within the SYMB menu includes the following functions: DEFINE: same as the keystroke sequence „à (the 2 key) GROBADD: pastes two GROBs first over the second (See Chapter 22) PLOT(function): plots a function, similar to „ô PLOTADD(function): adds this function to the list of functions to plot, similar to „ô...
  • Page 434 TABVAL(X^2-1,{1, 3}) produces a list of {min max} values of the function in the interval {1,3}, while SIGNTAB(X^2-1) shows the sign of the function in the interval (- ,+), with f(x) > 0 in (- ,-1), f(x) <0, in (-1,1), and f(x) > 0 in (1,+ ). TABVAR(LN(X)/X) produces the following table of variation: A detailed interpretation of the table of variation is easier to follow in RPN mode:...
  • Page 435: Function Draw3Dmatrix

    of F. The question marks indicates uncertainty or non-definition. For example, for X<0, LN(X) is not defined, thus the X lines shows a question mark in that interval. Right at zero (0+0) F is infinite, for X = e, F = 1/e. F increases before reaching this value, as indicated by the upward arrow, and decreases after this value (X=e) becoming slightly larger than zero (+:0) as X goes to infinity.
  • Page 436: Limits And Derivatives

    Chapter 13 Calculus Applications In this Chapter we discuss applications of the calculator’s functions to operations related to Calculus, e.g., limits, derivatives, integrals, power series, etc. The CALC (Calculus) menu Many of the functions presented in this Chapter are contained in the calculator’s CALC menu, available through the keystroke sequence „Ö...
  • Page 437: Function Lim

    Function lim The calculator provides function lim to calculate limits of functions. This function uses as input an expression representing a function and the value where the limit is to be calculated. Function lim is available through the command catalog (‚N~„l) or through option 2. LIMITS & SERIES… of the CALC menu (see above).
  • Page 438: Functions Deriv And Dervx

    To calculate one-sided limits, add +0 or -0 to the value to the variable. A “+0” means limit from the right, while a “-0” means limit from the left. For example, the limit of as x approaches 1 from the left can be determined with the following keystrokes (ALG mode): ‚N~„l˜$OK$ R!ÜX- 1™@íX@Å1+0`...
  • Page 439: The Deriv&Integ Menu

    in ALG mode. Recall that in RPN mode the arguments must be entered before the function is applied. The DERIV&INTEG menu The functions available in this sub-menu are listed below: Out of these functions DERIV and DERVX are used for derivatives. The other functions include functions related to anti-derivatives and integrals (IBP, INTVX, PREVAL, RISCH, SIGMA, and SIGMAVX), to Fourier series (FOURIER),and to vector analysis (CURL, DIV, HESS, LAPL).
  • Page 440 In RPN mode, this expression must be enclosed in quotes before entering it into the stack. The result in ALG mode is: In the Equation Writer, when you press ‚¿, the calculator provides the following expression: The insert cursor ( ) will be located right at the denominator awaiting for the user to enter an independent variable, say, s: ~„s.
  • Page 441: The Chain Rule

    However, the calculator does not distinguish between ordinary and partial derivatives, utilizing the same symbol for both. The user must keep this distinction in mind when translating results from the calculator to paper. The chain rule The chain rule for derivatives applies to derivatives of composite functions. A general expression for the chain-rule is d{f[g(x)]}/dx = (df/dg) (dg/dx).
  • Page 442: Derivatives Of Equations

    Derivatives of equations You can use the calculator to calculate derivatives of equations, i.e., expressions in which derivatives will exist in both sides of the equal sign. Some examples are shown below: Notice that in the expressions where the derivative sign ( ) or function DERIV was used, the equal sign is preserved in the equation, but not in the cases where function DERVX was used.
  • Page 443: Analyzing Graphics Of Functions

    Press ˜ and type in the equation ‘TAN(X)’. Make sure the independent variable is set to ‘X’. Press L @@@OK@@@ to return to normal calculator display. Press „ò, simultaneously, to access the PLOT window Change H-VIEW range to –2 to 2, and V-VIEW range to –5 to 5.
  • Page 444: Function Domain

    Press L @PICT @CANCL $ to return to normal calculator display. Notice that the slope and tangent line that you requested are listed in the stack. Function DOMAIN Function DOMAIN, available through the command catalog (‚N), provides the domain of definition of a function as a list of numbers and specifications.
  • Page 445: Function Tabvar

    This result indicates that the range of the function corresponding to the domain D = { -1,5 } is R = Function SIGNTAB Function SIGNTAB, available through the command catalog (‚N), provides information on the sign of a function through its domain. For example, for the TAN(X) function, SIGNTAB indicates that TAN(X) is negative between –...
  • Page 446 This is a graphic object. To be able to the result in its entirety, press ˜. The variation table of the function is shown as follows: Press $ to recover normal calculator display. Press ƒ to drop this last result from the stack.
  • Page 447: Using Derivatives To Calculate Extreme Points

    The interpretation of the variation table shown above is as follows: the function F(X) increases for X in the interval (- , -1), reaching a maximum equal to 36 at X = -1. Then, F(X) decreases until X = 11/3, reaching a minimum of –400/27. After that F(X) increases until reaching + Also, at X = , F(X) =...
  • Page 448: Higher Order Derivatives

    We find two critical points, one at x = 11/3 and one at x = -1. To evaluate the second derivative at each point use: The last screen shows that f”(11/3) = 14, thus, x = 11/3 is a relative minimum. For x = -1, we have the following: This result indicates that f”(-1) = -14, thus, x = -1 is a relative maximum.
  • Page 449: Anti-Derivatives And Integrals

    C = constant. Functions INT, INTVX, RISCH, SIGMA and SIGMAVX The calculator provides functions INT, INTVX, RISCH, SIGMA and SIGMAVX to calculate anti-derivatives of functions. Functions INT, RISCH, and SIGMA work with functions of any variable, while functions INTVX, and SIGMAVX utilize functions of the CAS variable VX (typically, ‘x’).
  • Page 450: Definite Integrals

    The PREVAL(f(x),a,b) function of the CAS can simplify such calculation by returning f(b)-f(a) with x being the CAS variable VX. To calculate definite integrals the calculator also provides the integral symbol as the keystroke combination ‚Á (associated with the U key). The simplest way to build an integral is by using the Equation Writer (see Chapter 2 for an example).
  • Page 451: Step-By-Step Evaluation Of Derivatives And Integrals

    This is the general format for the definite integral when typed directly into the stack, i.e., ∫ (lower limit, upper limit, integrand, variable of integration) Pressing ` at this point will evaluate the integral in the stack: The integral can be evaluated also in the Equation Writer by selecting the entire expression an using the soft menu key @EVAL.
  • Page 452: Integrating An Equation

    Notice that these steps make a lot of sense to the calculator, although not enough information is provided to the user on the individual steps.
  • Page 453: Techniques Of Integration

    Techniques of integration Several techniques of integration can be implemented in the calculators, as shown in the following examples. Substitution or change of variables Suppose we want to calculate the integral . If we use step-by- step calculation in the Equation Writer, this is the sequence of variable substitutions: This second step shows the proper substitution to use, u = x The last four steps show the progression of the solution: a square root, followed...
  • Page 454: Integration By Parts And Differentials

    = ∫udv = uv - ∫vdu = xe - ∫e dx = xe The calculator provides function IBP, under the CALC/DERIV&INTG menu, that takes as arguments the original function to integrate, namely, u(X)*v’(X), and the function v(X), and returns u(X)*v(X) and -v(X)*u’(X). In other words, function IBP returns the two terms of the right-hand side in the integration by parts equation.
  • Page 455: Integration By Partial Fractions

    Integration by partial fractions Function PARTFRAC, presented in Chapter 5, provides the decomposition of a fraction into partial fractions. This technique is useful to reduce a complicated fraction into a sum of simple fractions that can then be integrated term by term. For example, to integrate we can decompose the fraction into its partial component fractions, as follows: The direct integration produces the same result, with some switching of the terms...
  • Page 456: Integration With Units

    Using the calculator, we proceed as follows: Alternatively, you can evaluate the integral to infinity from the start, e.g., Integration with units An integral can be calculated with units incorporated into the limits of integration, as in the example shown below that uses ALG mode, with the CAS set to Approx mode.
  • Page 457: Infinite Series

    2 - Upper limit units must be consistent with lower limit units. Otherwise, the calculator simply returns the unevaluated integral. For example, 3 – The integrand may have units too. For example: 4 –...
  • Page 458: Taylor And Maclaurin's Series

    Taylor and Maclaurin’s series A function f(x) can be expanded into an infinite series around a point x=x using a Taylor’s series, namely, where f (x) represents the n-th derivative of f(x) with respect to x, f If the value x is zero, the series is referred to as a Maclaurin’s series, i.e., Taylor polynomial and reminder In practice, we cannot evaluate all terms in an infinite series, instead, we...
  • Page 459 where is a number near x = x . Since is typically unknown, instead of an estimate of the residual, we provide an estimate of the order of the residual in reference to h, i.e., we say that R (x) has an error of order h , or R If h is a small number, say, h<<1, then h will be typically very small, i.e.,...
  • Page 460 increment h. The list returned as the first output object includes the following items: 1 - Bi-directional limit of the function at point of expansion, i.e., 2 - An equivalent value of the function near x = a 3 - Expression for the Taylor polynomial 4 - Order of the residual or remainder Because of the relatively large amount of output, this function is easier to handle in RPN mode.
  • Page 461: Partial Derivatives

    Multi-variate functions A function of two or more variables can be defined in the calculator by using the DEFINE function („à). To illustrate the concept of partial derivative, we will define a couple of multi-variate functions, f(x,y) = x cos(y), and g(x,y,z)
  • Page 462 In this calculation we treat y as a constant and take derivatives of the expression with respect to x. Similarly, you can use the derivative functions in the calculator, e.g., DERVX, DERIV, (described in detail in Chapter 13) to calculate partial derivatives.
  • Page 463: Higher-Order Derivatives

    therefore, with DERVX you can only calculate derivatives with respect to X. Some examples of first-order partial derivatives are shown next: Higher-order derivatives The following second-order derivatives can be defined The last two expressions represent cross-derivatives, the partial derivatives signs in the denominator shows the order of derivation.
  • Page 464: The Chain Rule For Partial Derivatives

    = f[x(t),y(t)]. The chain rule for the derivative dz/dt for this case is written as To see the expression that the calculator produces for this version of the chain rule use: The result is given by d1y(t) d2z(x(t),y(t))+d1x(t) d1z(x(y),y(t)).
  • Page 465: Total Differential Of A Function Z = Z(X,Y)

    Total differential of a function z = z(x,y) From the last equation, if we multiply by dt, we get the total differential of the function z = z(x,y), i.e., dz = A different version of the chain rule applies to the case in which z = f(x,y), x = x(u,v), y = y(u,v), so that z = f[x(u,v), y(u,v)].
  • Page 466: Using Function Hess To Analyze Extrema

    The last result indicates that the discriminant is <0 (saddle point), and for (X,Y) = (-1,0), >0 and maximum). The figure below, produced in the calculator, and edited in the computer, illustrates the existence of these two points: Using function HESS to analyze extrema Function HESS can be used to analyze extrema of a function of two variables as shown next.
  • Page 467 Applications of function HESS are easier to visualize in the RPN mode. Consider as an example the function (X,Y,Z) = X function HESS to function RPN stack before and after applying function HESS. When applied to a function of two variables, the gradient in level 2, when made equal to zero, represents the equations for critical points, i.e., while the matrix in level 3 represent second derivatives.
  • Page 468: Multiple Integrals

    ∫∫ Calculating a double integral in the calculator is straightforward. A double integral can be built in the Equation Writer (see example in Chapter 2). An example follows. This double integral is calculated directly in the Equation Writer by selecting the entire expression and using function @EVAL.
  • Page 469: Jacobian Of Coordinate Transformation

    Jacobian of coordinate transformation Consider the coordinate transformation x = x(u,v), y = y(u,v). The Jacobian of this transformation is defined as When calculating an integral using such transformation, the expression to use ∫∫ ∫∫ dydx expressed in (u,v) coordinates. Double integral in polar coordinates To transform from polar to Cartesian coordinates we use x(r, ) = r cos , and y(r, ) = r sin .
  • Page 470 R’ in polar coordinates is R’ = { < < , f( ) < r < g( )}. Double integrals in polar coordinates can be entered in the calculator, making sure that the Jacobian |J| = r is included in the integrand. The following is an...
  • Page 471: Gradient And Directional Derivative

    Chapter 15 Vector Analysis Applications In this Chapter we present a number of functions from the CALC menu that apply to the analysis of scalar and vector fields. The CALC menu was presented in detail in Chapter 13. In particular, in the DERIV&INTEG menu we identified a number of functions that have applications in vector analysis, namely, CURL, DIV, HESS, LAPL.
  • Page 472: A Program To Calculate The Gradient

    At any particular point, the maximum rate of change of the function occurs in the direction of the gradient, i.e., along a unit vector u = The value of that directional derivative is equal to the magnitude of the gradient at any point D (x,y,z) = | = |...
  • Page 473: Potential Of A Gradient

    (x,y,z), such that f = referred to as the potential function for the vector field F. It follows that F = grad The calculator provides function POTENTIAL, available through the command catalog (‚N), to calculate the potential function of a vector field, if it exists.
  • Page 474 Divergence The divergence of a vector function, F(x,y,z) = f(x,y,z)i+g(x,y,z)j+h(x,y,z)k, is defined by taking a “dot-product” of the del operator with the function, i.e., Function DIV can be used to calculate the divergence of a vector field.
  • Page 475: Irrotational Fields And Potential Function

    Curl The curl of a vector field F(x,y,z) = f(x,y,z)i+g(x,y,z)j+h(x,y,z)k, is defined by a “cross-product” of the del operator with the vector field, i.e., curl ⎛ ⎜ ⎜ ⎝ The curl of vector field can be calculated with function CURL. For example, for the function F(X,Y,Z) = [XY,X Irrotational fields and potential function In an earlier section in this chapter we introduced function POTENTIAL to...
  • Page 476: Vector Potential

    (x,y,z) = (x,y,z)i+ (x,y,z)j+ (x,y,z)k, such that F = curl , then function (x,y,z) is referred to as the vector potential of F(x,y,z). The calculator provides function VPOTENTIAL, available through the command catalog (‚N), to calculate the vector potential, field, F(x,y,z) = f(x,y,z)i+g(x,y,z)j+h(x,y,z)k. For example, given the vector field, F(x,y,z) = -(yi+zj+xk), function VPOTENTIAL produces i.e.,...
  • Page 477 produces the vector potential function different from . The last command in the screen shot shows that indeed F = . Thus, a vector potential function is not uniquely determined. The components of the given vector field, F(x,y,z) = f(x,y,z)i+g(x,y,z)j +h(x,y,z)k, and those of the vector potential function, (x,y,z)i+ (x,y,z)j+ (x,y,z)k, are related by f = x, and h =...
  • Page 478: Basic Operations With Differential Equations

    In most cases, we seek the dependent function that satisfies the differential equation. Basic operations with differential equations In this section we present some uses of the calculator for entering, checking and visualizing the solution of ODEs. Entering differential equations The key to using differential equations in the calculator is typing in the derivatives in the equation.
  • Page 479: Checking Solutions In The Calculator

    Expressions for derivatives using the order-of-variable index notation do not translate into derivative notation in the equation writer, as you can check by pressing ˜ while the last result is in stack level 1. However, the calculator understands both notations and operates accordingly regarding of the notation used.
  • Page 480: Slope Field Visualization Of Solutions

    EVAL(ANS(1)) ` In RPN mode: ‘ t( t(u(t)))+ 0^2*u(t) = 0’ ` ‘u(t)=A*SIN ( 0*t)’ ` SUBST EVAL The result is ‘0=0’. For this example, you could also use: ‘ t( t(u(t))))+ 0^2*u(t) = 0’ to enter the differential equation. Slope field visualization of solutions Slope field plots, introduced in Chapter 12, are used to visualize the solutions to a differential equation of the form dy/dx = f(x,y).
  • Page 481: Solution To Linear And Non-Linear Equations

    A particular solution is one that satisfies the non- homogeneous equation. Function LDEC The calculator provides function LDEC (Linear Differential Equation Command) to find the general solution to a linear ODE of any order with constant coefficients, whether it is homogeneous or not. This function requires you to...
  • Page 482 Both of these inputs must be given in terms of the default independent variable for the calculator’s CAS (typically ‘X’). The output from the function is the general solution of the ODE. The function LDEC is available through in the CALC/DIFF menu.
  • Page 483 ODE, use the following: 'd1d1d1Y(X)-4*d1d1Y(X)-11*d1Y(X)+30*Y(X) = X^2'` 'Y(X)=(450*X^2+330*X+241)/13500' ` Allow the calculator about ten seconds to produce the result: ‘X^2 = X^2’. Example 3 - Solving a system of linear differential equations with constant coefficients. Consider the system of linear differential equations: represents the solution to the –3x...
  • Page 484: Function Desolve

    Verify that the components are: Function DESOLVE The calculator provides function DESOLVE (Differential Equation SOLVEr) to solve certain types of differential equations. The function requires as input the differential equation and the unknown function, and returns the solution to the equation if available.
  • Page 485: The Variable Odetype

    ODE is now written: Next, we can write dy/dx = (C + exp x)/x = C/x + e In the calculator, you may try to integrate: ‘d1y(x) = (C + EXP(x))/x’ ` ‘y(x)’ ` DESOLVE The result is { ‘y(x) = INT((EXP(xt)+C)/xt,xt,x)+C0’...
  • Page 486 Example 3 – Solving an equation with initial conditions. Solve with initial conditions In the calculator, use: [‘d1d1y(t)+5*y(t) = 2*COS(t/2)’ ‘y(0) = 6/5’ ‘d1y(0) = -1/2’] ` Notice that the initial conditions were changed to their = 6/5’, rather than ‘y(0)=1.2’, and ‘d1y(0) = -1/2’, rather than, ‘d1y(0) = -0.5’.
  • Page 487: Laplace Transforms

    Press J @ODETY to get the string “ this case. Laplace Transforms The Laplace transform of a function f(t) produces a function F(s) in the image domain that can be utilized to find the solution of a linear differential equation involving f(t) through algebraic methods.
  • Page 488: Laplace Transform And Inverses In The Calculator

    VX is the CAS default independent variable, which you should set to ‘X’. Thus, the calculator returns the transform or inverse transform as a function of X. The functions LAP and ILAP are available under the CALC/DIFF menu. The examples are worked out in the RPN mode, but translating them to ALG mode is straightforward.
  • Page 489: Laplace Transform Theorems

    ‘ILAP(SIN(X))’, meaning that there is no closed-form expression f(t), such that f(t) {sin(s)}. Example 4 – Determine the inverse Laplace transform of F(s) = 1/s ‘1/X^3’ ` ILAP μ. The calculator returns the result: ‘X^2/2’, which is interpreted as L {1/s Example 5 –...
  • Page 490 = f(0), then t = 0 } = s F(s) – s …– s f –at , using the calculator with ‘EXP(-a*X)’ ` LAP, you = -6/(s +4 a s +6 a ∫ , then the Laplace R(s) - s r –...
  • Page 491 ∫ Example 4 – Using the convolution theorem, find the Laplace transform of (f*g)(t), if f(t) = sin(t), and g(t) = exp(t). To find F(s) = L{f(t)}, and G(s) = L{g(t)}, use: ‘SIN(X)’ ` LAP μ. Result, ‘1/(X^2+1)’, i.e., F(s) = 1/(s Also, ‘EXP(X)’...
  • Page 492: Dirac's Delta Function And Heaviside's Step Function

    Dirac’s delta function and Heaviside’s step function In the analysis of control systems it is customary to utilize a type of functions that represent certain physical occurrences such as the sudden activation of a switch (Heaviside’s step function, H(t)) or a sudden, instantaneous, peak in an input to the system (Dirac’s delta function, (t)).
  • Page 493 L F(s)}=f(t-a) H(t-a), with F(s) = L{f(t)}. In the calculator the Heaviside step function H(t) is simply referred to as ‘1’. To check the transform in the calculator use: 1 ` LAP. The result is ‘1/X’, i.e., Similarly, ‘U0’...
  • Page 494: Applications Of Laplace Transform In The Solution Of Linear Odes

    Note: ‘EXP(-X)’ ` LAP , produces ‘1/(X+1)’, i.e., L{e With H(s) = L{h(t)}, and L{dh/dt} = s H(s) - h equation is Use the calculator to solve for H(s), by writing: ‘X*H-h0+k*H=a/(X+1)’ ` ‘H’ ISOL L{df/dt} = s F(s) - f...
  • Page 495 The result is ‘H=((X+1)*h0+a)/(X^2+(k+1)*X+k)’. To find the solution to the ODE, h(t), we need to use the inverse Laplace transform, as follows: ƒ ƒ ILAP μ The result is simplifying, results in Check what the solution to the ODE would be if you use the function LDEC: ‘a*EXP(-X)’...
  • Page 496 Note: ‘SIN(3*X)’ ` LAP μ produces ‘3/(X^2+9)’, i.e., With Y(s) = L{y(t)}, and L{d = h’(0), the transformed equation is Use the calculator to solve for Y(s), by writing: ‘X^2*Y-X*y0-y1+2*Y=3/(X^2+9)’ ` ‘Y’ ISOL The result is ‘Y=((X^2+9)*y1+(y0*X^3+9*y0*X+3))/(X^4+11*X^2+18)’. To find the solution to the ODE, y(t), we need to use the inverse Laplace transform, as follows: ƒ...
  • Page 497 ODE. Example 3 – Consider the equation where (t) is Dirac’s delta function. Using Laplace transforms, we can write: ’ ` LAP , the calculator produces EXP(-3*X), i.e., L{ (t-3)} With ‘ Delta(X-3) –3s .
  • Page 498 Laplace transform {a F(s)+b G(s)} = a L to write, {s/(s Then, we use the calculator to obtain the following: ‘X/(X^2+1)’ ` ILAP ‘1/(X^2+1)’ ` ILAP ‘EXP(-3*X)/(X^2+1)’ ` ILAP Result, SIN(X-3)*Heaviside(X-3)’. [2]. The very last result, i.e., the inverse Laplace transform of the expression ‘(EXP(-3*X)/(X^2+1))’, can also be calculated by using the second shifting...
  • Page 499 ‘H(X) = IFTE(X>0, 1, 0)’ `„à This definition will create the variable @@@H@@@ in the calculator’s soft menu key. Example 1 – To see a plot of H(t-2), for example, use a FUNCTION type of plot (see Chapter 12): Press „ô, simultaneously in RPN mode, to access to the PLOT SETUP...
  • Page 500 Use of the function H(X) with LDEC, LAP, or ILAP, is not allowed in the calculator. You have to use the main results provided earlier when dealing with the Heaviside step function, i.e., L{H(t)} = 1/s, L –ks L{H(t-k)}=e L{H(t)} = e Example 2 –...
  • Page 501 , where y Y(s) – s y – y + Y(s) = (1/s) e necessary. Use the calculator to solve for Y(s), by writing: ‘X^2*Y-X*y0-y1+Y=(1/X)*EXP(-3*X)’ ` ‘Y’ ISOL The result is ‘Y=(X^2*y0+X*y1+EXP(-3*X))/(X^3+X)’. To find the solution to the ODE, y(t), we need to use the inverse Laplace transform, as follows: ƒ...
  • Page 502 Example 4 – Plot the solution to Example 3 using the same values of y used in the plot of Example 1, above. We now plot the function y(t) = 0.5 cos t –0.25 sin t + (1+sin(t-3)) H(t-3). In the range 0 < t < 20, and changing the vertical range to (-1,3), the graph should look like this: Again, there is a new component to the motion switched at t=3, namely, the particular solution y...
  • Page 503: Fourier Series

    Examples of the plots generated by these functions, for Uo = 1, a = 2, b = 3, c = 4, horizontal range = (0,5), and vertical range = (-1, 1.5), are shown in the figures below: Fourier series Fourier series are series involving sine and cosine functions typically used to expand periodic functions.
  • Page 504 The following exercises are in ALG mode, with CAS mode set to Exact. (When you produce a graph, the CAS mode will be reset to Approx. Make sure to set it back to Exact after producing the graph.) Suppose, for example, that the function f(t) = t +t is periodic with period T = 2.
  • Page 505: Function Fourier

    [0,T], while the one defined earlier was calculated in the interval [-T/2,T/2], we need to shift the function in the t-axis, by subtracting T/2 from t, i.e., we will use g(t) = f(t-1) = (t-1) Using the calculator in ALG mode, first we define functions f(t) and g(t): ∑ exp(...
  • Page 506 Next, we move to the CASDIR sub-directory under HOME to change the value of variable PERIOD, e.g., „ (hold) §`J @) C ASDI `2 K @PERIOD Return to the sub-directory where you defined functions f and g, and calculate the coefficients (Accept change to Complex mode when requested): Thus, = 1/3, c The Fourier series with three elements will be written as...
  • Page 507 We can simplify this expression even further by using Euler’s formula for complex numbers, namely, e cos(2n ) = 1, and sin(2n ) = 0, for n integer. Using the calculator you can simplify the expression in the equation writer (‚O) by replacing e simplification:...
  • Page 508 The result is Putting together the complex Fourier series Having determined the general expression for c complex Fourier series by using the summation function ( ) in the calculator as follows: First, define a function c(n) representing the general term c Fourier series.
  • Page 509 Or, in the calculator entry line as: DEFINE(‘F(X,k,c0) = c0+ (n=1,k,c(n)*EXP(2*i* *n*X/T)+ c(-n)*EXP(-(2*i* *n*X/T))’), where T is the period, T = 2. The following screen shots show the definition of function F and the storing of T = 2: The function @@@F@@@ can be used to generate the expression for the complex Fourier series for a finite value of k.
  • Page 510 Accept change to Approx –0.40467…. The actual value of the function g(0.5) is g(0.5) = -0.25. The following calculations show how well the Fourier series approximates this value as the number of components in the series, given by k, increases: F (0.5, 1, 1/3) = (-0.303286439037,0.) F (0.5, 2, 1/3) = (-0.404607622676,0.) F (0.5, 3, 1/3) = (-0.192401031886,0.)
  • Page 511: Fourier Series For A Triangular Wave

    2 in it if needed. The coefficient c is calculated as follows: The calculator will request a change to Approx mode because of the integration of the function IFTE() included in the integrand. Accepting, the change to Approx produces c = 0.5.
  • Page 512 The calculator returns an integral that cannot be evaluated numerically because it depends on the parameter n. typing its definition in the calculator, i.e., ⎛ ∫ ⎜ ⎝ where T = 2 is the period. The value of T can be stored using:...
  • Page 513 Press `` to copy this result to the screen. Then, reactivate the Equation Writer to calculate the second integral defining the coefficient c Once again, replacing e Press `` to copy this second result to the screen. Now, add ANS(1) and ANS(2) to get the full expression for c Pressing ˜...
  • Page 514 This result is used to define the function c(n) as follows: DEFINE(‘c(n) = - (((-1)^n-1)/(n^2* ^2*(-1)^n)’) i.e., Next, we define function F(X,k,c0) to calculate the Fourier series (if you completed example 1, you already have this function stored): DEFINE(‘F(X,k,c0) = c0+ (n=1,k,c(n)*EXP(2*i* *n*X/T)+ c(-n)*EXP(-(2*i* *n*X/T))’), To compare the original function and the Fourier series we can produce the simultaneous plot of both functions.
  • Page 515: Fourier Series For A Square Wave

    From the plot it is very difficult to distinguish the original function from the Fourier series approximation. Using k = 2, or 5 terms in the series, shows not so good a fitting: The Fourier series can be used to generate a periodic triangular wave (or saw tooth wave) by changing the horizontal axis range, for example, from –2 to 4.
  • Page 516 In this case, the period T, is 4. Make sure to change the value of variable @@@T@@@ to 4 (use: 4 K @@@T@@ `). Function g(X) can be defined in the calculator by using DEFINE(‘g(X) = IFTE((X>1) AND (X<3),1,0)’) The function plotted as follows (horizontal range: 0 to 4, vertical range:0 to 1.2...
  • Page 517: Fourier Series Applications In Differential Equations

    The simplification of the right-hand side of c(n), above, is easier done on paper (i.e., by hand). Then, retype the expression for c(n) as shown in the figure to the left above, to define function c(n). The Fourier series is calculated with F(X,k,c0), as in examples 1 and 2 above, with c0 = 0.5.
  • Page 518 SUBST (see Chapter 5). For this case, use SUBST(ANS(1),cC0=0.5) `, followed by SUBST(ANS(1),cC1=-0.5) `. Back into normal calculator display we can use: The latter result can be defined as a function, FW(X), as follows (cutting and pasting the last result into the command): We can now plot the real part of this function.
  • Page 519: Fourier Transforms

    The solution is shown below: Fourier Transforms Before presenting the concept of Fourier transforms, we’ll discuss the general definition of an integral transform. In general, an integral transform is a transformation that relates a function f(t) to a new function F(s) by an integration ∫...
  • Page 520 The amplitudes A will be referred to as the spectrum of the function and will be a measure of the magnitude of the component of f(x) with frequency f The basic or fundamental frequency in the Fourier series is f other frequencies are multiples of this basic frequency, i.e., f can define an angular frequency, is the basic or fundamental angular frequency of the Fourier series.
  • Page 521 A( ), for the function f(x) = exp(-x), for x > 0, and f(x) = 0, x < 0. In the calculator, set up and evaluate the following integrals to calculate C( ) and S( ), respectively. CAS modes are set to Exact and Real.
  • Page 522: Definition Of Fourier Transforms

    Define this expression as a function by using function DEFINE („à). Then, plot the continuous spectrum, in the range 0 < Definition of Fourier transforms Different types of Fourier transforms can be defined. The following are the definitions of the sine, cosine, and full Fourier transforms and their inverses used in this Chapter.
  • Page 523 The continuous spectrum, F( ), is calculated with the integral: This result can be rationalized by multiplying numerator and denominator by the conjugate of the denominator, namely, 1-i . The result is now: which is a complex function. The absolute value of the real and imaginary parts of the function can be plotted as shown below Notes: The magnitude, or absolute value, of the Fourier transform, |F( )|, is the...
  • Page 524: Properties Of The Fourier Transform

    {X ∑ The direct calculation of the sequence X involve enormous amounts of computer (or calculator) time particularly for large values of n. The Fast Fourier Transform reduces the number of operations to the order of n log For example, for n = 100, the FFT requires about 664 operations, while the direct calculation would require 10,000 operations.
  • Page 525: Examples Of Fft Applications

    Examples of FFT applications FFT applications usually involve data discretized from a time-dependent signal. The calculator can be fed that data, say from a computer or a data logger, for processing. Or, you can generate your own data by programming a function and adding a few random numbers to it.
  • Page 526 H-VIEW: 0 32, V-VIEW: -10 10, and BarWidth to 1. Press @CANCL $ to return to normal calculator display. To perform the FFT on the array in stack level 1 use function FFT available in the MTH/FFT menu on array DAT: @£DAT FFT.
  • Page 527 Example 2 – To produce the signal given the spectrum, we modify the program GDATA to include an absolute value, so that it reads: << m a b << ‘2^m’ EVAL n << ‘(b-a)/(n+1)’ EVAL Dx << 1 n FOR j ‘a+(j-1)*Dx’...
  • Page 528: Solution To Specific Second-Order Differential Equations

    Except for a large peak at t = 0, the signal is mostly noise. A smaller vertical scale (-0.5 to 0.5) shows the signal as follows: Solution to specific second-order differential equations In this section we present and solve specific types of ordinary differential equations whose solutions are defined in terms of some classical functions, e.g., Bessel’s functions, Hermite polynomials, etc.
  • Page 529 ∑ where M = n/2 or (n-1)/2, whichever is an integer. Legendre’s polynomials are pre-programmed in the calculator and can be recalled by using the function LEGENDRE given the order of the polynomial, n. The function LEGENDRE can be obtained from the command catalog (‚N) or through the menu ARITHMETIC/POLYNOMIAL menu (see Chapter 5).
  • Page 530 Instead, we introduce the Bessel functions of the second kind defined as ∑ (non-integer) or n (integer) in the calculator, we (x) with, say, 5 terms in the series, use 6.78168*x^10’.
  • Page 531 Y (x) = [J (x) cos for non-integer , and for n integer, with n > 0, by where is the Euler constant, defined by and h represents the harmonic series For the case n = 0, the Bessel function of the second kind is defined as With these definitions, a general solution of Bessel’s equation for all values of is given by In some instances, it is necessary to provide complex solutions to Bessel’s...
  • Page 532: Chebyshev Or Tchebycheff Polynomials

    You can implement functions representing Bessel’s functions in the calculator in a similar manner to that used to define Bessel’s functions of the first kind, but keeping in mind that the infinite series in the calculator need to be translated into a finite series.
  • Page 533: Laguerre's Equation

    (x+y) number of combinations of n elements taken m at a time. This function is available in the calculator as function COMB in the MTH/PROB menu (see also Chapter 17). You can define the following function to calculate Laguerre’s polynomials: When done typing it in the equation writer press use function DEFINE to create the function L(x,n) into variable @@@L@@@ .
  • Page 534: Numerical And Graphical Solutions To Odes

    /4)H (x/ 2), where the function H In the calculator, the function HERMITE, available through the menu ARITHMETIC/POLYNOMIAL. Function HERMITE takes as argument an integer number, n, and returns the Hermite polynomial of n-th degree. For example, the first four Hermite polynomials are obtained by using: 0 HERMITE, result: 1, 1 HERMITE, result: ’2*X’,...
  • Page 535 First, create the expression defining the derivative and store it into variable EQ. The figure to the left shows the ALG mode command, while the right-hand side figure shows the RPN stack before pressing K. Then, enter the NUMERICAL SOLVER environment and select the differential equation solver: ‚Ϙ...
  • Page 536: Graphical Solution Of First-Order Ode

    = exp(-t The calculator allows for the plotting of the solution of differential equations of the form Y'(T) = F(T,Y). For our case, we let Y = x and T = t, therefore, F(T,Y) = f(t, x) = exp(-t ).
  • Page 537 „ô (simultaneously, if in RPN mode) to enter PLOT environment Highlight the field in front of TYPE, using the —˜keys. @CHOOS, and highlight Diff Eq, using the —˜keys. Press @@OK@@. Change field F: to ‘EXP(- t^2)’ Make sure that the following parameters are set to: H-VAR: 0, V-VAR: Change the independent variable to t .
  • Page 538: Numerical Solution Of Second-Order Ode

    Use the š™ keys to move the cursor around the plot area. At the bottom of the screen you will see the coordinates of the cursor as (X,Y), i.e., the calculator uses X and Y as the default names for the horizontal and vertical axes, respectively.
  • Page 539 time t = 2, the input form for the differential equation solver should look as follows (notice that the Init: value for the Soln: is a vector [0, 6]): Press @SOLVE (wait) @EDIT to solve for w(t=2). The solution reads [.16716… - .6271…], i.e., x(2) = 0.16716, and x'(2) = v(2) = -0.6271.
  • Page 540: Graphical Solution For A Second-Order Ode

    Repeat for t = 1.25, 1.50, 1.75, 2.00. Press @@OK@@ after viewing the last result in @EDIT. To return to normal calculator display, press $ or L@@OK@@. The different solutions will be shown in the stack, with the latest result in level 1.
  • Page 541 Notice that the option V-Var: is set to 1, indicating that the first element in the vector solution, namely, x’, is to be plotted against the independent variable t. Accept changes to PLOT SETUP by pressing L @@OK@@. Press „ò (simultaneously, if in RPN mode) to enter the PLOT WINDOW environment.
  • Page 542: Numerical Solution For Stiff First-Order Ode

    If we attempt a direct numerical solution of the original equation dy/dt = - 100y+100t+101, using the calculator’s own numerical solver, we find that the calculator takes longer to produce a solution that in the previous first-order example. To check this out, set your differential equation numerical solver (‚...
  • Page 543 ’, which vary at very different rates, except for the cases C=0 or C 0 100t (e.g., for C = 1, t =0.1, C e =22026). The calculator’s ODE numerical solver allows for the solution of stiff ODEs by selecting the option in the screen. With this _Stiff SOLVE Y’(T) = F(T,Y)
  • Page 544: Numerical Solution To Odes With The Solve/Diff Menu

    Note: The option Stiff equations. Numerical solution to ODEs with the SOLVE/DIFF menu The SOLVE soft menu is activated by using 74 MENU in RPN mode. This menu is presented in detail in Chapter 6. One of the sub-menus, DIFF, contains functions for the numerical solution of ordinary differential equations for use in programming.
  • Page 545: Function Rrk

    The value of the solution, y is appropriate for programming since it leaves the differential equation specifications and the tolerance in the stack ready for a new solution. Notice that the solution uses the initial conditions x = 0 at y = 0. If, your actual initial solutions are x = x at y = y init...
  • Page 546: Function Rkfstep

    contain only the value of , and the step x will be taken as a small default value. After running function @@RKF@@, the stack will show the lines: The value of the solution, y This function can be used to solve so-called “stiff” differential equations. The following screen shots show the RPN stack before and after application of function RRK: The value stored in variable y is 3.00000000004.
  • Page 547: Function Rrkstep

    These results indicate that ( x) Function RRKSTEP This function uses an input list similar to that of function RRK, as well as the tolerance for the solution, a possible step x, and a number (LAST) specifying the last method used in the solution (1, if RKF was used, or 2, if RRK was used). Function RRKSTEP returns the same input list, followed by the tolerance, an estimate of the next step in the independent variable, and the current method (CURRENT) used to arrive at the next step.
  • Page 548: Function Rkferr

    These results indicate that ( x) (CURRENT = 1) should be used. Function RKFERR This function returns the absolute error estimate for a given step when solving a problem as that described for function RKF. The input stack looks as follows: After running this function, the stack will show the lines: Thus, this function is used to determine the increment in the solution, y, as well as the absolute error (error).
  • Page 549 Note: As you execute the commands in the DIFF menu values of x and y will be produced and stored as variables in your calculator. The results provided by the functions in this section will depend on the current values of x and y.
  • Page 550: The Mth/Probability.. Sub-Menu - Part

    Chapter 17 Probability Applications In this Chapter we provide examples of applications of calculator’s functions to probability distributions. The MTH/PROBABILITY.. sub-menu - part 1 The MTH/PROBABILITY.. sub-menu is accessible through the keystroke sequence „´. With system flag 117 set to CHOOSE boxes, the following list of MTH options is provided (see left-hand side figure below).
  • Page 551: Random Numbers

    Example of applications of these functions are shown next: Random numbers The calculator provides a random number generator that returns a uniformly distributed, random real number between 0 and 1. The generator is able to produce sequences of random numbers. However, after a certain number of times (a very large number indeed), the sequence tends to repeat itself.
  • Page 552: Discrete Probability Distributions

    Random number generators, in general, operate by taking a value, called the “seed” of the generator, and performing some mathematical algorithm on that “seed” that generates a new (pseudo)random number. If you want to generate a sequence of number and be able to repeat the same sequence later, you can change the "seed"...
  • Page 553: Binomial Distribution

    function (pmf) is represented by f(x) = P[X=x], i.e., the probability that the random variable X takes the value x. The mass distribution function must satisfy the conditions that A cumulative distribution function (cdf) is defined as Next, we will define a number of functions to calculate discrete probability distributions.
  • Page 554: Poisson Distribution

    Poisson distribution The probability mass function of the Poisson distribution is given by In this expression, if the random variable X represents the number of occurrences of an event or observation per unit time, length, area, volume, etc., then the parameter l represents the average number of occurrences per unit time, length, area, volume, etc.
  • Page 555: Continuous Probability Distributions

    Weibull distributions. These distributions are described in any statistics textbook. Some of these distributions make use of a the Gamma function defined earlier, which is calculated in the calculator by using the factorial function as (x) = (x-1)!, for any real number x.
  • Page 556: The Beta Distribution

    while its cdf is given by F(x) = 1 - exp(-x/ ), for x>0, The beta distribution The pdf for the gamma distribution is given by As in the case of the gamma distribution, the corresponding cdf for the beta distribution is also given by an integral with no closed-form solution.
  • Page 557 Exponential pdf: 'epdf(x) = EXP(-x/ )/ ' Exponential cdf: 'ecdf(x) = 1 - EXP(-x/ )' Weibull pdf: 'Wpdf(x) = Weibull cdf: 'Wcdf(x) = 1 - EXP(- *x^ )' Use function DEFINE to define all these functions. Next, enter the values of and , e.g., 1K~‚a` 2K ~‚b` Finally, for the cdf for Gamma and Beta cdf’s, you need to edit the program definitions to add...
  • Page 558: Continuous Distributions For Statistical Inference

    These distributions are the normal distribution, the Student’s t distribution, the Chi-square ( distribution, and the F-distribution. The functions provided by the calculator to evaluate probabilities for these distributions are contained in the MTH/ PROBABILITY menu introduced earlier in this chapter.
  • Page 559: Normal Distribution Cdf

    = 0.20755374. Normal distribution cdf The calculator has a function UTPN that calculates the upper-tail normal distribution, i.e., UTPN(x) = P(X>x) = 1 - P(X<x). To obtain the value of the upper-tail normal distribution UTPN we need to enter the following values: the mean, ;...
  • Page 560: The Chi-Square Distribution

    ( ) = ( -1)! is the GAMMA function defined in Chapter 3. The calculator provides for values of the upper-tail (cumulative) distribution function for the t-distribution, function UTPT, given the parameter and the value of t, i.e., UTPT( ,t). The definition of this function is, therefore, UTPT For example, UTPT(5,2.5) = 2.7245…E-2.
  • Page 561: The F Distribution

    The calculator provides for values of the upper-tail (cumulative) distribution function for the -distribution using [UTPC] given the value of x and the parameter . The definition of this function is, therefore, UTPC To use this function, we need the degrees of freedom, , and the value of the chi-square variable, x, i.e., UTPC( ,x).
  • Page 562: Inverse Cumulative Distribution Functions

    The calculator provides for values of the upper-tail (cumulative) distribution function for the F distribution, function UTPF, given the parameters N and D, and the value of F. The definition of this function is, therefore, UTPF For example, to calculate UTPF(10,5, 2.5) = 0.161834…...
  • Page 563 Exponential: For the Gamma and Beta distributions the expressions to solve will be more complicated due to the presence of integrals, i.e., Gamma, Beta, A numerical solution with the numerical solver will not be feasible because of the integral sign involved in the expression. However, a graphical solution is possible.
  • Page 564 “solutions” by evaluating function Y1(X) for X = -1.9 and X = 3.3, i.e., For the normal, Student’s t, Chi-square ( represented by functions UTPN, UTPT, UPTC, and UTPF in the calculator, the inverse cuff can be found by solving one of the following equations: Normal, p = 1 –...
  • Page 565 Notice that the second parameter in the UTPN function is 2, not representing the variance of the distribution. Also, the symbol (the lower-case Greek letter no) is not available in the calculator. You can use, for example, (gamma) instead of . The letter is available thought the character set (‚±).
  • Page 566 Thus, at this point, you will have the four equations available for solution. You needs just load one of the equations into the EQ field in the numerical solver and proceed with solving for one of the variables. Examples of the UTPT, UTPC, and UPTF are shown below: Notice that in all the examples shown above, we are working with p = P(X<x).
  • Page 567 With these four equations, whenever you launch the numerical solver you have the following choices: Examples of solution of equations EQNA, EQTA, EQCA, and EQFA are shown below: Page 17-18...
  • Page 568: Pre-Programmed Statistical Features

    Chapter 18 Statistical Applications In this Chapter we introduce statistical applications of the calculator including statistics of a sample, frequency distribution of data, simple regression, confidence intervals, and hypothesis testing. Pre-programmed statistical features The calculator provides pre-programmed statistical features that are accessible through the keystroke combination ‚Ù...
  • Page 569: Calculating Single-Variable Statistics

    , pressing the @ CHK@ soft menu key to select those Total Maximum Minimum measures that you want as output of this program. When ready, press @@@OK@@. The selected values will be listed, appropriately labeled, in the screen of your calculator. Page 18-2...
  • Page 570 The value labeled Total values of x, or x = n x. This is the value provided by the calculator under the heading . Other mean values used in certain applications are the Mean geometric mean, x , or the harmonic mean, x Variance: 0.929696969697...
  • Page 571 (n+1)/2. Although the pre-programmed statistical features of the calculator do not include the calculation of the median, it is very easily to write a program to calculate such quantity by working with lists.
  • Page 572: Obtaining Frequency Distributions

    The range of the sample is the difference between the maximum and minimum values of the sample. Since the calculator, through the pre-programmed statistical functions provides the maximum and minimum values of the sample, you can easily calculate the range.
  • Page 573 Definitions To understand the meaning of these parameters we present the following definitions: Given a set of n data values: {x order, it is often required to group these data into a series of classes by counting the frequency or number of values corresponding to each class. (Note: the calculators refers to classes as bins).
  • Page 574 This can be translated into a table as shown below. This table was prepared from the information we provided to generate the frequency distribution, although the only column returned by the calculator is the Frequency column (f by using ‚Ù˜ @@@OK@@@. The 2.
  • Page 575 Class Class < XB outlier k = 8 >XB outliers Given the (column) vector of frequencies generated by the calculator, you can obtain a cumulative frequency vector by using the following program in RPN mode: Bound. Class Frequency mark. below...
  • Page 576 « DUP SIZE 1 GET ‘cfreq(1,1)’ STO 2 k FOR j ‘cfreq(j-1,1) +freq(j,1)’ EVAL ‘cfreq (j,1)’ STO NEXT cfreq » » » Save it under the name CFREQ. Use this program to generate the list of cumulative frequencies (press @CFREQ with the column vector of frequencies in the stack).
  • Page 577: Fitting Data To A Function Y = F(X)

    Press @CANCEL to return to the previous screen. Change the V-view and Bar Width once more, now to read V-View: 0 30, Bar Width: 10. histogram, based on the same data set, now looks like this: A plot of frequency count, f polygon.
  • Page 578 First, enter the two rows of data into column in the variable DAT by using the matrix writer, and function STO . To access the program ‚Ù˜˜@@@OK@@@ The input form will show the current DAT, already loaded. If needed, change your set up screen to the following parameters for a linear fitting: To obtain the data fitting press @@OK@@.
  • Page 579 "Fit data" feature of the calculator. Linearized relationships Many curvilinear relationships "straighten out" to a linear form. For example, the different models for data fitting provided by the calculator can be linearized as described in the table below. Type of...
  • Page 580: Obtaining Additional Summary Statistics

    The general form of the regression equation is Best data fitting The calculator can determine which one of its linear or linearized relationship offers the best fitting for a set of (x,y) data points. We will illustrate the use of this feature with an example.
  • Page 581: Calculation Of Percentiles

    these options apply only when you have more than two X-Col, Y-Col: columns in the matrix column 1, and the y column is column 2. summary statistics that you can choose as results of this _ X _ Y… program by checking the appropriate field using [ CHK] when that field is selected.
  • Page 582: The Stat Soft Menu

    B. If n p is an integer, say k, calculate the mean of the k-th and (k-1) th ordered observations. Note: Integer rounding rule, for a non-integer x.yz…, if y x+1; if y < 5, round up to x. This algorithm can be implemented in the following program typed in RPN mode (See Chapter 21 for programming information): «...
  • Page 583: The Data Sub-Menu

    The DATA sub-menu The DATA sub-menu contains functions used to manipulate the statistics matrix DATA: The operation of these functions is as follows: + : add row in level 1 to bottom of DATA matrix. - : removes last row in DATA matrix and places it in level of 1 of the stack. The modified DATA matrix remains in memory.
  • Page 584: The 1Var Sub Menu

    PAR: shows statistical parameters. RESET: reset parameters to default values INFO: shows statistical parameters The MODL sub-menu within PAR This sub-menu contains functions that let you change the data-fitting model to LINFIT, LOGFIT, EXPFIT, PWRFIT or BESTFIT by pressing the appropriate button. The 1VAR sub menu The 1VAR sub menu contains functions that are used to calculate statistics of columns in the DATA matrix.
  • Page 585: The Fit Sub-Menu

    The functions included are: BARPL: produces a bar plot with data in Xcol column of the DATA matrix. HISTP: produces histogram of the data in Xcol column in the DATA matrix, using the default width corresponding to 13 bins unless the bin size is modified using function BINS in the 1VAR sub-menu (see above).
  • Page 586: Example Of Stat Menu Operations

    X^2 : provides the sum of squares of values in Xcol column. Y^2 : provides the sum of squares of values in Ycol column. X*Y: provides the sum of x y, i.e., the products of data in columns Xcol and Ycol.
  • Page 587 @) S TAT @) £ PAR @RESET L @) S TAT @PLOT @SCATR @STATL @CANCL Determine the fitting equation and some of its statistics: @) S TAT @) F IT@ @£LINE @@@LR@@@ 3 @PREDX 1 @PREDY @CORR @@COV@@ L@PCOV Obtain summary statistics for data in columns 1 and 2: @) S TAT @) S UMS: @@@£X@@ @@@£Y@@ @@£X2@...
  • Page 588 Fit data using columns 1 (x) and 3 (y) using a logarithmic fitting: L @) S TAT @) £ PAR 3 @YCOL @) M ODL @LOGFI L @) S TAT @PLOT @SCATR @STATL Obviously, the log-fit is not a good choice. @CANCL Select the best fitting by using: @) S TAT @£PAR @) M ODL @BESTF...
  • Page 589: Confidence Intervals

    L @) S TAT @PLOT @SCATR @STATL To return to STAT menu use: L@) S TAT To get your variable menu back use: J. Confidence intervals Statistical inference is the process of making conclusions about a population based on information from sample data. In order for the sample data to be meaningful, the sample must be random, i.e., the selection of a particular sample must have the same probability as that of any other possible sample out of a given population.
  • Page 590: Estimation Of Confidence Intervals

    Point estimation: when a single value of the parameter Confidence interval: a numerical interval that contains the parameter given level of probability. Estimator: rule or method of estimation of the parameter . Estimate: value that the estimator yields in a particular application. Example 1 -- Let X represent the time (hours) required by a specific manufacturing process to be completed.
  • Page 591 The parameter is known as the significance level. Typical values of 0.01, 0.05, 0.1, corresponding to confidence levels of 0.99, 0.95, and 0.90, respectively. Confidence intervals for the population mean when the population variance is known Let X be the mean of a random sample of size n, drawn from an infinite population with known standard deviation .
  • Page 592: Confidence Interval For A Proportion

    Small samples and large samples The behavior of the Student’s t distribution is such that for n>30, the distribution is indistinguishable from the standard normal distribution. Thus, for samples larger than 30 elements when the population variance is unknown, you can use the same confidence interval as when the population variance is known, but replacing with S.
  • Page 593: Confidence Intervals For Sums And Differences Of Mean Values

    Estimators for the mean and standard deviation of the difference and sum of the statistics S and S are given by: ˆ In these expressions, X samples taken from the two populations, and of the populations of the statistics S taken.
  • Page 594: Determining Confidence Intervals

    In this case, the centered confidence intervals for the sum and difference of the mean values of the populations, i.e., where -2 is the number of degrees of freedom in the Student’s t distribution. In the last two options we specify that the population variances, although unknown, must be equal.
  • Page 595 These options are to be interpreted as follows: 1. Z-INT: 1 .: Single sample confidence interval for the population mean, , with known population variance, or for large samples with unknown population variance. 2. Z-INT: .: Confidence interval for the difference of the population , with either known population variances, or for large means, samples with unknown population variances.
  • Page 596 Press @HELP to obtain a screen explaining the meaning of the confidence interval in terms of random numbers generated by a calculator. To scroll down the resulting screen use the down-arrow key ˜. Press @@@OK@@@ when done with the help screen. This will return you to the screen shown above.
  • Page 597 Determine the 99% confidence interval for the population proportion that would favor increasing taxes. Press ‚Ù—@@@OK@@@to access the confidence interval feature in the calculator. Press ˜˜ @@@OK@@@ to select option 3. Z-INT: 1 – 2.. Enter the following values: Page 18-30...
  • Page 598 2 shows 15 successes out of 100 trials. Press ‚Ù—@@@OK@@@ to access the confidence interval feature in the calculator. Press ˜˜˜@@@OK@@@ to select option 4. Z-INT: p1 – p2.. Enter the following values: When done, press @@@OK@@@. The results, as text and graph, are shown below:...
  • Page 599 5. The population’s standard deviation is unknown. Press ‚Ù—@@@OK@@@ to access the confidence interval feature in the calculator. Press — — @@@OK@@@ to select option 5. T-INT: . Enter the following values: When done, press @@@OK@@@. The results, as text and graph, are shown below: The figure shows the Student’s t pdf for...
  • Page 600: Confidence Intervals For The Variance

    These results assume that the values s deviations. If these values actually represent the samples’ standard deviations, you should enter the same values as before, but with the option selected. The results now become: Confidence intervals for the variance To develop a formula for the confidence interval for the variance, first we introduce the sampling distribution of the variance: Consider a random sample ..., X of independent normally-distributed variables with mean ,...
  • Page 601 The confidence interval for the population variance [(n-1) S where , and n-1, /2 degrees of freedom, exceeds with probabilities /2 and 1- The one-sided upper confidence limit for Example 1 – Determine the 95% confidence interval for the population variance based on the results from a sample of size n = 25 that indicates that the sample variance is s In Chapter 17 we use the numerical solver to solve the equation...
  • Page 602: Hypothesis Testing

    Hypothesis testing A hypothesis is a declaration made about a population (for instance, with respect to its mean). Acceptance of the hypothesis is based on a statistical test on a sample taken from the population. The consequent action and decision- making are called hypothesis testing.
  • Page 603: Errors In Hypothesis Testing

    Notes: 1. For the example under consideration, the alternate hypothesis H produces what is called a two-tailed test. If the alternate hypothesis is H > 0 or H < 0, then we have a one-tailed test. 2. The probability of rejecting the null hypothesis is equal to the level of significance, i.e., Pr[T R|H conditional probability of event A given that event B occurs.
  • Page 604: Inferences Concerning One Mean

    The value of , i.e., the probability of making an error of Type II, depends on , the sample size n, and on the true value of the parameter tested. Thus, the value of is determined after the hypothesis testing is performed. It is customary to draw graphs showing , or the power of the test (1- ), as a function of the true value of the parameter tested.
  • Page 605 Do not reject H if P-value > . The P-value for a two-sided test can be calculated using the probability functions in the calculator as follows: If using z, P-value = 2 UTPN(0,1,|z If using t, P-value = 2 UTPT( ,|t...
  • Page 606: Inferences Concerning Two Means

    Notice that the criteria are exactly the same as in the two-sided test. The main difference is the way that the P-value is calculated. The P-value for a one-sided test can be calculated using the probability functions in the calculator as follows:...
  • Page 607 values x and x , and standard deviations s standard deviations corresponding to the samples, > 30 and n > 30 (large samples), the test statistic to be used is If n < 30 or n < 30 (at least one small sample), use the following test statistic: Two-sided hypothesis If the alternative hypothesis is a two-sided hypothesis, i.e., H value for this test is calculated as...
  • Page 608: Paired Sample Tests

    The criteria to use for hypothesis testing is: Reject H if P-value < Do not reject H if P-value > . Paired sample tests When we deal with two samples of size n with paired data points, instead of testing the null hypothesis, H deviations of the two samples, we need to treat the problem as a single sample of the differences of the paired values.
  • Page 609: Testing The Difference Between Two Proportions

    where (z) is the cumulative distribution function (CDF) of the standard normal distribution (see Chapter 17). Reject the null hypothesis, H In other words, the rejection region is R = { |z region is A = {|z | < z One-tailed test If using a one-tailed test we will find the value of S , from Pr[Z>...
  • Page 610: Hypothesis Testing Using Pre-Programmed Features

    Reject the null hypothesis, H <p Hypothesis testing using pre-programmed features The calculator provides with hypothesis testing procedures under application 5. Hypoth. tests.. can be accessed by using ‚Ù—— @@@OK@@@. As with the calculation of confidence intervals, discussed earlier, this program...
  • Page 611 H Press ‚Ù—— @@@OK@@@ to access the hypothesis testing feature in the calculator. Press @@@OK@@@ to select option 1. Z-Test: 1 . Enter the following data and press @@@OK@@@: You are then asked to select the alternative hypothesis. Select press @@OK@@.
  • Page 612 , is not known. Press ‚Ù—— @@@OK@@@ to access the hypothesis testing feature in the calculator. Press ——@@@OK@@@ to select option 5. T-Test: 1 .: Enter the following data and press @@@OK@@@: > 150, and press @@@OK@@@. The result is:...
  • Page 613 = , against the alternative hypothesis, H < . Press ‚Ù—— @@@OK@@@ to access the hypothesis testing feature in the calculator. Press —@@@OK@@@ to select option 6. T-Test: .: Enter the following data and press @@@OK@@@: , and press @@@OK@@@. The result is...
  • Page 614: Inferences Concerning One Variance

    The test t value is t = -1.341776, with a P-value = 0.09130961, and critical t is –t = -1.659782. The graphical results are: These three examples should be enough to understand the operation of the hypothesis testing pre-programmed feature in the calculator. Inferences concerning one variance The null hypothesis to be tested is , H...
  • Page 615: Inferences Concerning Two Variances

    The test criteria are the same as in hypothesis testing of means, namely, Reject H if P-value < Do not reject H if P-value > . Please notice that this procedure is valid only if the population from which the sample was taken is a Normal population.
  • Page 616 The following table shows how to select the numerator and denominator for F depending on the alternative hypothesis chosen: ____________________________________________________________________ Alternative hypothesis ____________________________________________________________________ < (one-sided) > (one-sided) (two-sided) ___________________________________________________________________ (*) n is the value of n corresponding to the s corresponding to s ____________________________________________________________________ The P-value is calculated, in all cases, as: P-value = P(F>F...
  • Page 617: Additional Notes On Linear Regression

    Therefore, the F test statistics is F The P-value is P-value = P(F>F UTPF(20,30,1.44) = 0.1788… Since 0.1788… > 0.05, i.e., P-value > , therefore, we cannot reject the null hypothesis that H Additional notes on linear regression In this section we elaborate the ideas of linear regression presented earlier in the chapter and present a procedure for hypothesis testing of regression parameters.
  • Page 618 This is a system of linear equations with a and b as the unknowns, which can be solved using the linear equation features of the calculator. There is, however, no need to bother with these calculations because you can use the 3.
  • Page 619: Prediction Error

    From which it follows that the standard deviations of x and y, and the covariance of x,y are given, respectively, by Also, the sample correlation coefficient is In terms of x, y, S Prediction error The regression curve of Y on x is defined as Y = of n data points (x where Y = independent, normally distributed random variables with mean (...
  • Page 620 Confidence limits for regression coefficients: For the slope ( ): b For the intercept ( ): [(1/n)+ x n-2, /2 , where t follows the Student’s t distribution with of freedom, and n represents the number of points in the sample. Hypothesis testing on the slope, Null hypothesis, H .
  • Page 621 Procedure for inference statistics for linear regression using the calculator 1) Enter (x,y) as columns of data in the statistical matrix DAT. 2) Produce a scatterplot for the appropriate columns of appropriate H- and V-VIEWS to check linear trend. 3) Use ‚Ù˜˜@@@OK@@@, to fit straight line, and get a, b, s (Covariance), and r 4) Use ‚Ù˜@@@OK@@@,...
  • Page 622 These results are interpreted as a = -0.86, b = 3.24, r and s = 2.025. The correlation coefficient is close enough to 1.0 to confirm the linear trend observed in the graph. From the Single-var… 0.790569415042, y = 8.86, s Next, with n = 5, calculate Confidence intervals for the slope ( ) and intercept (A): First, we obtain t...
  • Page 623 Example 2 -- Suppose that the y-data used in Example 1 represent the elongation (in hundredths of an inch) of a metal wire when subjected to a force x (in tens of pounds). intercept, A, to be zero. hypothesis, H = , against the alternative hypothesis, H of significance = 0.05.
  • Page 624: Multiple Linear Fitting

    Multiple linear fitting Consider a data set of the form 1,m-1 Suppose that we search for a data fitting of the form y = b + … + b . You can obtain the least-square approximation to the values of the coefficients b = [b matrix X: Then, the vector of coefficients is obtained from b = (X the vector y = [y...
  • Page 625 = -2.1649–0.7144 x You should have in your calculator’s stack the value of the matrix X and the vector b, the fitted values of y are obtained from y = X b, thus, just press * to obtain: [5.63.., 8.25.., 5.03.., 8.22.., 9.45..].
  • Page 626: Polynomial Fitting

    Compare these fitted values with the original data as shown in the table below: 1.20 2.50 3.50 4.00 6.00 Polynomial fitting Consider the x-y data set {(x to fit a polynomial or order p to this data set. In other words, we seek a fitting of the form y = b least-square approximation to the values of the coefficients b = [b …...
  • Page 627 If p > n-1, then add columns n+1, …, p-1, p+1, to V In step 3 from this list, we have to be aware that column i (i= n+1, n+2, …, p+1) is the vector [x rather than a vector, i.e., x = { x sequence { x …...
  • Page 628 « x y p « x SIZE « x VANDERMONDE IF ‘p<n-1’ THEN p 2 + FOR j j COL DROP -1 STEP ELSE IF ‘p>n-1’ THEN n 1 + p 1 + FOR j x j ^ ARRY j COL+ NEXT y OBJ ARRY...
  • Page 629: Selecting The Best Fitting

    Because we will be using the same x-y data for fitting polynomials of different orders, it is advisable to save the lists of data values x and y into variables xx and yy, respectively. This way, we will not have to type them all over again in each application of the program POLY.
  • Page 630 The correlation coefficient, r. This value is constrained to the range –1 < r < 1. The closer r is to +1 or –1, the better the data fitting. The sum of squared errors, SSE. This is the quantity that is to be minimized by least-square approach.
  • Page 631 x VANDERMONDE IF ‘p<n-1’ THEN p 2 + FOR j j COL DROP -1 STEP ELSE IF ‘p>n-1’ THEN n 1 + p 1 + FOR j x j ^ ARRY j COL+ NEXT y OBJ ARRY X yv « X yv MTREG «...
  • Page 632 “SSE” » » » » » Save this program under the name POLYR, to emphasize calculation of the correlation coefficient r. Using the POLYR program for values of p between 2 and 6 produce the following table of values of the correlation coefficient, r, and the sum of square errors, SSE: While the correlation coefficient is very close to 1.0 for all values of p in the table, the values of SSE vary widely.
  • Page 633: The Base Menu

    + 1 2 The BASE menu While the calculator would typically be operated using the decimal system, you can produce calculations using the binary, octal, or hexadecimal system. Many of the functions for manipulating number systems other than the decimal system are available in the BASE menu, accessible through ‚ã(the 3...
  • Page 634: Functions Hex, Dec, Oct, And Bin

    DEC(imal), OCT(al), or BIN(ary). For example, if @HEX is selected, any number written in the calculator that starts with # will be a hexadecimal number. Thus, you can write numbers such as #53, #A5B, etc. in this system. As different systems are selected, the numbers will be automatically converted to the new current base.
  • Page 635: Conversion Between Number Systems

    As the decimal (DEC) system has 10 digits (0,1,2,3,4,5,6,7,8,9), the hexadecimal (HEX) system has 16 digits (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F), the octal (OCT) system has 8 digits (0,1,2,3,4,5,6,7), and the binary (BIN) system has only 2 digits (0,1). Conversion between number systems Whatever the number system selected, it is referred to as the binary system for the purpose of using the functions R B and B R.
  • Page 636: Operations With Binary Integers

    The only effect of selecting the DECimal system is that decimal numbers, when started with the symbol #, are written with the suffix d. Wordsize The wordsize is the number of bits in a binary object. By default, the wordsize is 64 bites.
  • Page 637: The Logic Menu

    The LOGIC menu The LOGIC menu, available through the BASE (‚ã) provides the following functions: The functions AND, OR, XOR (exclusive OR), and NOT are logical functions. The input to these functions are two values or expressions (one in the case of NOT) that can be expressed as binary logical results, i.e., 0 or 1.
  • Page 638: The Bit Menu

    AND (BIN) XOR (BIN) The BIT menu The BIT menu, available through the BASE (‚ã) provides the following functions: Functions RL, SL, ASR, SR, RR, contained in the BIT menu, are used to manipulate bits in a binary integer. The definition of these functions are shown below: Rotate Left one bit, e.g., #1100b Shift Left one bit, e.g., #1101b...
  • Page 639: The Byte Menu

    The BYTE menu The BYTE menu, available through the BASE (‚ã) provides the following functions: Functions RLB, SLB, SRB, RRB, contained in the BIT menu, are used to manipulate bits in a binary integer. The definition of these functions are shown below: RLB: Rotate Left one byte, e.g., #1100b SLB: Shift Left one byte, e.g., #1101b...
  • Page 640: Customizing Menus

    Chapter 20 Customizing menus and keyboard Through the use of the many calculator menus you have become familiar with the operation of menus for a variety of applications. Also, you are familiar with the many functions available by using the keys in the keyboard, whether through their main function, or by combining them with the left-shift („), right-...
  • Page 641: Menu Numbers (Rclmenu And Menu Functions)

    Menu numbers (RCLMENU and MENU functions) Each pre-defined menu has a number attached to it. For example, suppose that you activate the MTH menu („´). Then, using the function catalog (‚N) find function RCLMENU and activate it. In ALG mode simple press ` after RCLMENU() shows up in the screen.
  • Page 642 “EXP(“. We need not worry about the closing parenthesis, because the calculator will complete the parentheses before executing the function. The implementation of function TMENU in ALG mode with the argument list shown above is as follows.
  • Page 643: Menu Specification And Cst Variable

    ALG mode versus RPN mode. In RPN mode, the menu key action can be simply a calculator command (e.g., EXP, LN, etc., as shown above), while in ALG mode it has to be a string with the command prompt whose argument needs to be provided by the user before pressing ` and completing the command.
  • Page 644: Customizing The Keyboard

    Customizing the keyboard Each key in the keyboard can be identified by two numbers representing their row and column. For example, the VAR key (J) is located in row 3 of column 1, and will be referred to as key 31. Now, since each key has up to ten functions associated with it, each function is specified by decimal digits between 0 and 1, according to the following specifications: .0 or 1, unshifted key...
  • Page 645: Recall Current User-Defined Key List

    Suppose that you want to have access to the old-fashioned PLOT command first introduced with the HP 48G series calculator, but currently not directly available from the keyboard. The menu number for this menu is 81.01. You can see this menu active by using ALG mode: MENU(81.01)
  • Page 646: Operating User-Defined Keys

    Operating user-defined keys To operate this user-defined key, enter „Ì before pressing the C key. Notice that after pressing „Ì the screen shows the specification 1USR in the second display line. Pressing for „Ì C for this example, you should recover the PLOT menu as follows: If you have more than one user-defined key and want to operate more than one of them at a time, you can lock the keyboard in USER mode by entering „Ì„Ì...
  • Page 647 To un-assign all user-defined keys use: ALG mode: DELKEYS(0) RPN mode: 0 DELKEYS Check that the user-key definitions were removed by using function RCLKEYS. Page 20-8...
  • Page 648: An Example Of Programming

    CRMT, used to create a matrix out of a number of lists, were presented in Chapter 10). In this section we present a simple program to introduce concepts related to programming the calculator. The program we will write will be used to define the function f(x) = sinh(x)/(1+x (i.e., x can be a list of numbers, as described in Chapter 8).
  • Page 649: Global And Local Variables And Subprograms

    „´ @LIST @ADD@ ~„x™ „°@) @ MEM@@ @) @ DIR@@ @PURGE _______________________ To save the program use: [']~„gK Press J to recover your variable menu, and evaluate g(3.5) by entering the value of the argument in level 1 (3.5`) and then pressing @@@g@@@. The result is 1.2485…, i.e., g(3.5) = 1.2485.
  • Page 650 The variable x in the last version of the program never occupies a place among the variables in your variable menu. It is operated upon within the calculator memory without affecting any similarly named variable in your variable menu.
  • Page 651: Global Variable Scope

    « When done editing the program press ` . The modified program is stored back into variable @@g@@. Global Variable Scope Any variable that you define in the HOME directory or any other directory or sub-directory will be considered a global variable from the point of view of program development.
  • Page 652: The Prg Menu

    All these rule may sound confusing for a new calculator user. They all can be simplified to the following suggestion: Create directories and sub-directories with meaningful names to organize your data, and make sure you have all the global variables you need within the proper sub-directory.
  • Page 653: Navigating Through Rpn Sub-Menus

    Functions for the manipulation of graphic objects PICT: Functions for drawing pictures in the graphics screen CHARS: Functions for character string manipulation MODES: Functions for modifying calculator modes FMT: To change number formats, comma format ANGLE: To change angle measure and coordinate systems...
  • Page 654: Functions Listed By Sub-Menu

    Functions listed by sub-menu The following is a listing of the functions within the PRG sub-menus listed by sub- menu. STACK MEM/DIR PURGE SWAP DROP OVER PATH CRDIR UNROT PGDIR ROLL VARS ROLLD TVARS PICK ORDER UNPICK MEM/ARITH BRCH/START PICK3 DEPTH STO+ DUP2...
  • Page 655 LIST/ELEM GROB GROB GETI BLANK PUTI GXOR SIZE REPL HEAD TAIL SIZE LIST/PROC ANIMATE TAIL DOLIST DOSUB PICT NSUB PICT ENDSUB PDIM STREAM LINE REVLIST TLINE SORT PIXON PIXOF PIX? PVIEW PX C C PX CHARS MODES/FLAG REPL SIZE FS?C FS?C FC?C STOF...
  • Page 656 Within the BRCH sub-menu, pressing the left-shift key („) or the right- shift key (‚) before pressing any of the sub-menu keys, will create constructs related to the sub-menu key chosen. This only works with the calculator in RPN mode. Examples are shown below: ERROR DOERR...
  • Page 657: Keystroke Sequence For Commonly Used Commands

    „ @) @ IF@@ „ @) @ IF@@ „ @) S TART „ @) S TART „ @) @ @DO@@ Notice that the insert prompt ( ) is available after the key word for each construct so you can start typing at the right location. Keystroke sequence for commonly used commands The following are keystroke sequences to access commonly used commands for numerical programming within the PRG menu.
  • Page 658 @) S TACK SWAP DROP @) @ MEM@@ @) @ DIR@@ PURGE ORDER @) @ BRCH@ @) @ IF@@ THEN ELSE @) @ BRCH@ @) C ASE@ CASE THEN @) @ BRCH@ @) S TART START NEXT STEP @) @ BRCH@ @) @ FOR@ NEXT STEP @) @ BRCH@ @) @ @DO@@...
  • Page 659 @) @ BRCH@ @) W HILE@ WHILE REPEAT @) T EST@ SAME FS?C FC?C @) T YPE@ ARRY LIST TYPE @) L IST@ @) E LEM@ GETI PUTI SIZE HEAD TAIL „°@) @ BRCH@ @) W HILE@ @WHILE „°) @ BRCH@ @) W HILE@ @REPEA „°) @ BRCH@ @) W HILE@ @@END@ „°...
  • Page 660: Programs For Generating Lists Of Numbers

    Please notice that the functions in the PRG menu are not the only functions that can be used in programming. As a matter of fact, almost all functions in the calculator can be included in a program. Thus, you can use, for example, „°@) L IST@ @) P ROC@ @REVLI@ „°@) L IST@ @) P ROC@ L @SORT@...
  • Page 661 functions from the MTH menu. Specifically, you can use functions for list operations such as SORT, LIST, etc., available through the MTH/LIST menu. As additional programming exercises, and to try the keystroke sequences listed above, we present herein three programs for creating or manipulating lists. The program names and listings are as follows: LISC: «...
  • Page 662: Examples Of Sequential Programming

    Examples of sequential programming In general, a program is any sequence of calculator instructions enclosed between the program containers part of a program. The examples presented previously in this guide (e.g., in Chapters 3 and 8) 6 can be classified basically into two types: (a) programs generated by defining a function;...
  • Page 663 where C is a constant that depends on the system of units used [C units of the International System (S.I.), and C System (E.S.)], n is the Manning’s resistance coefficient, which depends on the type of channel lining and other factors, y channel bed slope given as a dimensionless fraction.
  • Page 664: Programs That Simulate A Sequence Of Stack Operations

    /s), b = 3 ft, and y = 2 ft, we would use: h = 23 /(2 32.2 (3 2) ). Using the RPN modethe calculator, interactively, we can calculate this quantity as: 2`3*„º32.2* 2*23„º™/ Resulting in 0.228174, or h = 0.228174.
  • Page 665 Note: When entering the program do not use the keystroke ™, instead use the keystroke sequence: „°@) S TACK @SWAP@. Unlike the interactive use of the calculator performed earlier, we need to do some swapping of stack levels 1 and 2 within the program. To write the program, we use, therefore: ‚å...
  • Page 666: Interactive Input In Programs

    Note: SQ is the function that results from the keystroke sequence „º. Save the program into a variable called hv: A new variable @@@hv@@@ should be available in your soft key menu. (Press J to see your variable list.) The program left in the stack can be evaluated by using function EVAL.
  • Page 667 One way to check the result of the program as a formula is to enter symbolic variables, instead of numeric results, in the stack, and let the program operate on those variables. For this approach to be effective the calculator’s CAS (Calculator Algebraic System) must be set to modes.
  • Page 668: Prompt With An Input String

    which indicates the position of the different stack input levels in the formula. By comparing this result with the original formula that we programmed, i.e., we find that we must enter y in stack level 1 (S1), b in stack level 2 (S2), g in stack level 3 (S3), and Q in stack level 4 (S4).
  • Page 669: A Function With An Input String

    The calculator provides functions for debugging programs to identify logical errors during program execution as shown below. Debugging the program To figure out why it did not work we use the DBUG function in the calculator as follows: ³@FUNCa ` „°LL @) @ RUN@ @@DBG@...
  • Page 670 Let’s kill the debugger at this point since we already know the result we will get. To kill the debugger press @KILL. You receive an acknowledging killing the debugger. Press $to recover normal calculator display. Note: In debugging mode, every time we press @SST @ the top left corner of the display shows the program step being executed.
  • Page 671: Input String For Two Or Three Input Values

    Fixing the program The only possible explanation for the failure of the program to produce a numerical result seems to be the lack of the command algebraic expression ‘2*a^2+3’. Let’s edit the program by adding the missing EVAL function. The program, after editing, should read as follows: “Enter a: “...
  • Page 672 Input string program for two input values The input string program for two input values, say a and b, looks as follows: “Enter a and b: “ {“ :a: :b: “ {2 0} V } INPUT OBJ » « This program can be easily created by modifying the contents of INPTa. Store this program into variable INPT2.
  • Page 673 `. The result is 49887.06_J/m^3. The units of J/m^3 are equivalent to Pascals (Pa), the preferred pressure unit in the S.I. system. Note: because we deliberately included units in the function definition, the input values must have units attach to them in input to produce the proper result. Input string program for three input values The input string program for three input values, say a ,b, and c, looks as follows:...
  • Page 674: Input Through Input Forms

    Enter values of V = 0.01_m^3, T = 300_K, and n = 0.8_mol. Before pressing `, the stack will look like this: Press ` to get the result 199548.24_J/m^3, or 199548.24_Pa = 199.55 kPa. Input through input forms Function INFORM („°L@) @ @IN@@ @INFOR@.) can be used to create detailed input forms for a program.
  • Page 675 The lists in items 4 and 5 can be empty lists. Also, if no value is to be selected for these options you can use the NOVAL command („°L@) @ @IN@@ @NOVAL@). After function INFORM is activated you will get as a result either a zero, in case the @CANCEL option is entered, or a list with the values entered in the fields in the order specified and the number 1, i.e., in the RPN stack: Thus, if the value in stack level 1 is zero, no input was performed, while it this...
  • Page 676 3. Field format information: { } (an empty list, thus, default values used) 4. List of reset values: { 120 1 .0001} 5. List of initial values: { 110 1.5 .00001} Save the program into variable INFP1. Press @INFP1 to run the program. The input form, with initial values loaded, is as follows: To see the effect of resetting these values use L @RESET (select Reset all to reset field values):...
  • Page 677 Thus, we demonstrated the use of function INFORM. To see how to use these input values in a calculation modify the program as follows: « “ CHEZY’S EQN” { { “C:” “Chezy’s coefficient” 0} { “R:” “Hydraulic radius” 0 } { “S:” “Channel bed slope” 0} } { } { 120 1 .0001} { 110 1.5 .00001 } ‘C*(R*S)’...
  • Page 678: Creating A Choose Box

    « “ CHEZY’S EQN” { { “C:” “Chezy’s coefficient” 0} { “R:” “Hydraulic radius” 0 } { “S:” “Channel bed slope” 0} } { 2 1 } { 120 1 .0001} { 110 1.5 .00001 } DROP “Operation cancelled” MSGBOX END » Running program @INFP2 produces the following input form: Example 3 –...
  • Page 679 Activation of the CHOOSE function will return either a zero, if a @CANCEL action is used, or, if a choice is made, the choice selected (e.g., v) and the number 1, i.e., in the RPN stack: Example 1 – Manning’s equation for calculating the velocity in an open channel flow includes a coefficient, C used.
  • Page 680: Identifying Output In Programs

    commands “Operation cancelled” MSGBOX will show a message box indicating that the operation was cancelled. Identifying output in programs The simplest way to identify numerical program output is to “tag” the program results. A tag is simply a string attached to a number, or to any object. The string will be the name associated with the object.
  • Page 681: Examples Of Tagged Output

    Note: For mathematical operations with tagged quantities, the calculator will "detag" the quantity automatically before the operation. For example, the left- hand side figure below shows two tagged quantities before and after pressing the * key in RPN mode: Examples of tagged output Example 1 –...
  • Page 682 “Enter a: “ {“ :a: “ {2 0} V } INPUT OBJ « (Recall that the function SWAP is available by using „°@) S TACK @SWAP@). Store the program back into FUNCa by using „ @FUNCa. Next, run the program by pressing @FUNCa . Enter a value of 2 when prompted, and press `.
  • Page 683 Example 3 – tagging input and output from function p(V,T) In this example we modify the program @@@p@@@ so that the output tagged input values and tagged result. Use ‚@@@p@@@ to recall the contents of the program to the stack: “Enter V, T, and n:“...
  • Page 684: Using A Message Box

    Using a message box A message box is a fancier way to present output from a program. The message box command in the calculator is obtained by using „°L@) @ OUT@ @MSGBO@. The message box command requires that the output string to be placed in the box be available in stack level 1.
  • Page 685 The result is the following message box: Press @@@OK@@@ to cancel the message box. You could use a message box for output from a program by using a tagged output, converted to a string, as the output string for MSGBOX. To convert any tagged result, or any algebraic or non-tagged value, to a string, use the STR available at „°@) T YPE@ @ STR.
  • Page 686 Press @@@OK@@@ to cancel message box output. The stack will now look like this: Including input and output in a message box We could modify the program so that not only the output, but also the input, is included in a message box. For the case of program @@@p@@@, the modified program will look like: “Enter V, T and n: “...
  • Page 687 You will notice that after typing the keystroke sequence ‚ë a new line is generated in the stack. The last modification that needs to be included is to type in the plus sign three times after the call to the function at the very end of the sub-program. Note: The plus sign (+) in this program is used to concatenate strings.
  • Page 688 Note: I’ve separated the program arbitrarily into several lines for easy reading. This is not necessarily the way that the program shows up in the calculator’s stack. The sequence of commands is correct, however. Also, recall that the character new line.
  • Page 689 2. ‘1_m^3’ 3. * 4. T ‘1_K’ * 5. n ‘1_mol’ * V T n To see this version of the program in action do the following: Store the program back into variable p by using [ ][ p ]. Run the program by pressing [ p ].
  • Page 690: Relational And Logical Operators

    Press @@@OK@@@ to cancel message box output. Message box output without units Let’s modify the program @@@p@@@ once more to eliminate the use of units throughout it. The unit-less program will look like this: “Enter V,T,n [S.I.]: “ {“ « INPUT OBJ V T n «...
  • Page 691 Depending on the actual numbers used, such a statement can be true (represented by the numerical value of 1. in the calculator), or false (represented by the numerical value of 0. in the calculator).
  • Page 692: Logical Operators

    Logical operators Logical operators are logical particles that are used to join or modify simple logical statements. The logical operators available in the calculator can be easily accessed through the keystroke sequence: „° @) T EST@ L. The available logical operators are: AND, OR, XOR (exclusive or), NOT, and SAME.
  • Page 693: Program Branching

    The calculator includes also the logical operator SAME. This is a non-standard logical operator used to determine if two objects are identical. If they are identical, a value of 1 (true) is returned, if not, a value of 0 (false) is returned.
  • Page 694: Branching With If

    Branching with IF In this section we presents examples using the constructs IF…THEN…END and IF…THEN…ELSE…END. The IF…THEN…END construct The IF…THEN…END is the simplest of the IF program constructs. The general format of this construct is: IF logical_statement THEN program_statements END. The operation of this construct is as follows: 1.
  • Page 695 With the cursor in front of the IF statement prompting the user for the logical statement that will activate the IF construct when the program is executed. Example: Type in the following program: IF ‘x<3’ THEN ‘x^2‘ EVAL END ”Done” MSGBOX » » «...
  • Page 696 ELSE program_statements_if_false In designing a calculator program that includes IF constructs, you could start by writing by hand the pseudo-code for the IF constructs as shown above. For example, for program @@@f2@@@, you could write and verify that variable @@@f2@@@ is 1.2 @@@f2@@@ Result: 1.44...
  • Page 697 IF x<3 THEN ELSE While this simple construct works fine when your function has only two branches, you may need to nest IF…THEN…ELSE…END constructs to deal with function with three or more branches. Here is a possible way to evaluate this function using IF… THEN … ELSE … END constructs: IF x<3 THEN ELSE...
  • Page 698: The Case Construct

    A complex IF construct like this is called a set of nested IF … THEN … ELSE … END constructs. A possible way to evaluate f3(x), based on the nested IF construct shown above, is to write the program: IF ‘x<3‘ THEN ‘x^2‘ ELSE IF ‘x<5‘ THEN ‘1-x‘ ELSE IF «...
  • Page 699 program_statements, and passes program flow to the statement following the END statement. The CASE, THEN, and END statements are available for selective typing by using „°@) @ BRCH@ @) C ASE@ . If you are in the BRCH menu, i.e., („°@) @ BRCH@ ) you can use the following shortcuts to type in your CASE construct (The location of the cursor is indicated by the symbol „@) C ASE@: Starts the case construct providing the prompts: CASE...
  • Page 700: Program Loops

    @@f3c@ @@f3c@ @@f3c@ As you can see, f3c produces exactly the same results as f3. The only difference in the programs is the branching constructs used. For the case of function f (x), which requires five expressions for its definition, the CASE construct may be easier to code than a number of nested IF …...
  • Page 701 Commands involved in the START construct are available through: Within the BRCH menu („°@) @ BRCH@) the following keystrokes are available to generate START constructs (the symbol indicates cursor position): „ @START: Starts the START…NEXT construct: START ‚ @START: Starts the START…STEP construct: START The START…NEXT construct The general form of this statement is: start_value end_value START program_statements NEXT...
  • Page 702 1. This program needs an integer number as input. Thus, before execution, that number (n) is in stack level 1. The program is then executed. 2. A zero is entered, moving n to stack level 2. 3. The command DUP, which can be typed in as ~~dup~, copies the contents of stack level 1, moves all the stack levels upwards, and places the copy just made in stack level 1.
  • Page 703 „°LL @) @ RUN@ @@DBG@ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ --- loop execution number 1 for k = 0 @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @...
  • Page 704 @SST @ @SST @ @SST @ @SST @ --- loop execution number 3 for k = 2 @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ @SST @ --- for n = 2, the loop index is exhausted and control is passed to the statement following NEXT @SST @...
  • Page 705 3 @@@S1@@ Result: S:14 5 @@@S1@@ Result: S:55 10 @@@S1@@ Result: S:385 30 @@@S1@@ Result: S:9455 The START…STEP construct The general form of this statement is: start_value end_value START program_statements increment NEXT The start_value, end_value, and increment of the loop index can be positive or negative quantities.
  • Page 706: The For Construct

    J1 # 1.5 # 0.5 ` [ ‘ ] @GLIST ` „°LL @) @ RUN@ @@DBG@ Use @SST @ to step into the program and see the detailed operation of each command. The FOR construct As in the case of the START command, the FOR command has two variations: the FOR…NEXT construct, for loop index increments of 1, and the FOR…STEP construct, for loop index increments selected by the user.
  • Page 707 To avoid an infinite loop, make sure that start_value < end_value. Example – calculate the summation S using a FOR…NEXT construct The following program calculates the summation Using a FOR…NEXT loop: 0 n FOR k k SQ S + ‘S‘ STO NEXT S “S” «...
  • Page 708: The Do Construct

    Example – generate a list of numbers using a FOR…STEP construct Type in the program: « « xs xe dx xe xs – dx / ABS 1. + LIST » » » dx STEP n and store it in variable @GLIS2. Check out that the program call produces the list {0.5 1.
  • Page 709 The following program calculates the summation Using a DO…UNTIL…END loop: DO n SQ S + ‘S‘ STO n 1 – ‘n‘ STO UNTIL ‘n<0‘ END « « S “S” TAG » » Store this program in a variable @@S3@@. Verify the following exercises: J 3 @@@S3@@ Result: S:14 5 @@@S3@@...
  • Page 710: The While Construct

    The WHILE construct The general structure of this command is: WHILE logical_statement REPEAT program_statements END The WHILE statement will repeat the program_statements while logical_statement is true (non zero). If not, program control is passed to the statement right after END. The program_statements must include a loop index that gets modified before the logical_statement is checked at the beginning of the next repetition.
  • Page 711: Errors And Error Trapping

    DOERR This function executes an user-define error, thus causing the calculator to behave as if that particular error has occurred. The function can take as argument either an integer number, a binary integer number, an error message, or the number zero (0).
  • Page 712: Sub-Menu Iferr

    If you enter “TRY AGAIN” ` @DOERR, produces the following message: TRY AGAIN Finally, 0` @DOERR, produces the message: Interrupted ERRN This function returns a number representing the most recent error. For example, if you try 0Y$@ERRN, you get the number #305h. This is the binary integer representing the error: Infinite Result ERRM This function returns a character string representing the error message of the...
  • Page 713 These are the components of the IFERR … THEN … END construct or of the IFERR … THEN … ELSE … END construct. Both logical constructs are used for trapping errors during program execution. Within the @) E RROR sub-menu, entering „@) I FERR, or ‚@) I FERR, will place the IFERR structure components in the stack, ready for the user to fill the missing terms, i.e., The general form of the two error-trapping constructs is as follows:...
  • Page 714: User Rpl Programming In Algebraic Mode

    User RPL programming in algebraic mode While all the programs presented earlier are produced and run in RPN mode, you can always type a program in User RPL when in algebraic mode by using function RPL>. This function is available through the command catalog. As an example, try creating the following program in algebraic mode, and store it into variable P2: X ‘2.5-3*X^2’...
  • Page 715 Whereas, using RPL, there is no problem when loading this program in algebraic mode: Page 21-68...
  • Page 716: The Plot Menu

    Chapter 22 Programs for graphics manipulation This chapter includes a number of examples showing how to use the calculator’s functions for manipulating graphics interactively or through the use of programs. As in Chapter 21 we recommend using RPN mode and setting system flag 117 to SOFT menu labels.
  • Page 717: Description Of The Plot Menu

    This section will be more like a tour of the contents of PLOT as they relate to the different type of graphs available in the calculator. To activate a user defined key you need to press „Ì (same as the ~ key) before pressing the key or keystroke combination of interest.
  • Page 718 LABEL (10) The function LABEL is used to label the axes in a plot including the variable names and minimum and maximum values of the axes. The variable names are selected from information contained in the variable PPAR. AUTO (11) The function AUTO (AUTOscale) calculates a display range for the y-axis or for both the x- and y-axes in two-dimensional plots according to the type of plot defined in PPAR.
  • Page 719 EQ (3) The variable name EQ is reserved by the calculator to store the current equation in plots or solution to equations (see chapter …). The soft menu key labeled EQ in this menu can be used as it would be if you have your variable menu available, e.g., if you press [ EQ ] it will list the current contents of that variable.
  • Page 720 Note: the SCALE commands shown here actually represent SCALE, SCALEW, SCALEH, in that order. The following diagram illustrates the functions available in the PPAR menu. The letters attached to each function in the diagram are used for reference purposes in the description of the functions shown below. INFO (n) and PPAR (m) If you press @INFO, or enter ‚...
  • Page 721 INDEP (a) The command INDEP specifies the independent variable and its plotting range. These specifications are stored as the third parameter in the variable PPAR. The default value is 'X'. The values that can be assigned to the independent variable specification are: A variable name, e.g., 'Vel' A variable name in a list, e.g., { Vel } A variable name and a range in a list, e.g., { Vel 0 20 }...
  • Page 722 CENTR (g) The command CENTR takes as argument an ordered pair (x,y) or a value x, and adjusts the first two elements in the variable PPAR, i.e., (x ), so that the center of the plot is (x,y) or (x,0), respectively. SCALE (h) The SCALE command determines the plotting scale represented by the number of user units per tick mark.
  • Page 723 A list of two binary integers {#n #m}: sets the tick annotations in the x- and y- axes to #n and #m pixels, respectively. AXES (k) The input value for the axes command consists of either an ordered pair (x,y) or a list {(x,y) atick "x-axis label"...
  • Page 724 The PTYPE menu within 3D (IV) The PTYPE menu under 3D contains the following functions: These functions correspond to the graphics options Slopefield, Wireframe, Y- Slice, Ps-Contour, Gridmap and Pr-Surface presented earlier in this chapter. Pressing one of these soft menu keys, while typing a program, will place the corresponding function call in the program.
  • Page 725 XVOL (N), YVOL (O), and ZVOL (P) These functions take as input a minimum and maximum value and are used to specify the extent of the parallelepiped where the graph will be generated (the viewing parallelepiped). These values are stored in the variable VPAR. The default values for the ranges XVOL, YVOL, and ZVOL are –1 to 1.
  • Page 726 The STAT menu within PLOT The STAT menu provides access to plots related to statistical analysis. Within this menu we find the following menus: The diagram below shows the branching of the STAT menu within PLOT. The numbers and letters accompanying each function or menu are used for reference in the descriptions that follow the figure.
  • Page 727 The PTYPE menu within STAT (I) The PTYPE menu provides the following functions: These keys correspond to the plot types Bar (A), Histogram (B), and Scatter(C), presented earlier. Pressing one of these soft menu keys, while typing a program, will place the corresponding function call in the program. Press @) S TAT to get back to the STAT menu.
  • Page 728 XCOL (H) The command XCOL is used to indicate which of the columns of DAT, if more than one, will be the x- column or independent variable column. YCOL (I) The command YCOL is used to indicate which of the columns of DAT, if more than one, will be the y- column or dependent variable column.
  • Page 729: Generating Plots With Programs

    The commands shown in the previous section help you in setting up such variables. Following we describe the general format for the variables necessary to produce the different types of plots available in the calculator. Two-dimensional graphics The two-dimensional graphics generated by functions, namely, Function, Conic,...
  • Page 730: The Variable Eq

    Three-dimensional graphics The three-dimensional graphics available, namely, options Slopefield, Wireframe, Y-Slice, Ps-Contour, Gridmap and Pr-Surface, use the VPAR variable with the following format: left right near These pairs of values of x, y, and z, represent the following: Dimensions of the view parallelepiped (x high Range of x and y independent variables (x Location of viewpoint (x...
  • Page 731 Return to PLOT menu Erase picture, draw axes, labels Draw function and show picture Removes menu labels Returns to normal calculator display Get PLOT menu Select PARAMETRIC as the plot type Define complex function X+iY Store complex function into EQ Show plot parameters Define ‘t’...
  • Page 732: Examples Of Program-Generated Plots

    Axes definition list Define axes center, ticks, labels Return to PLOT menu Erase picture, draw axes, labels Draw function and show picture Remove menu labels Return to normal calculator display Activate the PLOT menu before you start typing the Page 22-17...
  • Page 733 « {PPAR EQ} PURGE ‘ r’ STEQ ‘r’ INDEP ‘s’ DEPND FUNCTION { (0.,0.) {.4 .2} “Rs” “Sr” } AXES –1. 5. XRNG –1. 5. YRNG ERASE DRAW DRAX LABEL PICTURE » Store the program in variable PLOT1. To run it, press J, if needed, then press @PLOT1.
  • Page 734: Drawing Commands For Use In Programming

    Example 3 – A polar plot. Enter the following program: « RAD {PPAR EQ} PURGE ‘1+SIN( )’ STEQ 0. 6.29} INDEP ‘Y’ DEPND POLAR { (0.,0.) {.5 .5} “x” “y”} AXES –3. 3. XRNG –.5 2.5 YRNG ERASE DRAW DRAX LABEL PICTURE »...
  • Page 735 The maximum width of PICT is 2048 pixels, with no restriction on the maximum height. A pixel is each one of the dots in the calculator’s screen that can be turned on (dark) or off (clear) to produce text or graphs.
  • Page 736: Pix?, Pixon, And Pixoff

    This command takes as input two ordered pairs (x pixel coordinates {#n represented by the two pairs of coordinates in the input. This command is used to draw an arc. ARC takes as input the following objects: Coordinates of the center of the arc as (x,y) in user coordinates or {#n, #m} in pixels.
  • Page 737: Programming Examples Using Drawing Functions

    Example 1 - A program that uses drawing commands The following program produces a drawing in the graphics screen. (This program has no other purpose than to show how to use calculator commands to produce drawings in the display.) «...
  • Page 738 The program, available in the diskette or CD ROM that comes with your calculator, utilizes four sub-programs FRAME, DXBED, GTIFS, and INTRP. The main program, called XSECT, takes as input a matrix of values of x and y, and the elevation of the water surface Y (see figure above), in that order.
  • Page 739 (X-Y Data set 2). To run the program place one of the data sets in the stack, e.g., J @XYD1!, then type in a water surface elevation, say 4.0, and press @XSECT. The calculator will show an sketch of the cross-section with the corresponding water surface. To exit the graph display, press $.
  • Page 740 Data set 1 Note: The program FRAME, as originally programmed (see diskette or CD ROM), does not maintain the proper scaling of the graph. If you want to maintain proper scaling, replace FRAME with the following program: « STO DUP NEG SWAP 2 COL R B SWAP yR OBJ PDIM yR OBJ DROP YRNG xR OBJ...
  • Page 741: Animating Graphics

    EQ. ‘X’ for INDEP. Press L@@@OK@@@. „ò, simultaneously (in RPN mode). Use the following values: Press @ERASE @DRAW. Allow some time for the calculator to generate all the needed graphics. When ready, it will show a traveling sinusoidal wave in your screen.
  • Page 742: Animating A Collection Of Graphics

    » Store this program in a variable called PANIM (Plot ANIMation). To run the program press J (if needed) @PANIM. It takes the calculator more than one minute to generate the graphs and get the animation going. Therefore, be really patient here. You will see the hourglass symbol up in the screen for what...
  • Page 743 ANIMATE is available by using „°L@) G ROB L @ANIMA). The animation will be re-started. Press $ to stop the animation once more. Notice that the number 11 will still be listed in stack level 1. Press ƒ to drop it from the stack.
  • Page 744: More Information On The Animate Function

    » Store this program in a variable called PWAN (PoWer function ANimation). To run the program press J (if needed) @PWAN. You will see the calculator drawing each individual power function before starting the animation in which the five functions will be plotted quickly one after the other. To stop the animation, press $.
  • Page 745 For example, If you press ˜ then the graph contained in level 1 is shown in the calculator’s graphics display. Press @CANCL to return to normal calculator display.
  • Page 746: The Grob Menu

    1` „°L@) G ROB @ GROB . You will now have in level 1 the GROB described as: As a graphic object this equation can now be placed in the graphics display. To recover the graphics display press š. Then, move the cursor to an empty sector in the graph, and press @) E DIT LL@REPL.
  • Page 747 To see the output you need to recall PICT to the stack by using either PICT RCL or PICTURE. Takes a specified GROB and displays it in the calculator's display starting at the upper left corner.
  • Page 748: A Program With Plotting And Drawing Functions

    An example of a program using GROB The following program produces the graph of the sine function including a frame – drawn with the function BOX – and a GROB to label the graph. is the listing of the program: «...
  • Page 749 shows the state of stresses when the element is rotated by an angle . In this case, the normal stresses are ’ ’ The relationship between the original state of stresses ( state of stress when the axes are rotated counterclockwise by f ( ’ ’...
  • Page 750: Modular Programming

    The stress condition for which the shear stress, ’ segment D’E’, produces the so-called principal stresses, (at point E’). To obtain the principal stresses you need to rotate the coordinate system x’-y’ by an angle system x-y. In Mohr’s circle, the angle between segments AC and D’C measures 2 The stress condition for which the shear stress, ’...
  • Page 751: Running The Program

    These sub-programs are then linked by a main program, that we will call MOHRCIRCL. We will first create a sub- directory called MOHRC within the HOME directory, and move into that directory to type the programs.
  • Page 752 At this point the program MOHRCIRCL starts calling the sub-programs to produce the figure. Be patient. The resulting Mohr’s circle will look as in the picture to the left. Because this view of PICT is invoked through the function PVIEW, we cannot get any other information out of the plot besides the figure itself.
  • Page 753: A Program To Calculate Principal Stresses

    information tell us is that somewhere between stress, ’ , becomes zero. To find the actual value of n, press $. Then type the list corresponding to the values { x y xy}, for this case, it will be Then, press @CC&r. The last result in the output, 58.2825255885 value of n.
  • Page 754: A Second Example Of Mohr's Circle Calculations

    necessary to plot the circle. It is suggest that we re-order the variables in the sub-directory, so that the programs @MOHRC and @PRNST are the two first variables in the soft-menu key labels. This can be accomplished by creating the list { MOHRCIRCL PRNST } using: J„ä@MOHRC @PRNST ` And then, ordering the list by using: After this call to the function ORDER is performed, press J.
  • Page 755: An Input Form For The Mohr's Circle Program

    To find the values of the stresses corresponding to a rotation of 35 of the stressed particle, we use: $š @TRACE @(x,y)@. Next, press ™ until you read (1.63E0, -1.05E1), i.e., at An input form for the Mohr’s circle program For a fancier way to input data, we can replace sub-program INDAT, with the following program that activates an input form: «...
  • Page 756 Since program INDAT is used also for program @PRNST (PRiNcipal STresses), running that particular program will now use an input form, for example, The result, after pressing @@@OK@@@, is the following: Page 22-41...
  • Page 757: Character Strings

    Character strings Character strings are calculator objects enclosed between double quotes. They are treated as text by the calculator. For example, the string “SINE FUNCTION”, can be transformed into a GROB (Graphics Object), to label a graph, or can be used as output in a program. Sets of characters typed by the user as input to a program are treated as strings.
  • Page 758: String Concatenation

    String concatenation Strings can be concatenated (joined together) by using the plus sign +, for example: Concatenating strings is a practical way to create output in programs. For example, concatenating "YOU ARE " AGE + " YEAR OLD" creates the string "YOU ARE 25 YEAR OLD", where 25 is stored in the variable called AGE.
  • Page 759: The Characters List

    NAME IS CYRILLE the functions in the CHARS menu: The characters list The entire collection of characters available in the calculator is accessible through the keystroke sequence ‚± When you highlight any character, say they line feed character , you will see at the left side of the bottom of the...
  • Page 760 @ECHO1@ or @ECHO@. Use @ECHO1@ to copy one character to the stack and return immediately to normal calculator display. Use @ECHO@ to copy a series of characters to the stack. To return to normal calculator display use $.
  • Page 761: Description Of Calculator Objects

    Numbers, lists, vectors, matrices, algebraics, etc., are calculator objects. They are classified according to its nature into 30 different types, which are described below. Flags are variables that can be used to control the calculator properties. Flags were introduced in Chapter 2.
  • Page 762: Function Type

    Number Type ____________________________________________________________________ Extended Real Number Extended Complex Number Linked Array Character Object Code Object Library Data External Object Integer External Object External Object ____________________________________________________________________ Function TYPE This function, available in the PRG/TYPE () sub-menu, or through the command catalog, is used to determine the type of an object. The function argument is the object of interest.
  • Page 763: Calculator Flags

    A flag is a variable that can either be set or unset. The status of a flag affects the behavior of the calculator, if the flag is a system flag, or of a program, if it is a user flag. They are described in more detail next.
  • Page 764: User Flags

    Recalls existing flag settings RESET Resets current field values (could be used to reset a flag) User flags For programming purposes, flags 1 through 256 are available to the user. They have no meaning to the calculator operation. Page 24-4...
  • Page 765: The Time Menu

    Chapter 25 Date and Time Functions In this Chapter we demonstrate some of the functions and calculations using times and dates. The TIME menu The TIME menu, available through the keystroke sequence ‚Ó (the 9 key) provides the following functions, which are described next: Setting an alarm Option 2.
  • Page 766: Time Tools

    Browsing alarms Option 1. Browse alarms... in the TIME menu lets you review your current alarms. For example, after entering the alarm used in the example above, this option will show the following screen: This screen provides four soft menu key labels: EDIT: For editing the selected alarm, providing an alarm set input form NEW: For programming a new alarm...
  • Page 767: Calculations With Dates

    The application of these functions is demonstrated below. DATE: Places current date in the stack DATE: Set system date to specified value TIME: Places current time in 24-hr HH.MMSS format TIME: Set system time to specified value in 24-hr HH.MM.SS format TICKS: Provides system time as binary integer in units of clock ticks with 1 tick = 1/8192 sec...
  • Page 768: Alarm Functions

    Calculating with times The functions HMS, HMS , HMS+, and HMS- are used to manipulate values in the HH.MMSS format. This is the same format used to calculate with angle measures in degrees, minutes, and seconds. Thus, these operations are useful not only for time calculations, but also for angular calculations.
  • Page 769: Memory Structure

    Memory Structure The calculator contains a total of 2.5 MB of memory, out of which 1 MB is used to store the operating system (system memory), and 1.5 MB is used for calculator operation and data storage (user’s memory). Users do not have access to the system memory component.
  • Page 770: The Home Directory

    Port 2 belongs to the calculator’s Flash ROM (Read-Only Memory) segment, which does not require a power supply. Therefore, removing the batteries of the calculators will not affect the calculator’s Flash ROM segment. Port 2 can store up to 1085 KB of data.
  • Page 771: Checking Objects In Memory

    2 key). This action produces the following screen: If you have any library active in your calculator it will be shown in this screen. One such library is the @) H P49D (demo) library shown in the screen above.
  • Page 772: Backup Objects

    This value is stored with the backup object, and is used by the calculator to monitor the integrity of the backup object. When you restore a backup object into the HOME directory, the calculator recalculates the CRC value and compares it to the original value.
  • Page 773: Backing Up And Restoring Home

    Backing up and restoring HOME You can back up the contents of the current HOME directory in a single back up object. This object will contain all variables, key assignments, and alarms currently defined in the HOME directory. You can also restore the contents of your HOME directory from a back up object previously stored in port memory.
  • Page 774: Storing, Deleting, And Restoring Backup Objects

    The backup directory overwrites the current HOME directory. Thus, any data not backed up in the current HOME directory will be lost. The calculator restarts. The contents of history or stack are lost. Storing, deleting, and restoring backup objects To create a backup object use one of the following approaches: Use the File Manager („¡) to copy the object to port.
  • Page 775: Using Data In Backup Objects

    If you are holding the HP 50g with the keyboard facing up, then this side of the SD card should face down or away from you when being inserted into the HP 50g. The card will go into the slot without resistance for most of its length and then it will require slightly more force to fully insert it.
  • Page 776: Formatting An Sd Card

    To remove an SD card, turn off the HP 50g, press gently on the exposed edge of the card and push in. The card should spring out of the slot a small distance, allowing it now to be easily removed from the calculator.
  • Page 777: Accessing Objects On An Sd Card

    Accessing objects on an SD card Accessing an object from the SD card is similar to when an object is located in ports 0, 1, or 2. However, Port 3 will not appear in the menu when using the LIB function (‚á). The SD files can only be managed using the Filer, or File Manager („¡).
  • Page 778 1. Press !ê. This puts a double colon on the edit line with the cursor blinking between the colons. This is the way the HP 50g addresses items stored in its various ports. Port 3 is the SD card port.
  • Page 779: Purging An Object From The Sd Card

    Note that in the case of objects with long files names, you can specify the full name of the object, or its truncated 8.3 name, when evaluating an object on an SD card. Purging an object from the SD card To purge an object from the SD card onto the screen, use function PURGE, as follows: In algebraic mode:...
  • Page 780: Using Libraries

    Using libraries Libraries are user-created binary-language programs that can be loaded into the calculator and made available for use from within any sub-directory of the HOME directory. In addition, the calculator is shipped with two libraries that together provide all the functionality of the Equation Library.
  • Page 781: Library Numbers

    Equation Library in the future, you should copy them to a PC, using the HP 48/50 Calculator Connectivity Kit, before deleting them on the calculator. You will then be able to re-install the libraries later when you need to use the Equation Library.
  • Page 782 The diagram below shows the location of the backup battery in the top compartment at the back of the calculator. Page 26-14...
  • Page 783: Solving A Problem With The Equation Library

    Equation Library in the future, you should copy them to a PC, using the HP 48/49 Calculator Connectivity Kit, before deleting them on the calculator. You will then be able to re-install the libraries later when you need to use the Equation Library.
  • Page 784: Using The Solver

    7. For each known variable, type its value and press the corresponding menu key. If a variable is not shown, press L to display further variables. 8. Optional: supply a guess for an unknown variable. This can speed up the solution process or help to focus on one of several solutions.
  • Page 785: Using The Menu Keys

    Using the menu keys The actions of the unshifted and shifted variable menu keys for both solvers are identical. Notice that the Multiple Equation Solver uses two forms of menu labels: black and white. The L key displays additional menu labels, if required.
  • Page 786: Browsing In The Equation Library

    Browsing in the Equation Library When you select a subject and title in the Equation Library, you specify a set of one or more equations. You can get the following information about the equation set from the Equation Library catalogs: The equations themselves and the number of equations.
  • Page 787: Viewing Variables And Selecting Units

    Viewing variables and selecting units After you select a subject and title, you can view the catalog of names, descriptions, and units for the variables in the equation set by pressing #VARS#. The table below summarizes the operations available to you in the Variable catalogs.
  • Page 788: Using The Multiple-Equation Solver

    Press to store the picture in PICT, the graphics memory. Then you can use © PICT (or © PICTURE) to view the picture again after you have quit the Equation Library. Press a menu key or to view other equation information. Using the Multiple-Equation Solver The Equation Library starts the Multiple-Equation Solver automatically if the equation set contains more than one equation.
  • Page 789 Undefined all Solve for all Progress catalog User-defined Calculated The menu labels for the variable keys are white at first, but change during the solution process as described below. Because a solution involves many equations and many variables, the Multiple- Equation Solver must keep track of variables that are user-defined and not defined—those it can’t change and those it can.
  • Page 790: Defining A Set Of Equations

    Label !!!!!!!!!X0!!!!!!!!! Value x0 is not defined by you and not used in the last solution. It can change with the next solution. !!!!!!!X0!!ëëëë!!! Value x0 is not defined by you, but it was found in the last solution. It can change in the next solution. $$X0$$ Value x0 is defined by you and not used in the last solution.
  • Page 791 For example, the following three equations define initial velocity and acceleration based on two observed distances and times. The first two equations alone are mathematically sufficient for solving the problem, but each equation contains two unknown variables. Adding the third equation allows a successful solution because it contains only one of the unknown variables.
  • Page 792: Interpreting Results From The Multiple-Equation Solver

    6. Press !MSOLV! to launch the solver with the new set of equations. To change the title and menu for a set of equations 1. Make sure that the set of equations is the current set (as they are used when the Multiple-Equation Solver is launched).
  • Page 793: Checking Solutions

    Constant? The initial value of a variable may be leading the root- finder in the wrong direction. Supply a guess in the opposite direction from a critical value. (If negative values are valid, try one.) Checking solutions The variables having a šmark in their menu labels are related for the most recent solution.
  • Page 794 Not related. A variable may not be involved in the solution (no mark in the label), so it is not compatible with the variables that were involved. Wrong direction. The initial value of a variable may be leading the root- finder in the wrong direction.
  • Page 795 Appendix A Using input forms This example of setting time and date illustrates the use of input forms in the calculator. Some general rules: Use the arrow keys (š™˜—) to move from one field to the next in the input form.
  • Page 796 In this particular case we can give values to all but one of the variables, say, n = 10, I%YR = 8.5, PV = 10000, FV = 1000, and solve for variable PMT (the meaning of these variables will be presented later). Try the following: 10 @@OK@@ 8.5 @@OK@@ 10000 @@OK@@...
  • Page 797 !CALC Press to access the stack for calculations !TYPES Press to determine the type of object in highlighted field !CANCL Cancel operation @@OK@@ Accept entry If you press !RESET you will be asked to select between the two options: If you select Reset value only the highlighted value will be reset to the default value.
  • Page 798 (In RPN mode, we would have used 1136.22 ` 2 `/). Press @@OK@@ to enter this new value. The input form will now look like this: Press !TYPES to see the type of data in the PMT field (the highlighted field). As a result, you get the following specification: This indicates that the value in the PMT field must be a real number.
  • Page 799 Appendix B The calculator’s keyboard The figure below shows a diagram of the calculator’s keyboard with the numbering of its rows and columns. The figure shows 10 rows of keys combined with 3, 5, or 6 columns. Row 1 has 6 keys, rows 2 and 3 have 3 keys each, and rows 4 through 10 have 5 keys each.
  • Page 800 We will refer to the keys by the row and column where they are located in the sketch above, thus, key (10,1) is the ON key. Main key functions in the calculator’s keyboard Page B-2...
  • Page 801 Main key functions Keys A through F keys are associated with the soft menu options that appear at the bottom of the calculator’s display. Thus, these keys will activate a variety of functions that change according to the active menu.
  • Page 802 The ENTER key is used to enter a number, expression, or function in the display or stack, and The ON key is used to turn the calculator on. Alternate key functions The left-shift key, key (8,1), the right-shift key, key (9,1), and the ALPHA key, key (7,1), can be combined with some of the other keys to activate the alternative functions shown in the keyboard.
  • Page 803 „ first, and then any of the keys in Row 1. When using these functions in the calculator’s RPN mode, you need to press the left-shift key „simultaneously with the key in Row 1 of your choice.
  • Page 804 The CMD function shows the most recent commands, the PRG function activates the programming menus, the MTRW function activates the Matrix Writer, Left-shift „ functions of the calculator’s keyboard The CMD function shows the most recent commands. The PRG function activates the programming menus.
  • Page 805 The CONT key is used to continue a calculator operation. The ANS key recalls the last result when the calculator is in Algebraic operation mode. The [ ], ( ), and { } keys are used to enter brackets, parentheses, or braces.
  • Page 806 The functions BEGIN, END, COPY, CUT and PASTE are used for editing purposes. The UNDO key is used to undo the last calculator operation. The CHARS function activates the special characters menu. The EQW function is used to start the Equation Writer.
  • Page 807 ALPHA characters The following sketch shows the characters associated with the different calculator keys when the ALPHA ~ is activated. Notice that the ~ function NUM key produces a numeric Page B-9...
  • Page 808 (*) when combined with the times key, i.e., ~*. Alpha ~ functions of the calculator’s keyboard Alpha-left-shift characters The following sketch shows the characters associated with the different calculator keys when the ALPHA ~ is combined with the left-shift key „. Page B-10...
  • Page 809 (-, +, ), decimal point (.), and the space (SPC) are the same as the main functions of these keys. The ENTER and CONT keys also work as their main function even when the ~„ combination is used. Alpha ~„ functions of the calculator’s keyboard Page B-11...
  • Page 810 Alpha-right-shift characters The following sketch shows the characters associated with the different calculator keys when the ALPHA ~ is combined with the right-shift key …. Alpha ~… functions of the calculator’s keyboard Notice that the ~… combination is used mainly to enter a number of special characters from into the calculator stack.
  • Page 811 ~… combination include Greek letters ( , , and ), other characters generated by the ~… combination are |, ‘, ^, =, <, >, /, “, \, __, ~, !, ?, <<>>, and @. Page B-13...
  • Page 812: Cas Settings

    @@@OK@@@@ Use this key to accept settings (*) Flags are variables in the calculator, referred to by numbers, which can be “set” and “unset” to change certain calculator operating options. Pressing the L key shows the remaining options in the CALCULATOR...
  • Page 813 CAS MODES input form, press the @@@OK@@@ soft menu key. This will take you back to the CALCULATOR MODES input form. calculator display at this point, press the @@@OK@@@ soft menu key once more. Selecting the independent variable Many of the functions provided by the CAS use a pre-determined independent variable.
  • Page 814 A variable called VX exists in the calculator’s {HOME CASDIR} directory that takes, by default, the value of ‘X’. This is the name of the preferred independent variable for algebraic and calculus applications. For that reason, most examples in this Chapter use X as the unknown variable. If you use other independent variable names, for example, with function HORNER, the CAS will not work properly.
  • Page 815 The same example, corresponding to the RPN operating mode, is shown next: Approximate vs. Exact CAS mode When the _Approx is selected, symbolic operations (e.g., definite integrals, square roots, etc.), will be calculated numerically. When the _Approx is unselected (Exact mode is active), symbolic operations will be calculated as closed-form algebraic expressions, whenever possible.
  • Page 816 Whenever the calculator lists an integer value followed by a decimal dot, it is indicating that the integer number has been converted to a real representation.
  • Page 817 It is recommended that you select EXACT mode as default CAS mode, and change to APPROX mode if requested by the calculator in the performance of an operation. For additional information on real and integer numbers, as well as other calculator’s objects, refer to Chapter 2.
  • Page 818 If you press the OK soft menu key (), then the _Complex option is forced, and the result is the following: The keystrokes used above are the following: R„Ü5„Q2+ 8„Q2` When asked to change to COMPLEX mode, use:F. If you decide not to accept the change to COMPLEX mode, you get the following error message: Verbose vs.
  • Page 819 DIV2 as shown below. Press ` to show the first step: The screen inform us that the calculator is operating a division of polynomials A/B, so that A = BQ + R, where Q = quotient, and R = remainder. For the case under consideration, A = X are represented in the screen by lists of their coefficients.
  • Page 820 Increasing-power CAS mode When the _Incr pow CAS option is selected, polynomials will be listed so that the terms will have increasing powers of the independent variable. If the _Incr pow CAS option is not selected (default value) then polynomials will be listed so that the terms will have decreasing powers of the independent variable.
  • Page 821 Using the CAS HELP facility Turn on the calculator, and press the I key to activate the TOOL menu. Next, press the Bsoft menu key, followed by the ` key (the key in the lowest right corner of the keyboard), to activate the HELP facility. The display...
  • Page 822 !!@@OK#@ OK to activate help facility for the selected command If you press the !!CANCL E key, the HELP facility is skipped, and the calculator returns to normal display. To see the effect of using !!@@OK#@ in the HELP facility, let’s repeat the steps used...
  • Page 823 The HELP facility, described in this section, will be very useful to refer to the definition of the many CAS commands available in the calculator. Each entry in the CAS help facility, whenever appropriate, will have an example of application of the command, as well as references as shown in this example.
  • Page 824 HP 48G series calculators that are not included in the help facility. Good references for those commands are the HP 48G Series User’s Guide (HP Part No. 00048-90126) and the HP 48G Series Advanced User’s Reference Manual (HP Part No. 00048-90136) both published by Hewlett-Packard Company, Corvallis, Oregon, in 1993.
  • Page 825 In no event unless required by applicable law will any copyright holder be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the CAS Software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the CAS Software to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages.
  • Page 826 Additional character set While you can use any of the upper-case and lower-case English letter from the keyboard, there are 255 characters usable in the calculator. Including special characters like , , etc., that that can be used in algebraic expressions. To access these characters we use the keystroke combination …±...
  • Page 827 @MODIF: Opens a graphics screen where the user can modify highlighted character. Use this option carefully, since it will alter the modified character up to the next reset of the calculator. (Imagine the effect of changing the graphic of the character 1 to look like a 2!).
  • Page 828 Greek letters (alpha) (beta) (delta) (epsilon) (theta) (lambda) (mu) (rho) (sigma) (tau) (omega) (upper-case delta) (upper-case pi) Other characters (tilde) (factorial) (question mark) ) (backward slash) (angle symbol) (at) Some characters commonly used that do not have simple keystroke shortcuts are: x (x bar), (gamma), can be “echoed”...
  • Page 829 Appendix E The Selection Tree in the Equation Writer The expression tree is a diagram showing how the Equation Writer interprets an expression. The form of the expression tree is determined by a number of rules known as the hierarchy of operation. The rules are as follows: 1.
  • Page 830 Step A1 Step A3 Step A5 We notice the application of the hierarchy-of-operation rules in this selection. First the y (Step A1). Then, y-3 (Step A2, parentheses). Then, (y-3)x (Step A3, multiplication). Then (y-3)x+5, (Step A4, addition). Then, ((y-3)x+5)(x (Step A5, multiplication), and finally, ((y-3)x+5)(x division).
  • Page 831 Step B1 Step B3 We can also follow the evaluation of the expression starting from the 4 in the argument of the SIN function in the denominator. Press the down arrow key ˜, continuously, until the clear, editing cursor is triggered around the y, once more.
  • Page 832 Step C3 Step C4 Step C5 = Step B5 = Step A6 The expression tree for the expression presented above is shown next: The steps in the evaluation of the three terms (A1 through A6, B1 through B5, and C1 through C5) are shown next to the circle containing numbers, variables, or operators.
  • Page 833 Appendix F The Applications (APPS) menu The Applications (APPS) menu is available through the G key (first key in second row from the keyboard’s top). The G key shows the following applications: The different applications are described next. Plot functions.. Selecting option 1.
  • Page 834 Transfer.. Start Server.. You can connect to another calculator or to a PC via infrared or via a cable. A USB cable is provided with the calculator for a USB connection. You can also use a serial cable to connect to the RS232 port on the calculator. (This cable is available as a separate accessory.)
  • Page 835: Numeric Solver

    The Constants Library is discussed in detail in Chapter 3. Numeric solver.. Selecting option 3. Constants lib.. in the APPS menu produces the numerical solver menu: This operation is equivalent to the keystroke sequence ‚Ï. The numerical solver menu is presented in detail in Chapters 6 and 7. Time &...
  • Page 836 Equation writer.. Selecting option 6.Equation writer.. in the APPS menu opens the equation writer: This operation is equivalent to the keystroke sequence ‚O. The equation writer is introduced in detail in Chapter 2. Examples that use the equation writer are available throughout this guide. File manager..
  • Page 837: Math Menu

    Matrix Writer.. Selecting option 8.Matrix Writer.. in the APPS menu launches the matrix writer: This operation is equivalent to the keystroke sequence „².The Matrix Writer is presented in detail in Chapter 10. Text editor.. Selecting option 9.Text editor.. in the APPS menu launches the line text editor: The text editor can be started in many cases by pressing the down-arrow key ˜.
  • Page 838: Cas Menu

    This operation is equivalent to the keystroke sequence „´. The MTH menu is introduced in Chapter 3 (real numbers). Other functions from the MTH menu are presented in Chapters 4 (complex numbers), 8 (lists), 9 (vectors), 10 (matrix creation), 11 (matrix operation), 16 (fast Fourier transforms), 17 (probability applications), and 19 (numbers in different bases).
  • Page 839 Note that flag –117 should be set if you are going to use the Equation Library. Note too that the Equation Library will only appear on the APPS menu if the two Equation Library files are stored on the calculator. The Equation Library is explained in detail in chapter 27.
  • Page 840 Appendix G Useful shortcuts Presented herein are a number of keyboard shortcuts commonly used in the calculator: Adjust display contrast: $ (hold) +, or $ (hold) - Toggle between RPN and ALG modes: H\@@@OK@@ or H\`. Set/clear system flag 95 (ALG vs. RPN operating mode) H @) F LAGS —„—„—„...
  • Page 841 Set/clear system flag 117 (CHOOSE boxes vs. SOFT menus): H @) F LAGS —„ —˜ @@CHK@ In ALG mode, SF(-117) selects SOFT menus CF(-117) selects CHOOSE BOXES. In RPN mode, 117 \` SF selects SOFT menus 117 \` CF selects SOFT menus Change angular measure: To degrees: ~~deg` To radian: ~~rad`...
  • Page 842 System-level operation (Hold $, release it after entering second or third key): $ (hold) AF: “Cold” restart - all memory erased $ (hold) B: Cancels keystroke $ (hold) C: “Warm” restart - memory preserved $ (hold) D: Starts interactive self-test $ (hold) E: Starts continuous self-test $ (hold) #: Deep-sleep shutdown - timer off $ (hold) A: Performs display screen dump...
  • Page 843 Appendix H The CAS help facility The CAS help facility is available through the keystroke sequence I L@HELP `. The following screen shots show the first menu page in the listing of the CAS help facility. The commands are listed in alphabetical order. Using the vertical arrow keys —˜...
  • Page 844 You can type two or more letters of the command of interest, by locking the alphabetic keyboard. This will take you to the command of interest, or to its neighborhood. Afterwards, you need to unlock the alpha keyboard, and use the vertical arrow keys —˜ to locate the command, if needed.
  • Page 845 Appendix I Command catalog list This is a list of all commands in the command catalog (‚N). Those commands that belong to the CAS (Computer Algebraic System) are listed also in Appendix H. CAS help facility entries are available for a given command if the soft menu key @HELP shows up when you highlight that particular command.
  • Page 846 The CMPLX sub-menu The CMPLX sub-menu contains functions pertinent to operations with complex numbers: These functions are described in Chapter 4. The CONSTANTS sub-menu The CONSTANTS sub-menu provides access to the calculator mathematical constants. These are described in Chapter 3: Page J-1...
  • Page 847 The HYPERBOLIC sub-menu The HYPERBOLIC sub-menu contains the hyperbolic functions and their inverses. These functions are described in Chapter 3. The INTEGER sub-menu The INTEGER sub-menu provides functions for manipulating integer numbers and some polynomials. These functions are presented in Chapter 5: The MODULAR sub-menu The MODULAR sub-menu provides functions for modular arithmetic with numbers and polynomials.
  • Page 848 UNASSUME commands. Relational and logical operators are presented in Chapter 21 in the context of programming the calculator in User RPL language. The IFTE function is introduced in Chapter 3. Functions ASSUME and UNASSUME are presented next, using their CAS help facility entries (see Appendix C).
  • Page 849: The Main Menu

    Appendix K The MAIN menu The MAIN menu is available in the command catalog. This menu include the following sub-menus: The CASCFG command This is the first entry in the MAIN menu. This command configures the CAS. For CAS configuration information see Appendix C. The ALGB sub-menu The ALGB sub-menu includes the following commands: These functions, except for 0.MAIN MENU and 11.UNASSIGN are available...
  • Page 850 The DIFF sub-menu The DIFF sub-menu contains the following functions: These functions are also available through the CALC/DIFF sub-menu (start with „Ö). These functions are described in Chapters 13, 14, and 15, except for function TRUNC, which is described next using its CAS help facility entry: The MATHS sub-menu The MATHS menu is described in detail in Appendix J.
  • Page 851 These functions are also available in the TRIG menu (‚Ñ). Description of these functions is included in Chapter 5. The SOLVER sub-menu The SOLVER menu includes the following functions: These functions are available in the CALC/SOLVE menu (start with „Ö). The functions are described in Chapters 6, 11, and 16.
  • Page 852 The sub-menus INTEGER, MODULAR, and POLYNOMIAL are presented in detail in Appendix J. The EXP&LN sub-menu The EXP&LN menu contains the following functions: This menu is also accessible through the keyboard by using „Ð. The functions in this menu are presented in Chapter 5. The MATR sub-menu The MATR menu contains the following functions: These functions are also available through the MATRICES menu in the keyboard...
  • Page 853 These functions are available through the CONVERT/REWRITE menu (start with „Ú). The functions are presented in Chapter 5, except for functions XNUM and XQ, which are described next using the corresponding entries in the CAS help facility (IL@HELP ): XNUM Page K-5...
  • Page 854 Appendix L Line editor commands When you trigger the line editor by using „˜ in the RPN stack or in ALG mode, the following soft menu functions are provided (press L to see the remaining functions): The functions are briefly described as follows: SKIP: Skips characters to beginning of word.
  • Page 855 The items show in this screen are self-explanatory. For example, X and Y positions mean the position on a line (X) and the line number (Y). Stk Size means the number of objects in the ALG mode history or in the RPN stack. Mem(KB) means the amount of free memory.
  • Page 856 The SEARCH sub-menu The functions of the SEARCH sub-menu are: Find : Use this function to find a string in the command line. The input form provided with this command is shown next: Replace: Use this command to find and replace a string. The input form provided for this command is: Find next..: Finds the next search pattern as defined in Find Replace Selection: Replace selection with replacement pattern defined with...
  • Page 857 The GOTO sub-menu The functions in the GOTO sub-menu are the following: Goto Line: to move to a specified line. The input form provided with this command is: Goto Position: move to a specified position in the command line. The input form provided for this command is: Labels: move to a specified label in the command line.
  • Page 858 Page L-5...
  • Page 859 Appendix M Table of Built-In Equations The Equation Library consists of 15 subjects corresponding to the sections in the table below) and more than 100 titles. The numbers in parentheses below indicate the number of equations in the set and the number of variables in the set.
  • Page 860 3: Fluids (29, 29) 1: Pressure at Depth (1, 4) 2: Bernoulli Equation (10, 15) 4: Forces and Energy (31, 36) 1: Linear Mechanics (8, 11) 2: Angular Mechanics (12, 15) 3: Centripetal Force (4, 7) 4: Hooke’s Law (2, 4) 5: Gases (18, 26) 1: Ideal Gas Law (2, 6) 2: Ideal Gas State Change (1, 6)
  • Page 861 9: Optics (11, 14) 1: Law of Refraction (1, 4) 2: Critical Angle (1, 3) 3: Brewster’s Law (2, 4) 10: Oscillations (17, 17) 1: Mass–Spring System (1, 4) 2: Simple Pendulum (3, 4) 3: Conical Pendulum (4, 6) 11: Plane Geometry (31, 21) 1: Circle (5, 7) 2: Ellipse (5, 8) 3: Rectangle (5, 8)
  • Page 862 Appendix N Index ABCUV 5-10 ABS 3-4, 4-6, 11-8 ACK 25-4 ACKALL 25-4 ACOS 3-6 ADD 8-9, 12-20 Additional character set D-1 ADDTMOD 5-11 Alarm functions 25-4 Alarms 25-2 ALG menu 5-3 Algebraic objects 5-1 ALOG 3-5 ALPHA characters B-9 ALPHA keyboard lock-unlock G-2 Alpha-left-shift characters B-10 Alpha-right-shift characters B-12...
  • Page 863 C PX 19-7 C R 4-6 CALC/DIFF menu 16-3 Calculation with dates 25-3 Calculations with times 25-4 Calculator constants 3-16 CALCULATOR MODES input form Calculator restart G-3 Calculus 13-1 Cancel next repeating alarm G-3 Cartesian representation 4-1 CAS help facility listing H-1...
  • Page 864 CMD 2-62 CMDS 2-25 CMPLX menus 4-5 CNCT 22-13 CNTR 12-48 Coefficient of variation 18-5 COL+ 10-19 10-19 "Cold" calculator restart G-3 COLLECT 5-4 Column norm 11-7 Column vectors 9-18 COL- 10-20 COMB 17-2 Combinations 17-1 Command catalog list I-1...
  • Page 865 Dates calculations 25-4 DBUG 21-35 DDAYS 25-3 Debugging programs 21-22 DEC 19-2 Decimal comma 1-22 Decimal numbers 19-4 decimal point 1-22 Decomposing a vector 9-11 Decomposing lists 8-2 Deep-sleep shutdown G-3 DEFINE 3-36 Definite integrals 13-15 DEFN 12-18 DEG 3-1 Degrees 1-23 DEL 12-46 DEL L L-1...
  • Page 866 DISTRIB 5-28 DIV 15-4 DIV2 5-10 DIV2MOD 5-11, 5-14 Divergence 15-4 DIVIS 5-9 DIVMOD 5-11, 5-14 DO construct 21-61 DOERR 21-64 DOLIST 8-11 DOMAIN 13-9 DOSUBS 8-11 DOT 9-11 Dot product 9-11 DOT+ DOT- 12-44 Double integrals 14-8 DRAW 12-20, 22-4 DRAW3DMATRIX 12-52 Drawing functions programs 22-22 DRAX 22-4...
  • Page 867 ERRN 21-65 Error trapping in programming 21-64 Errors in hypothesis testing 18-36 Errors in programming 21-64 EULER 5-10 Euler constant 16-54 Euler equation 16-51 Euler formula 4-1 EVAL 2-5 Exact CAS mode C-4 EXEC L-2 EXP 3-6 EXP2POW 5-28 EXPAND 5-4 EXPANDMOD 5-11 EXPLN 5-8, 5-28 EXPM 3-9...
  • Page 868 Function, table of values 12-17, 12-25 Functions, multi-variate 14-1 Fundamental theorem of algebra 6-7 GAMMA 3-15 Gamma distribution 17-6 GAUSS 11-54 Gaussian elimination 11-14, 11-29 Gauss-Jordan elimination 11-33, 11-38, 11-40, 11-43 GCD 5-11, 5-18 GCDMOD 5-11 Geometric mean 8-16, 18-3 GET 10-6 GETI 8-11 Global variable 21-2...
  • Page 869 HORNER 5-11, 5-19 H-VIEW 12-19 Hyperbolic functions graphs 12-16 Hypothesis testing 18-35 Hypothesis testing errors 18-36 Hypothesis testing in linear regression 18-52 Hypothesis testing in the calculator 18-43 HZIN 12-48 HZOUT 12-48 i 3-16 I/O functions menu F-2 I R 5-27...
  • Page 870 Integrals step-by-step 13-16 Integration by partial fractions 13-20 Integration by parts 13-19 Integration change of variable 13-19 Integration substitution 13-18 Integration techniques 13-18 Interactive drawing 12-43 Interactive input programming 21-19 Interactive plots with PLOT menu 22-15 Interactive self-test G-3 INTVX 13-14 INV 4-5, L-4 Inverse cdf’s 17-13 Inverse cumulative distribution func-...
  • Page 871 Left-shift functions B-5 LEGENDRE 5-11, 5-20 Legendre’s equation 16-51 Length units 3-19 LGCD 5-10 lim 13-2 Limits 13-1 LIN 5-5 LINE 12-44 Line editor commands L-1 Line editor properties 1-28 Linear Algebra 11-1 Linear Applications 11-54 Linear differential equations 16-4 Linear regression additional notes 18- Linear regression confidence intervals 18-52...
  • Page 872 Mass units 3-20 Math menu.. F-5 MATHS menu G-3, J-1 MATHS/CMPLX menu J-1 MATHS/CONSTANTS menu J-1 MATHS/HYPERBOLIC menu J-2 MATHS/INTEGER menu J-2 MATHS/MODULAR menu J-2 MATHS/POLYNOMIAL menu J-3 MATHS/TESTS menu J-3 matrices 10-1 Matrix "division" 11-27 Matrix augmented 11-32 Matrix factorization 11-49 Matrix Jordan-cycle decomposition 11-47 MATRIX menu 10-3...
  • Page 873 Multiple integrals 14-8 Multiple linear fitting 18-57 Multiple-Equation Solver 27-6 Multi-variate calculus 14-1 MULTMOD 5-11 NDIST 17-10 NEG 4-6 Nested IF...THEN..ELSE..END 21-49 NEW 2-34 NEXTPRIME 5-10 Non-CAS commands C-13 Non-linear differential equations 16-4 Non-verbose CAS mode C-7 NORM menu 11-7 Normal distribution 17-10 Normal distribution cdf 17-10 Normal distribution standard 17-17...
  • Page 874 Partial fractions integration 13-20 Partial pivoting 11-34 PASTE 2-27 PCAR 11-45 PCOEF 5-11, 5-21 PDIM 22-20 Percentiles 18-14 PERIOD 2-37, 16-34 PERM 17-2 Permutation matrix 11-50, 11-51 Permutations 17-1 PEVAL 5-22 PGDIR 2-44 Physical constants 3-29 PICT 12-8 Pivoting 11-34 PIX? 22-22 Pixel coordinates 22-25 Pixel references 19-7...
  • Page 875 17-6 Probability distributions discrete 17-4 Probability distributions for statistical inference 17-9 Probability mass function 17-4 Program branching 21-46 Program loops 21-53 Program-generated plots 22-17 Programming 21-1 Programming choose box 21-31 Programming debugging 21-22 Programming drawing commands 22-19 Programming drawing functions 22-24 Programming error trapping 21-64 Programming graphics 22-1...
  • Page 876 REPL 10-12 Replace L-3 Replace All L-3 Replace Selection L-3 Replace/Find Next L-3 RES 22-6 RESET 22-8 Restart calculator G-3 RESULTANT 5-11 Resultant of forces 9-15 REVLIST 8-9 REWRITE menu 5-27 Right-shift functions B-8 Rigorous CAS mode C-10 RISCH 13-14...
  • Page 877 SEARCH menu L-2 Selection tree in Equation Writer E-1 SEND 2-34 SEQ 8-11 Sequential programming 21-15 Series Fourier 16-26 Series Maclaurin 13-23 Series Taylor 13-23 Setting time and date 25-2 SHADE in plots 12-6 Shortcuts G-1 SI 3-30 SIGMA 13-14 SIGMAVX 13-14 SIGN 3-14, 4-6 SIGNTAB 12-50, 13-10...
  • Page 878 Stiff differential equations 16-67 Stiff ODE 16-66 Stiff ODEs numerical solution 16-67 STOALARM 25-4 STOKEYS 20-6 STREAM 8-11 String 23-1 String concatenation 23-2 Student t distribution 17-11 STURM 5-11 STURMAB 5-11 STWS 19-4 Style menu L-4 SUB 10-11 Subdirectories creating 2-39 Subdirectories deleting 2-43 SUBST 5-5 SUBTMOD 5-11, 5-15...
  • Page 879 TINC 3-34 TITLE 7-14 TLINE 12-45, 22-20 TMENU 20-1 TOOL menu CASCMD 1-7 CLEAR 1-7 EDIT 1-7 HELP 1-7 PURGE 1-7 RCL 1-7 VIEW 1-7 TOOL menu 1-7 Total differential 14-5 TPAR 12-17 TRACE 11-14 TRAN 11-15 Transforms Laplace 16-10 Transpose 10-1 Triangle solution 7-9 Triangular wave Fourier series 16-34...
  • Page 880 Volume units 3-19 VPAR 12-42, 22-10 VPOTENTIAL 15-6 VTYPE 24-2 V-VIEW 12-19 VX 2-37, 5-19 VZIN 12-48 "Warm" calculator restart G-3 Weber’s equation 16-57 Weibull distribution 17-7 Weighted average 8-17 WHILE construct 21-63 Wireframe plots 12-36 Wordsize 19-4 XCOL 22-13...
  • Page 881 ! 17-2 % 3-12 %CH 3-12 %T 3-12 ARRY 9-6, 9-20 BEG L-1 COL 10-18 DATE 25-3 DIAG 10-12 END L-1 GROB 22-31 HMS 25-3 LCD 22-32 LIST 9-20 ROW 10-22 STK 3-30 STR 23-1 TAG 21-33, 23-1 TIME 25-3 UNIT 3-28 V2 9-12 V3 9-12...
  • Page 882: Limited Warranty

    If HP receives notice of such defects during the warranty period, HP will, at its option, either repair or replace products which prove to be defective.
  • Page 883 8. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services.
  • Page 884 Central America & Caribbean Guatemala Puerto Rico Costa Rica Country : N.America U.S. Canada ROTC = Rest of the country Please logon to http://www.hp.com for the latest service and support information. +41-1-4395358 (German) +41-22-8278780 (French) +39-02-75419782 (Italian) +420-5-41422523 +44-207-4580161 +420-5-41422523 +27-11-2376200 +32-2-7126219...
  • Page 885: Regulatory Information

    Regulatory information Federal Communications 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 limits are designed to provide reasonable protection against harmful interference in a residential installation.
  • Page 886 This device complies with Part 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: Hewlett-Packard Company P.
  • Page 887 This compliance is indicated by the following conformity marking placed on the product: This marking is valid for non-Telecom prodcts and EU harmonized Telecom products (e.g. Bluetooth). Japanese Notice Korean Notice Disposal of Waste Equipment by Users in Private Household in the European Union This symbol on the product or on its packaging indicates that this product must not be disposed of with your other household waste.

Table of Contents

Save PDF