HP F2226A - 48GII Graphic Calculator User Manual

Graphing calculator
Table of Contents

Advertisement

Quick Links

hp 48gII graphing calculator
user's guide
H
Edition 4
HP part number F2226-90020

Advertisement

Table of Contents
loading

Summary of Contents for HP F2226A - 48GII Graphic Calculator

  • Page 1 hp 48gII graphing calculator user’s guide Edition 4 HP part number F2226-90020...
  • Page 2 OF ANY KIND WITH REGARD TO THIS MANUAL, INCLUDING, BUT LIMITED IMPLIED WARRANTIES MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. HEWLETT-PACKARD CO. SHALL NOT BE LIABLE FOR ANY ERRORS INCIDENTAL CONSEQUENTIAL DAMAGES CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS MANUAL OR THE EXAMPLES CONTAINED HEREIN.
  • Page 3 Preface You have in your hands a compact symbolic and numerical computer that will facilitate calculation and mathematical analysis of problems in a variety of disciplines, from elementary mathematics to advanced engineering and science subjects. Although referred to as a calculator, because of its compact format resembling typical hand-held calculating devices, the hp 48gII should be thought of as a graphics/programmable hand-held computer.
  • Page 4 (numerical) mode. The display can be adjusted to provide textbook-type expressions, which can be useful when working with matrices, vectors, fractions, summations, derivatives, and integrals. The high-speed graphics of the calculator are very convenient for producing complex figures in very little time.
  • Page 5: Table Of Contents

    Table of contents A note about screenshots in this guide , Note-1 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.
  • Page 6 Creating algebraic expressions, 2-7 Editing algebraic expressions, 2-8 Using the Equation Writer (EQW) to create expressions, 2-10 Creating arithmetic expressions, 2-11 Editing arithmetic expressions, 2-16 Creating algebraic expressions, 2-19 Editing algebraic expressions, 2-20 Creating and editing summations, derivatives, and integrals, 2-28 Organizing data in the calculator, 2-32 Functions for manipulation of variables, 2-33 The HOME directory, 2-34...
  • Page 7 The inverse function, 3-3 Addition, subtraction, multiplication, division, 3-3 Using parentheses, 3-4 Absolute value function, 3-4 Squares and square roots, 3-4 Powers and roots, 3-5 Base-10 logarithms and powers of 10, 3-5 Using powers of 10 in entering data, 3-5 Natural logarithms and exponential function, 3-6 Trigonometric functions, 3-6 Inverse trigonometric functions, 3-6...
  • Page 8 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 Changing sign of a complex number, 4-4 Entering the unit imaginary number, 4-5 The CMPLX menus, 4-5 CMPLX menu through the MTH menu, 4-5...
  • Page 9 FACTORS, 5-10 LGCD, 5-10 PROPFRAC, 5-10 SIMP2, 5-10 INTEGER menu, 5-10 POLYNOMIAL menu, 5-11 MODULO menu, 5-12 Applications of the ARITHMETIC menu, 5-12 Modular arithmetic, 5-12 Finite arithmetic in the calculator, 5-15 Polynomials, 5-18 Modular arithmetic with polynomials, 5-19 The CHINREM function, 5-19 The EGCD function, 5-19 The GCD function, 5-19 The HERMITE function, 5-20...
  • Page 10 UNITS convert menu, 5-27 BASE convert menu, 5-28 TRIGONOMETRIC convert menu, 5-28 MATRICES convert menu, 5-28 REWRITE convert menu, 5-28 Chapter 6 - Solution to single equations , 6-1 Symbolic solution of algebraic equations, 6-2 Function ISOL, 6-1 Function SOLVE, 6-2 Function SOLVEVX, 6-4 Function ZEROS, 6-4 Numerical solver menu, 6-5...
  • Page 11 Application 2 - Velocity and acceleration in polar coordinates, 7-18 Chapter 8 - Operations with Lists , 8-1 Definitions, 8-1 Creating and storing lists, 8-1 Composing and decomposing lists, 8-2 Operations with lists of numbers, 8-3 Changing sign, 8-3 Addition, subtraction, multiplication, division, 8-3 Real number functions from the keyboard, 8-5 Real number functions from the MTH menu, 8-5 Examples of functions that use two arguments, 8-6...
  • Page 12 Using the Matrix Writer (MTWR) to enter vectors, 9-3 Building a vector with ARRY, 9-6 Identifying, extracting, and inserting vector elements, 9-7 Simple operations with vectors, 9-9 Changing sign, 9-9 Addition, subtraction, 9-9 Multiplication and division by a scalar, 9-10 Absolute value function, 9-10 The MTH/VECTOR menu, 9-10 Magnitude, 9-11...
  • Page 13 Functions GET and PUT, 10-6 Functions GETI and PUTI, 10-6 Function SIZE, 10-7 Function TRN, 10-8 Function CON, 10-8 Function IDN, 10-9 Function RDM, 10-10 Function RANM, 10-11 Function SUB, 10-11 Function REPL, 10-12 Function DIAG, 10-12 Function DIAG , 10-13 Function VANDERMONDE, 10-14 Function HILBERT, 10-14 A program to build a matrix out of a number of lists, 10-15...
  • Page 14 Characterizing a matrix (the matrix NORM menu), 11-6 Function ABS, 11-7 Function SNRM, 11-7 Functions RNRM and CNRM, 11-8 Function SRAD, 11-9 Function COND, 11-9 Function RANK, 11-10 Function DET, 11-11 Function TRACE, 11-13 Function TRAN, 11-14 Additional matrix operations (the matrix OPER menu), 11-14 Function AXL, 11-15 Function AXM, 11-15 Function LCXM, 11-15...
  • Page 15 Function QR, 11-51 Matrix Quadratic Forms, 11-51 The QUADF menu, 11-52 Linear Applications, 11-54 Function IMAGE, 11-54 Function ISOM, 11-54 Function KER, 11-55 Function MKISOM, 11-55 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-8 Graphics of transcendental functions, 12-10...
  • Page 16 Y-Slice plots, 12-41 Gridmap plots, 12-42 Pr-Surface plots, 12-43 The VPAR variable, 12-44 Interactive drawing, 12-44 DOT+ and DOT-, 12-45 MARK, 12-46 LINE, 12-46 TLINE, 12-46 BOX, 12-47 CIRCL, 12-47 LABEL, 12-47 DEL, 12-47 ERASE, 12-48 MENU, 12-48 SUB, 12-48 REPL, 12-48 PICT , 12-48 X,Y , 12-48...
  • Page 17 Function lim, 13-2 Derivatives, 13-3 Function DERIV and DERVX,13-3 The DERIV&INTEG menu, 13-3 Calculating derivatives with ∂,13-4 The chain rule,13-6 Derivatives of equations,13-6 Implicit derivatives,13-7 Application of derivatives,13-7 Analyzing graphics of functions,13-7 Function DOMAIN, 13-9 Function TABVAL, 13-9 Function SIGNTAB, 13-10 Function TABVAR, 13-10 Using derivatives to calculate extreme points, 13-12 Higher-order derivatives, 13-13...
  • Page 18 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 Multiple integrals, 14-8 Jacobian of coordinate transformation, 14-9 Double integral in polar coordinates, 14-9 Chapter 15 - Vector Analysis Applications , 15-1...
  • Page 19 Fourier series, 16-27 Function FOURIER, 16-28 Fourier series for a quadratic function, 16-29 Fourier series for a triangular wave, 16-35 Fourier series for a square wave, 16-39 Fourier series applications in differential equations, 16-42 Fourier Transforms, 16-43 Definition of Fourier transforms, 16-46 Properties of the Fourier transform, 16-48 Fast Fourier Transform (FFT) , 16-49 Examples of FFT applications, 16-50...
  • Page 20 Random numbers, 17-2 Discrete probability distributions, 17-4 Binomial distribution, 17-4 Poisson distribution, 17-5 Continuous probability distributions, 17-6 The gamma distribution, 17-6 The exponential distribution, 17-7 The beta distribution, 17-7 The Weibull distribution, 17-7 Functions for continuous distributions, 17-7 Continuous distributions for statistical inference, 17-9 Normal distribution pdf, 17-9 Normal distribution cdf, 17-10 The Student-t distribution, 17-10...
  • Page 21 Confidence intervals for the population mean when the population variance is known, 18-23 Confidence intervals for the population mean when the population variance is unknown, 18-24 Confidence interval for a proportion, 18-24 Sampling distributions of differences and sums of statistics, 18-25 Confidence intervals for sums and differences of mean values, 18-26 Determining confidence intervals, 18-27 Confidence intervals for the variance, 18-33...
  • Page 22 Conversion between number systems, 19-3 Wordsize, 19-4 Operations with binary integers, 19-4 The LOGIC menu, 19-5 The BIT menu, 19-6 The BYTE menu, 19-6 Hexadecimal numbers for pixel references, 19-7 Chapter 20 - Customizing menus and keyboard , 20-1 Customizing menus, 20-1 The PRG/MODES/MENU, 20-1 Menu numbers (RCLMENU and MENU functions), 20-2 Custom menus (MENU and TMENU functions), 20-2...
  • Page 23 Programs that simulate a sequence of stack operations, 21-17 Interactive input in programs, 21-19 Prompt with an input string, 21-21 A function with an input string, 21-22 Input string for two or three input values, 21-24 Input through input forms, 21-27 Creating a choose box, 21-31 Identifying output in programs, 21-33 Tagging a numerical result, 21- 33...
  • Page 24 Description of the PLOT menu, 22-2 Generating plots with programs, 22-14 Two-dimensional graphics, 22-14 Three-dimensional graphics, 22-15 The variable EQ, 22-15 Examples of interactive plots using the PLOT menu, 22-15 Examples of program-generated plots, 22-17 Drawing commands for use in programming, 22-19 PICT, 22-20 PDIM, 22-20 LINE, 22-20...
  • Page 25 The CHARS menu, 23-2 The characters list, 23-3 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 26 Creating libraries, 26-7 Backup battery, 26-7 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 Appendix F - The Applications (APPS) menu , F-1...
  • Page 27 A note about screenshots in this guide A screenshot is a representation of the calculator screen. For example, the first time the calculator is turned on you get the following screen (calculator screens are shown with a thick border in this section): The top two lines represent the screen header and the remaining area in the screen is used for calculator output.
  • Page 28 Notice that the header lines cover the top first and a half lines of output in the calculator’s screen. Nevertheless, the lines of output not visible are still available for you to use. You can access those lines in your calculator by pressing the up-arrow key (—), which will allow you to scroll down the screen contents.
  • Page 29 These simplifications of the screenshots are aimed at economizing output space in the guide. Be aware of the differences between the guide’s screenshots and the actual screen display, and you should have no problem reproducing the exercises in this guide. Page Note-3...
  • Page 30: Chapter 1 - Getting Started

    Chapter 1 Getting started This chapter is aimed at providing basic information in the operation of your calculator. The exercises are aimed at familiarizing yourself with the basic operations and settings before actually performing a calculation. Basic Operations The following exercises are aimed at getting you acquainted with the hardware of your calculator.
  • Page 31: Turning The Calculator On And Off

    b. Insert a new CR2032 lithium battery. Make sure its positive (+) side is facing up. c. Replace the plate and push it to the original place. After installing the batteries, press [ON] to turn the power on. Warning: When the low battery icon is displayed, you need to replace the batteries as soon as possible.
  • Page 32: Menus

    At the top of the display you will have two lines of information that describe the settings of the calculator. The first line shows the characters: RAD XYZ HEX R= 'X' For details on the meaning of these specifications see Chapter 2. The second line shows the characters: { HOME } indicating that the HOME directory is the current file directory in the calculator’s memory.
  • Page 33: Soft Menus Vs. Choose Boxes

    pressing the L (NeXT menu) key. This key is the third key from the left in the third row of keys in the keyboard. Press L once more to return to the main TOOL menu, or press the I key (third key in second row of keys from the top of the keyboard).
  • Page 34: Selecting Soft Menus Or Choose Boxes

    using the up and down arrow keys, —˜, or by pressing the number corresponding to the function in the CHOOSE box. After the function name is selected, press the @@@OK@@@ soft menu key (F). Thus, if you wanted to use function R B (Real to Binary), you could press 6F.
  • Page 35: The Tool 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. The following figures show the different pages of the BASE menu accessed by pressing the L key twice: Pressing the L key once more will takes us back to the first menu page.
  • Page 36: Setting Time And Date

    @VIEW VIEW the contents of a variable @@ RCL @@ ReCaLl the contents of a variable @@STO@ STOre the contents of a variable ! PURGE PURGE a variable 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.
  • Page 37 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#@ F soft menu key.
  • Page 38 25 !!@@OK#@ . Let’s change the minute field to 25, by pressing: seconds field is now highlighted. Suppose that you want to change the 45 !!@@OK#@ seconds field to 45, use: The time format field is now highlighted. To change this field from its current 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: Introducing The Calculator's Keyboard

    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 ( B), to see the options for the date format: Highlight your choice by using the up and down arrow keys,—...
  • Page 40 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. There are 4 arrow keys located on the right-hand side of the keyboard in the space occupied by rows 2 and 3.
  • Page 41: Selecting Calculator Modes

    combined with some of the other keys to activate the alternative functions shown in the keyboard. For example, the key, key(4,4), has the following six functions associated with it: Main function, to activate the SYMBolic menu „´ Left-shift function, to activate the MTH (Math) menu …...
  • Page 42: Operating Mode

    Press the !!@@OK#@ F soft menu key to return to normal display. Examples of selecting different calculator modes are shown next. Operating Mode The calculator offers two operating modes: the Algebraic mode, and the 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.
  • Page 43 The equation writer is a display mode in which you can build mathematical expressions using explicit mathematical notation including fractions, derivatives, integrals, roots, etc. To use the equation writer for writing the expression shown above, use the following keystrokes: ‚OR3*!Ü5- 1/3*3 ———————...
  • 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 Enter 3 in level 1 Enter 5 in level 1, 3 moves to y Enter 3 in level 1, 5 moves to level 2, 3 to level 3 Place 3 and multiply, 9 appears in level 1 1/(3×3), last value in lev. 1; 5 in level 2; 3 in level 3 5 - 1/(3×3) , occupies level 1 now;...
  • Page 46: Number Format And Decimal Dot Or Comma

    line will execute the DUP function which copies the contents of stack level 1 of the stack onto level 2 (and pushes all the other stack levels one level up). This is extremely useful as showed in the previous example. To select between the ALG vs.
  • Page 47 The number is rounded to the maximum 12 significant figures, and is displayed as follows: In the standard format of decimal display, integer numbers are shown with no decimal zeros whatsoever. Numbers with different decimal figures will be adjusted in the display so that only those decimal figures that are necessary will be shown.
  • Page 48 • Fixed format with decimals: This mode is mainly used when working with limited precision. For example, if you are doing financial calculation, using a FIX 2 mode is convenient as it can easily represent monetary units to a 1/100 precision. Press the H button.
  • Page 49 • Scientific format The scientific format is mainly used when solving problems in the physical sciences where numbers are usually represented as a number with limited precision multiplied by a power of ten. To set this format, start by pressing the H button. Next, use the down arrow key, ˜, to select the option Number format.
  • Page 50 Press the !!@@OK#@ soft menu key return to the calculator display. 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 51: Angle Measure

    Angle Measure Trigonometric functions, for example, require arguments representing plane angles. The calculator provides three different Angle Measure modes for working with angles, namely: • Degrees: There are 360 degrees (360 ) in a complete circumference, or 90 degrees (90 ) in a right angle.
  • Page 52 The coordinate system selection affects the way vectors and complex numbers are displayed and entered. To learn more about complex numbers and vectors, see Chapters 4 and 9, respectively. Two- and three-dimensional vector components and complex numbers can be represented in any of 3 coordinate systems: The Cartesian (2 dimensional) or Rectangular (3 dimensional), Cylindrical (3 dimensional) or Polar (2 dimensional), and Spherical (only 3 dimensional).
  • Page 53: Beep, Key Click, And Last Stack

    • Press the H button. Next, use the down arrow key, ˜, three times. Select the Angle Measure mode by either using the \ key (second from left in the fifth row from the keyboard bottom), or pressing the @CHOOS soft menu key ( B).
  • Page 54: Selecting Cas Settings

    • Use the down arrow key, ˜, four times to select the _Last Stack option. soft menu key (i.e., the B key) to change the selection. @ CHK@ Use the • Press the left arrow key š to select the _Key Click option. Use the @ CHK@ soft menu key (i.e., the B key) to change the selection.
  • Page 55: Selecting The Display Font

    • To navigate through the many options in the DISPLAY MODES input form, use the arrow keys: š™˜—. • To select or deselect any of the settings shown above, that require a check mark, select the underline before the option of interest, and toggle the soft menu key until the right setting is achieved.
  • Page 56: Selecting Properties Of The Line Editor

    additional fonts that you may have created (see Chapter 23) or downloaded into the calculator. Practice changing the display fonts to sizes 7 and 6. Press the OK soft menu key to effect the selection. When done with a font selection, press the @@@OK@@@ soft menu key to go back to the CALCULATOR MODES input form.
  • Page 57: Selecting Properties Of The Equation Writer (Eqw)

    To illustrate these settings, either in algebraic or RPN mode, use the equation writer to type the following definite integral: ‚O…Á0™„虄¸\x™x` In Algebraic mode, the following screen shows the result of these keystrokes with neither _Small nor _Textbook are selected: With the _Small option selected only, the display looks as shown below: With the _Textbook option selected (default value), regardless of whether the _Small option is selected or not, the display shows the following result:...
  • Page 58: Selecting The Size Of The Header

    ∞ − For the example of the integral , presented above, selecting the _Small Stack Disp in the EQW line of the DISPLAY MODES input form produces the following display: 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 (D) to display the DISPLAY MODES input form.
  • Page 59: Chapter 2 - Introducing The Calculator

    Chapter 2 Introducing the calculator 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 60 If the approximate mode (APPROX) is selected in the CAS (see Appendix C), integers will be automatically converted to reals. If you are not planning to use the CAS, it might be a good idea to switch directly into approximate mode. Refer to Appendix C for more details.
  • Page 61: Editing Expressions In The Screen

    An algebraic object, or simply, an algebraic (object of type 9), is a valid algebraic expression enclosed between apostrophes. 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.
  • Page 62 5.*„Ü1.+1./7.5™/ „ÜR3.-2.Q3 The resulting expression is: 5.*(1.+1./7.5)/(ƒ3.-2.^3). Press ` to get the expression in the display as follows: Notice that, if your CAS is set to EXACT (see Appendix C) and you enter your expression using integer numbers for integer values, the result is a symbolic quantity, e.g., 5*„Ü1+1/7.5™/ „ÜR3-2Q3...
  • Page 63 The result will be shown as follows: To evaluate the expression we can use the EVAL function, as follows: µ„î` As in the previous example, you will be asked to approve changing the CAS setting to Approx. Once this is done, you will get the same result as before. An alternative way to evaluate the expression entered earlier between quotes is by using the option …ï.
  • Page 64: Editing Arithmetic Expressions

    This latter result is purely numerical, so that the two results in the stack, although representing the same expression, seem different. To verify that they are not, we subtract the two values and evaluate this difference using function EVAL: Subtract level 1 from level 2 µ...
  • Page 65: Creating Algebraic Expressions

    The editing cursor is shown as a blinking left arrow over the first character in the line to be edited. Since the editing in this case consists of removing some characters and replacing them with others, we will use the right and left arrow keys, š™, to move the cursor to the appropriate place for editing, and the delete key, ƒ, to eliminate characters.
  • Page 66: Editing Algebraic Expressions

    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 67 The editing cursor is shown as a blinking left arrow over the first character in the line to be edited. As in an earlier exercise on line editing, we will use the right and left arrow keys, š™, to move the cursor to the appropriate place for editing, and the delete key, ƒ, to eliminate characters.
  • Page 68: Using The Equation Writer (Eqw) To Create Expressions

    • Press „˜ to activate the line editor once more. The result is now: • 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 69: Creating Arithmetic Expressions

    The Equation Writer is launched by pressing the keystroke combination … ‚O (the third key in the fourth row from the top in the keyboard). The resulting screen is the following: The six soft menu keys for the Equation Writer activate the following functions: @EDIT: lets the user edit an entry in the line editor (see examples above) @CURS: highlights expression and adds a graphics cursor to it @BIG: if selected (selection shown by the character in the label) the font used in...
  • Page 70 in “textbook” style instead of a line-entry style. Thus, when a division sign (i.e., /) is entered in the Equation Writer, a fraction is generated and the cursor placed in the numerator. To move to the denominator you must use the down arrow key.
  • Page 71 The expression now looks as follows: 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...
  • Page 72 To recover the larger-font display, press the @BIG C soft menu key once more. Evaluating the expression To evaluate the expression (or parts of the expression) within the Equation Writer, highlight the part that you want to evaluate and press the @EVAL D soft menu key.
  • Page 73 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. You have to use the arrow keys to select that particular sub-expression.
  • Page 74: Editing Arithmetic Expressions

    Then, press the @EVAL D soft menu key to obtain: Let’s try a numerical evaluation of this term at this point. Use …ï to obtain: Let’s highlight the fraction to the right, and obtain a numerical evaluation of that term too, and show the sum of these two decimal values in small-font format by using:™...
  • Page 75 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. In this case, we will use them to trigger a special editing cursor. After you have finished entering the original expression, the typing cursor (a left-pointing arrow) will be located to the right of the 3 in the denominator of the second fraction as shown here:...
  • Page 76 Next, press the down arrow key (˜) to trigger the clear editing cursor highlighting the 3 in the denominator of π /3. Press the left arrow key (š) once to highlight the exponent 2 in the expression π /3. Next, press the delete key (ƒ) once to change the cursor into the insertion cursor.
  • Page 77: Creating Algebraic Expressions

    down arrow key (˜) in any location, 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. When you reach a point that you need to edit, use the delete key (ƒ) to trigger the insertion cursor and proceed with the edition of the expression.
  • Page 78: Editing Algebraic Expressions

    The expression tree The expression tree is a diagram showing how the Equation Writer interprets an expression. See Appendix E for a detailed example. The CURS function The CURS function (@CURS) in the Equation Writer menu (the B key) converts the display into a graphical display and produces a graphical cursor that can be controlled with the arrow keys (š™—˜) for selecting sub- expressions.
  • Page 79 • At an editing point, use the delete key (ƒ) to trigger the insertion cursor and proceed with the edition of the expression. To see the clear editing cursor in action, let’s start with the algebraic expression that we entered in the exercise above: Press the down arrow key, ˜, at its current location to trigger the clear editing cursor.
  • Page 80 ™ ~‚2 Enters the factorial for the 3 in the square root (entering the factorial changes the cursor to the selection cursor) ˜˜™™ Selects the µ in the exponential function /3*~‚f Modifies exponential function argument ™™™™ Selects ∆y Places a square root symbol on ∆y (this operation also changes the cursor to the selection cursor) ˜˜...
  • Page 81 This expression does not fit in the Equation Writer screen. We can see the entire expression by using a smaller-size font. Press the @BIG C soft menu key to get: Even with the larger-size font, it is possible to navigate through the entire expression by using the clear editing cursor.
  • Page 82 Factoring an expression In this exercise we will try factoring a polynomial expression. To continue the previous exercise, press the ` key. Then, launch the Equation Writer again by pressing the ‚O key. Type the equation: XQ2™+2*X*~y+~y Q2™- ~‚a Q2™™+~‚b Q2 resulting in Let’s select the first 3 terms in the expression and attempt a factoring of this sub-expression: ‚—˜‚™‚™...
  • Page 83 Press ‚¯to recover the original expression. Note: Pressing the @EVAL or the @SIMP soft menu keys, while the entire original expression is selected, produces the following simplification of the expression: Using the CMDS menu key With the original polynomial expression used in the previous exercise still selected, press the L key to show the @CMDS and @HELP soft menu keys.
  • Page 84 Next, press the L key to recover the original Equation Writer menu, and press the @EVAL@ soft menu key (D) to evaluate this derivative. The result is: Using the HELP menu Press the L key to show the @CMDS and @HELP soft menu keys. Press the @HELP soft menu key to get the list of CAS commands.
  • Page 85 2 / R3 ™™ * ~‚m + „¸\ ~‚m ™™ * ‚¹ ~„x + 2 * ~‚m * ~‚c ~„y ——— / ~‚t Q1/3 The original expression is the following: We want to remove the sub-expression x+2⋅λ⋅∆y from the argument of the LN function, and move it to the right of the λ...
  • Page 86: Creating And Editing Summations, Derivatives, And Integrals

    To select the sub-expression of interest, use: ™™™™™™™™‚¢ ™™™™™™™™™™‚¤ The screen shows the required sub-expression highlighted: 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 C soft menu key):...
  • Page 87 Press ‚O to activate the Equation Writer. Then press ‚½to enter the summation sign. Notice that the sign, when entered into the Equation Writer screen, provides input locations for the index of the summation as well as for the quantity being summed. To fill these input locations, use the following keystrokes: ~„k™1™„è™1/~„kQ2 The resulting screen is:...
  • Page 88 Derivatives We will use the Equation Writer to enter the following derivative: α β δ Press ‚O to activate the Equation Writer. Then press ‚¿to enter the (partial) derivative sign. Notice that the sign, when entered into the Equation Writer screen, provides input locations for the expression being differentiated and the variable of differentiation.
  • Page 89 α β δ α β Second order derivatives are possible, for example: which evaluates to: ∂ Note: The notation is proper of partial derivatives. The proper x ∂ notation for total derivatives (i.e., derivatives of one variable) is . The calculator, however, does not distinguish between partial and total derivatives.
  • Page 90: Organizing Data In The Calculator

    This indicates that the general expression for a derivative in the line editor or in the stack is: ∫(lower_limit, upper_limit,integrand,variable_of_integration) Press ` to return to the Equation Writer. The resulting screen is not the definite integral we entered, however, but its symbolic value, namely, To recover the derivative expression use ‚¯.
  • Page 91: Functions For Manipulation Of Variables

    This screen gives a snapshot of the calculator’s memory and of the directory tree. The screen shows that the calculator has three memory ports (or memory partitions), port 0:IRAM, port 1:ERAM, and port 2:FLASH . Memory ports are used to store third party application or libraries, as well as for backups. size of the three different ports is also indicated.
  • Page 92: The Home Directory

    @RENAM To rename a variable @NEW To create a new variable @ORDER To order a set of variables in the directory @SEND To send a variable to another calculator or computer @RECV To receive a variable from another calculator or computer If you press the L key, the third set of functions is made available: @HALT To return to the stack temporarily...
  • Page 93: The Casdir Sub-Directory

    subdirectories, in a hierarchy of directories similar to folders in modern computers. The subdirectories will be given names that may reflect the contents of each subdirectory, or any arbitrary name that you can think of. The CASDIR sub-directory The CASDIR sub-directory contains a number of variables needed by the proper operation of the CAS (Computer Algebraic System, see appendix C).
  • Page 94 GNAME means a global name, and REAL means a real (or floating-point) numeric variable. • The fourth and last column represents the size, in bytes, of the variable truncated, without decimals (i.e., nibbles). Thus, for example, variable PERIOD takes 12.5 bytes, while variable REALASSUME takes 27.5 bytes (1 byte = 8 bits, 1 bit is the smallest unit of memory in computers and calculators).
  • Page 95: Typing Directory And Variable Names

    variable, but one created by a previous exercise CASINFO a graph that provides CAS information MODULO Modulo for modular arithmetic (default = 13) REALASSUME List of variable names assumed as real values PERIOD Period for trigonometric functions (default = 2π) Name of default independent variable (default = X) Value of small increment (epsilon), (default = 10 These variables are used for the operation of the CAS.
  • Page 96: Creating Subdirectories

    ³~~math` ³~~m„a„t„h` ³~~m„~at„h` The calculator display will show the following (left-hand side is Algebraic mode, right-hand side is RPN mode): Note: if system flag 60 is set, you can lock the alphabetical keyboard by just pressing ~. See Chapter 1 for more information on system flags. Creating subdirectories Subdirectories can be created by using the FILES environment or by using the command CRDIR.
  • Page 97 showing that only one object exists currently in the HOME directory, namely, the CASDIR sub-directory. Let’s create another sub-directory called MANS (for MANualS) where we will store variables developed as exercises in this manual. To create this sub-directory first enter: L @@NEW@@ (C) . This will produce the following input form: The Object input field, the first input field in the form, is highlighted by default.
  • Page 98 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 99 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 100: Moving Among Subdirectories

    Command CRDIR in RPN mode To use the CRDIR in RPN mode you need to have the name of the directory already available in the stack before accessing the command. For example: ~~„~chap2~` Then access the CRDIR command by either of the means shown above, e.g., through the ‚N key: Press the @@OK@ soft menu key to activate the command, to create the sub- directory:...
  • Page 101 key to list the contents of the directory in the screen. Select the sub-directory (or variable) that you want to delete. Press L@PURGE. A screen similar to the following will be shown: The ‘S2’ string in this form is the name of the sub-directory that is being deleted.
  • Page 102 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 103 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 104: Variables

    Using the PURGE command from the TOOL menu The TOOL menu is available by pressing the I key (Algebraic and RPN modes shown): The PURGE command is available by pressing the @PURGE soft menu key (E). In the following examples we want to delete sub-directory S1: •...
  • Page 105 sub-directory {HOME MANS INTRO}, created in an earlier example, we want to store the following variables with the values shown: Name Contents Type 12.5 real α -0.25 real 3×10 real ‘r/(m+r)' algebraic [3,2,1] vector 3+5i complex << → r 'π*r^2' >> program Using the FILES menu We will use the FILES menu to enter the variable A.
  • Page 106 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 ( ), whose name is A, and that occupies...
  • Page 107 Name Contents Type α -0.25 real 3×10 real ‘r/(m+r)' algebraic [3,2,1] vector 3+5i complex << → r 'π*r^2' >> program • Algebraic mode Use the following keystrokes to store the value of –0.25 into variable α: 0.25\ K ~‚a. AT this point, the screen will look as follows: This expression means that the value –0.25 is being stored into α...
  • Page 108 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 α: 0.25\` ~‚a`. At this point, the screen will look as follows: This expression means that the value –0.25 is ready to be stored into α.
  • Page 109: Checking Variable Contents

    Checking variables contents As an exercise on peeking into the contents of variables we will use the seven variables entered in the exercise above. We showed how to use the FILES menu to view the contents of a variable in an earlier exercise when we created the variable A.
  • Page 110 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`. The result is: The program has the following structure: << → r 'π*r^2' >> The «...
  • Page 111: Replacing The Contents Of Variables

    Using the right-shift key ‚ followed by soft menu key labels This approach for viewing the contents of a variable works the same in both Algebraic and RPN modes. Try the following examples in either mode: J‚@@p1@@ ‚ @@z1@@ ‚ @@@R@@ ‚@@@Q@@ ‚ @@A12@@ This produces the following screen (Algebraic mode in the left, RPN in the right) Notice that this time the contents of program p1 are listed in the screen.
  • Page 112: Copying Variables

    Check the new contents of variable A12 by using ‚@@A12@@ . Using the RPN operating mode: ³~‚b/2` ³@@A12@@ ` K or, in a simplified way, ³~‚b/2™ ³@@A12@@ K Using the left-shift „ key followed by the variable’s soft menu key (RPN) This is a very simple way to change the contents of a variable, but it only works in the RPN mode.
  • Page 113 variables p1, z1, R, Q, A12, α, and A. Suppose that we want to copy variable A and place a copy in sub-directory {HOME MANS}. Also, we will copy variable R and place a copy in the HOME directory. Here is how to do it: Press „¡@@OK@@ to produce the following list of variables: Use the down-arrow key ˜...
  • Page 114 Using the history in Algebraic mode 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 115: Reordering Variables In A Directory

    ‚@@ @Q@@ K@@@Q@@ ` „§` ƒ ƒ ƒ` ƒ ƒ ƒ ƒ ` To verify the contents of the variables, use ‚@@ @R@ and ‚@@ @Q. This procedure can be generalized to the copying of three or more variables. Copying two or more variables using the stack in RPN mode The following is an exercise to demonstrate how to copy two or more variables using the stack when the calculator is in RPN mode.
  • Page 116: Moving Variables Using The Files Menu

    Next, we’ll list the new order of the variables by using their names typed between quotes: „ä ³) @ INTRO ™‚í³@@@@A@@@ ™‚í³@@@z1@@™‚í³@@@Q@@@™ ‚í³@@@@R@@@ ™‚í³@@A12@@ ` The screen now shows the new ordering of the variables: RPN mode In RPN mode, the list of re-ordered variables is listed in the stack before applying the command ORDER.
  • Page 117: 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 118 Using function PURGE in the stack in Algebraic mode We start again at subdirectory {HOME MANS INTRO} containing now only variables p1, z1, Q, R, and α. We will use command PURGE to delete 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.
  • Page 119: Undo And Cmd Functions

    UNDO and CMD functions Functions UNDO and CMD are useful for recovering recent commands, or to revert an operation if a mistake was made. These functions are associated with the HIST key: UNDO results from the keystroke sequence ‚¯, while CMD results from the keystroke sequence „®.
  • Page 120: Flags

    Pressing „® produces the following selection box: As you can see, the numbers 3, 2, and 5, used in the first calculation above, are listed in the selection box, as well as the algebraic ‘SIN(5x2)’, but not the SIN function entered previous to the algebraic. Flags 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.
  • Page 121: Example Of Flag Setting: General Solution Vs. Principal Value

    Example of flag setting: general solutions vs. principal value For example, the default value for system flag 01 is General solutions. What this means is that, if an equation has multiple solutions, all the solutions will be returned by the calculator, most likely in a list. By pressing the soft @ CHK@ menu key you can change system flag 01 to Principal value.
  • Page 122: Other Flags Of Interest

    ‚O~ „t Q2™+5*~ „t+6—— ‚Å0` ` (keeping a second copy in the RPN stack) ³~ „t` Use the following keystroke sequence to enter the QUAD command: ‚N~q (use the up and down arrow keys, —˜ , to select command QUAD) , press @@OK@@ . The screen shows the principal solution: Now, change the setting of flag 01 to General solutions: H@FLAGS@ @ CHK@ @@OK@@ @@OK@@ .
  • Page 123: Choose Boxes Vs. Soft Menus

    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. This menu lists are referred to as CHOOSE boxes. For example, to use the ORDER command to reorder variables in a directory, we used: „°˜...
  • Page 124: Selected Choose Boxes

    Press twice to return to normal calculator display. Now, we’ll try to find the ORDER command using similar keystrokes to those used above, i.e., we start with „°. Notice that instead of a menu list, we get soft menu labels with the different options in the PROG menu, i.e., Press B to select the MEMORY soft menu () @ @MEM@@).
  • Page 125 • The HELP menu, activated with I L @HELP • The CMDS (CoMmanDS) menu, activated within the Equation Writer, i.e., ‚O L @CMDS Page 2-67...
  • Page 126: Checking Calculator Settings

    Chapter 3 Calculation with real numbers This chapter demonstrates the use of the calculator for operations and functions related to real numbers. Operations along these lines are useful for most common calculations in the physical sciences and engineering. The user should be acquainted with the keyboard to identify certain functions available in the keyboard (e.g., SIN, COS, TAN, etc.).
  • Page 127: Checking Calculator Mode

    The symbol ∠ 2. Coordinate system specification (XYZ, R∠Z, R∠∠). stands for an angular coordinate. XYZ: Cartesian or rectangular (x,y,z) R∠Z: cylindrical Polar coordinates (r,θ,z) R∠∠: Spherical coordinates (ρ,θ,φ) 3. Number base specification (HEX, DEC, OCT, BIN) HEX: hexadecimal numbers (base 16) DEC: decimal numbers (base 10) OCT: octal numbers (base 8) BIN: binary numbers (base 2)
  • Page 128: Changing Sing Of A Number, Variable, Or Expression

    Changing sign of a number, variable, or expression Use the \ key. In ALG mode, you can press \ before entering the number, e.g., \2.5`. Result = -2.5. In RPN mode, you need to enter at least part of the number first, and then use the \ key, e.g., 2.5\.
  • Page 129: Using Parentheses

    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. The parentheses are available through the keystroke combination „Ü. Parentheses are always entered in pairs. For example, to calculate (5+3.2)/(7-2.2): In ALG mode: „Ü5+3.2™/„Ü7-2.2` In RPN mode, you do not need the parenthesis, calculation is done directly on...
  • Page 130: Powers And Roots

    In RPN mode, enter the number first, then the function, e.g., 2.3\„º The square root function, √, is available through the R key. When calculating in the stack in ALG mode, enter the function before the argument, e.g., R123.4` In RPN mode, enter the number first, then the function, e.g., 123.4R Powers and roots The power function, ^, is available through the Q key.
  • Page 131: Natural Logarithms And Exponential Function

    Or, in RPN mode: 4.5\V2\` Natural logarithms and exponential function Natural logarithms (i.e., logarithms of base e = 2.7182818282) are calculated by the keystroke combination ‚¹ (function LN) while its inverse function, the exponential function (function EXP) is calculated by using „¸.
  • Page 132: Differences Between Functions And Operators

    „À1.35` In RPN mode: 0.25`„¼ 0.85`„¾ 1.35`„À All the functions described above, namely, ABS, SQ, √, ^, XROOT, LOG, ALOG, LN, EXP, SIN, COS, TAN, ASIN, ACOS, ATAN, can be combined with the fundamental operations (+-*/) to form more complex expressions.
  • Page 133 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. VECTOR.., 2. MATRIX., and 3. LIST.. apply to those data types (i.e., vectors, matrices, and lists) and will discussed in more detail in subsequent chapters.
  • Page 134: Hyperbolic Functions And Their Inverses

    example, to select option 4. HYPERBOLIC.. in the MTH menu, simply press 4. 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:...
  • Page 135 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 136: Real Number Functions

    For example, to calculate tanh(2.5), in the ALG mode, when using SOFT menus over CHOOSE boxes, follow this procedure: „´ Select MTH menu ) @ @HYP@ Select the HYPERBOLIC.. menu @@TANH@ Select the TANH function 2.5` Evaluate tanh(2.5) In RPN mode, the same value is calculated using: 2.5` Enter argument in the stack „´...
  • Page 137 Option 19. MATH.. returns the user to the MTH menu. The remaining functions are grouped into six different groups described below. If system flag 117 is set to SOFT menus, the REAL functions menu will look like this (ALG mode used, the same soft menu keys will be available in RPN mode): The very last option, ) @ @MTH@, returns the user to the MTH menu.
  • Page 138 Calculate function The result is shown next: In RPN mode, recall that argument y is located in the second level of the stack, while argument x is located in the first level of the stack. This means, you should enter x first, and then, y, just as in ALG mode. Thus, the calculation of %T(15,45), in RPN mode, and with system flag 117 set to CHOOSE boxes, we proceed as follows: Enter first argument...
  • Page 139: 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) : calculates the absolute value, |x|...
  • Page 140 The Gamma function Γ(α) GAMMA: PSI: N-th derivative of the digamma function Psi: Digamma function, derivative of the ln(Gamma) ∞ ∫ α − − α The Gamma function is defined by . This function has applications in applied mathematics for science and engineering, as well as in probability and statistics.
  • Page 141: Calculator Constants

    Examples of these special functions are shown here using both the ALG and RPN modes. As an exercise, verify that GAMMA(2.3) = 1.166711…, 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: •...
  • Page 142: Operation With Units

    Please notice that e is available from the keyboard as exp(1), i.e., „¸1`, in ALG mode, or 1` „¸, in RPN mode. Also, π is available directly from the keyboard as „ì. Finally, i is available by using „¥. Operations with units Numbers in the calculator can have units associated with them.
  • Page 143: Available Units

    unit of mass), kip = kilo-poundal (1000 pounds), lbf = pound-force (to distinguish from pound-mass), pdl = poundal. To attach a unit object to a number, the number must be followed by an underscore. Thus, a force of 5 N will be entered as 5_N. For extensive operations with units SOFT menus provide a more convenient way of attaching units.
  • Page 144 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 (kilometer), mi (international mile), nmi (nautical mile), miUS (US statute mile), chain (chain), rd (rod), fath (fathom), ftUS (survey foot), Mil (Mil), µ (micron), Å...
  • Page 145 ENERGY J (joule), erg (erg), Kcal (kilocalorie), Cal (calorie), Btu (International table btu), ft×lbf (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 of water), TEMPERATURE...
  • Page 146: Converting To Base Units

    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. The menu will show in the screen as follows (use ‚˜to show labels in display): These units are also accessible through the catalog, for example:...
  • Page 147: Attaching Units To Numbers

    This results in the following screen (i.e., 1 poise = 0.1 kg/(m⋅s)): In RPN mode, system flag 117 set to CHOOSE boxes: Enter 1 (no underline) Select the UNITS menu ‚Û — @@OK@@ Select the VISCOSITY option @@OK@@ Select the unit P (poise) Select the UNITS menu ‚Û...
  • Page 148 Here is the sequence of steps to enter this number in ALG mode, system flag 117 set to CHOOSE boxes: Enter number and underscore 5‚Ý Access the UNITS menu ‚Û Select units of force (8. Force..) 8@@OK@@ @@OK@@ Select Newtons (N) Enter quantity with units in the stack The screen will look like the following: Note: If you forget the underscore, the result is the expression 5*N, where N...
  • Page 149 Access the UNITS menu ‚Û L @) @ FORCE Select units of force @ @@N@@ Select Newtons (N) Enter quantity with units in the stack The same quantity, entered in RPN mode uses the following keystrokes: Enter number (no underscore) Access the UNITS menu ‚Û...
  • Page 150: Operations With Units

    To enter these prefixes, simply type the prefix using the ~ keyboard. For example, to enter 123 pm (1 picometer), use: 123‚Ý~„p~„m Using UBASE to convert to the default unit (1 m) results in: Operations with units Once a quantity accompanied with units is entered into the stack, it can be used in operations similar to plain numbers, except that quantities with units cannot be used as arguments of functions (say, SQ or SIN).
  • Page 151 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 `: More complicated expression require the use of parentheses, e.g., (12_mm)*(1_cm^2)/(2_s) `:...
  • Page 152: Units Manipulation Tools

    Also, try the following operations: 5_m ` 3200_mm ` + 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. Units manipulation tools The UNITS menu contains a TOOLS sub-menu, which provides the following functions: CONVERT(x,y): convert unit object x to units of object y...
  • Page 153 These examples produce the same result, i.e., to convert 33 watts to btu’s CONVERT(33_W,1_hp) ` CONVERT(33_W,11_hp) ` These operations are shown in the screen as: Examples of UVAL: UVAL(25_ft/s) ` UVAL(0.021_cm^3) ` Examples of UFACT UFACT(1_ha,18_km^2) ` UFACT(1_mm,15.1_cm) ` Examples of UNIT UNIT(25,1_m) ` UNIT(11.3,1_mph) `...
  • Page 154: 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 launch this command you could simply type it in the stack: ~~conlib~` or, you can select the command CONLIB from the command catalog, as follows: First, launch the catalog by using: ‚N~c.
  • Page 155 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 STK copies value (with or without units) to the stack QUIT...
  • Page 156: Special Physical Functions

    To copy the value of Vm to the stack, select the variable name, and press !²STK, 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 157: Function Zfactor

    In the second page of this menu (press L) we find the following items: In this menu page, there is one function (TINC) and a number of units described in an earlier section on units (see above). The function of interest is: TINC: temperature increment command Out of all the functions available in this MENU (UTILITY menu), namely, ZFACTOR, FANNING, DARCY, F0λ, SIDENS, TDELTA, and TINC, functions...
  • Page 158: Function Sidens

    Function SIDENS Function SIDENS(T) calculates the intrinsic density of silicon (in units of 1/cm as a function of temperature T (T in K), for T between 0 and 1685 K. For example, Function TDELTA Function TDELTA(T ) yields the temperature increment T –...
  • Page 159: Defining And Using Functions

    Defining and using functions Users can define their own functions by using the DEF command available thought the keystroke sequence „à (associated with the 2 key). The function must be entered in the following format: Function_name(arguments) = expression_containing_arguments For example, we could define a simple functionH(x) = ln(x+1) + exp(-x). Suppose that you have a need to evaluate this function for a number of discrete values and, therefore, you want to be able to press a single button and get the result you want without having to type the expression in the right-...
  • Page 160: Functions Defined By More Than One Expression

    • Input: • Process: ‘LN(x+1) + EXP(x) ‘ This is to be interpreted as saying: enter a value that is temporarily assigned to the name x (referred to as a local variable), evaluate the expression between quotes that contain that local variable, and show the evaluated expression.
  • Page 161: The Ifte Function

    The calculator provides the function IFTE (IF-Then-Else) to describe such functions. The IFTE function The IFTE function is written as IFTE(condition, operation_if_true, operation_if_false) If condition is true then operation_if_true is performed, else operation_if_false is performed. For example, we can write ‘f(x) = IFTE(x>0, x^2-1, 2*x-1)’, to describe the function listed above.
  • Page 162 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 3-37...
  • Page 163: Chapter 4 - Calculations With Complex Numbers

    Chapter 4 Calculations with complex numbers This chapter shows examples of calculations and application of functions to complex numbers. Definitions A complex number z is a number written as z = x + iy, where x and y are real numbers, and i is the imaginary unit defined by i = -1.
  • Page 164: 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: „Ü3.5‚í\1.2` A complex number can also be entered in the form x+iy.
  • Page 165: Polar Representation Of A Complex Number

    Polar representation of a complex number The result shown above represents a Cartesian (rectangular) representation of the complex number 3.5-1.2i. A polar representation is possible if we change the coordinate system to cylindrical or polar, by using function CYLIN. You can find this function in the catalog (‚N). Changing to polar shows the result: For this result the angular measure is set to radians (you can always change to radians by using function RAD).
  • Page 166: Simple Operations With Complex Numbers

    Simple operations with complex numbers Complex numbers can be combined using the four fundamental operations (+-*/). 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): Notice that the real parts (3+6) and imaginary parts (5-3) are combined together and the result given as an ordered pair with real part 9 and...
  • Page 167: Entering The Unit Imaginary Number

    Entering the unit imaginary number To enter the unit imaginary number type : „¥ Notice that the number i is entered as the ordered pair (0,1) if the CAS is set to APPROX mode. In EXACT mode, the unit imaginary number is entered as i. Other operations Operations such as magnitude, argument, real and imaginary parts, and complex conjugate are available through the CMPLX menus detailed later.
  • Page 168 RE(z) : Real part of a complex number IM(z) : Imaginary part of a complex number →R(z) : Takes a complex number (x,y) and separates it into its real and imaginary parts →C(x,y): Forms the complex number (x,y) out of real numbers x and y ABS(z) : Calculates the magnitude of a complex number or the absolute value of a real number.
  • Page 169: Cmplx Menu In Keyboard

    Also, the result of function ARG, which represents an angle, will be given in the units of angle measure currently selected. In this example, ARG(3.+5. i) = 1.0303… is given in radians. In the next screen we present examples of functions SIGN, NEG (which shows up as the negative sign - ), and CONJ.
  • Page 170: Functions Applied To Complex Numbers

    Functions applied to complex numbers Many of the keyboard-based functions defined in Chapter 3 for real numbers, e.g., SQ, ,LN, e , LOG, 10 , SIN, COS, TAN, ASIN, ACOS, ATAN, can be applied to complex numbers. The result is another complex number, as illustrated in the following examples.
  • Page 171: Function Droite: Equation Of A Straight Line

    The following screen shows that functions EXPM and LNP1 do not apply to complex numbers. However, functions GAMMA, PSI, and Psi accept complex numbers: Function DROITE: equation of a straight line Function DROITE takes as argument two complex numbers, say, x , and returns the equation of the straight line, say, y = a+bx, that contains the points (x ) and (x...
  • Page 172: Chapter 5 - Algebraic And Arithmetic Operations

    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: •...
  • Page 173: Simple Operations With Algebraic Objects

    Simple operations with algebraic objects Algebraic objects can be added, subtracted, multiplied, divided (except by zero), raised to a power, used as arguments for a variety of standard functions (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’...
  • Page 174: Functions In The Alg Menu

    @@A1@@ * @@A2@@ ` @@A1@@ / @@A2@@ ` ‚¹@@A1@@ „¸@@A2@@ The same results are obtained in RPN mode if using the following keystrokes: @@A1@@ ` @@A2@@ + @@A1@@ `@@A2@@ - @@A1@@ ` @@A2@@ * @@A1@@ `@@A2@@ / @@A1@@ ` ‚¹ @@A2@@ `„¸...
  • Page 175 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. Pressing @SEE1!, for example, shows the following information for EXPAND: The help facility provides not only information on each command, but also provides an example of its application.
  • Page 176: Factor,

    The help facility will show the following information on the commands: COLLECT: EXPAND: FACTOR: LNCOLLECT: LIN: PARTFRAC: SOLVE: SUBST: TEXPAND: Page 5-5...
  • Page 177: Other Forms Of Substitution In Algebraic Expressions

    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 178: Operations With Transcendental Functions

    In ALG mode, substitution of more than one variable is possible as illustrated in the following example (shown before and after pressing `) In RPN mode, it is also possible to substitute more than one variable at a time, as illustrated in the example below. Recall that RPN mode uses a list of variable names and values for substitution.
  • Page 179: Expansion And Factoring Using Log-Exp Functions

    hyperbolic functions in terms of trigonometric identities or in terms of exponential functions. The menus containing functions to replace trigonometric functions can be obtained directly from the keyboard by pressing the right-shift key followed by the 8 key, i.e., ‚Ñ. The combination of this key with the left-shift key, i.e., ‚...
  • Page 180: Functions In The Arithmetic Menu

    These functions allow to simplify expressions by replacing some category of trigonometric functions for another one. For example, the function ACOS2S allows to replace the function arccosine (acos(x)) with its expression in terms of arcsine (asin(x)). Description of these commands and examples of their applications are available in the calculator’s help facility (IL@HELP).
  • Page 181: Divis

    of functions that apply to specific mathematical objects. This distinction between sub-menus (options 1 through 4) and plain functions (options 5 through 9) is made clear when system flag 117 is set to SOFT menus. Activating the ARITHMETIC menu („Þ ), under these circumstances, produces: Following, we present the help facility entries for the functions of options 5 through 9 in the ARITHMETIC menu:...
  • Page 182: Polynomial Menu

    IABCUV Solves au + bv = c, with a,b,c = integers IBERNOULLI n-th Bernoulli number ICHINREM Chinese reminder for integers IDIV2 Euclidean division of two integers IEGCD Returns u,v, such that au + bv = gcd(a,b) IQUOT Euclidean quotient of two integers IREMAINDER Euclidean remainder of two integers ISPRIME? Test if an integer number is prime...
  • Page 183: Modulo Menu

    MODULO menu ADDTMOD Add two expressions modulo current modulus DIVMOD Divides 2 polynomials modulo current modulus DIV2MOD Euclidean division of 2 polynomials with modular coefficients EXPANDMOD Expands/simplify polynomial modulo current modulus FACTORMOD Factorize a polynomial modulo current modulus GCDMOD GCD of 2 polynomials modulo current modulus INVMOD inverse of integer modulo current modulus (not entry available in the help facility)
  • Page 184 Operations in modular arithmetic Addition in modular arithmetic of modulus n, which is a positive integer, follow the rules that if j and k are any two nonnegative integer numbers, both smaller than n, if j+k≥ n, then j+k is defined as j+k-n. For example, in the case of the clock, i.e., for n = 12, 6+9 “=”...
  • Page 185 6 does not show the result 5 in modulus 12 arithmetic. This multiplication table is shown below: 6*0 (mod 12) 6*6 (mod 12) 6*1 (mod 12) 6*7 (mod 12) 6*2 (mod 12) 6*8 (mod 12) 6*3 (mod 12) 6*9 (mod 12) 6*4 (mod 12) 6*10 (mod 12) 6*5 (mod 12)
  • Page 186 Finite arithmetic rings in the calculator All along we have defined our finite arithmetic operation so that the results are always positive. The modular arithmetic system in the calculator is set so that the ring of modulus n includes the numbers -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.
  • Page 187 ADDTMOD examples 6+5 ≡ -1 (mod 12) 6+6 ≡ 0 (mod 12) 6+7 ≡ 1 (mod 12) 11+5 ≡ 4 (mod 12) 8+10 ≡ -6 (mod 12) SUBTMOD examples 5 - 7 ≡ -2 (mod 12) 8 – 4 ≡ 4 (mod 12) 5 –10 ≡...
  • Page 188 before operating on them. You can also convert any number into a ring number by using the function EXPANDMOD. For example, EXPANDMOD(125) ≡ 5 (mod 12) EXPANDMOD(17) ≡ 5 (mod 12) EXPANDMOD(6) ≡ 6 (mod 12) 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 ≡...
  • Page 189: Polynomials

    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. Polynomials Polynomials are algebraic expressions consisting of one or more terms containing decreasing powers of a given variable.
  • Page 190: The Chinrem Function

    The CHINREM function CHINREM stands for CHINese REMainder. The operation coded in this command solves a system of two congruences using the Chinese Remainder Theorem. This command can be used with polynomials, as well as with integer numbers (function ICHINREM). The input consists of two vectors [expression_1, modulo_1] and [expression_2, modulo_2].
  • Page 191: The Hermite Function

    The HERMITE function The function HERMITE [HERMI] uses as argument an integer number, k, and returns the Hermite polynomial of k-th degree. A Hermite polynomial, He is defined as − − ,... An alternate definition of the Hermite polynomials is −...
  • Page 192: The Lagrange Function

    The LAGRANGE function The function LAGRANGE requires as input a matrix having two rows and n columns. The matrix stores data points of the form [[x , …, x ] [y , …, ]]. Application of the function LAGRANGE produces the polynomial expanded from ∏...
  • Page 193: The Legendre Function

    The LEGENDRE function A Legendre polynomial of order n is a polynomial function that solves the differential equation To obtain the n-th order Legendre polynomial, use LEGENDRE(n), e.g., LEGENDRE(3) = ‘(5*X^3-3*X)/2’ LEGENDRE(5) = ‘(63*X ^5-70*X^3+15*X)/8’ 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.
  • Page 194: The Epsx0 Function And The Cas Variable Eps

    The QUOT and REMAINDER functions The functions QUOT and REMAINDER provide, respectively, the quotient Q(X) and the remainder R(X), resulting from dividing two polynomials, P (X) and (X). In other words, they provide the values of Q(X) and R(X) from (X)/P (X) = Q(X) + R(X)/P (X).
  • Page 195: The Tchebycheff Function

    The TCHEBYCHEFF function The function TCHEBYCHEFF(n) generates the Tchebycheff (or Chebyshev) polynomial of the first kind, order n, defined as T (X) = cos(n⋅arccos(X)). If the integer n is negative (n < 0), the function TCHEBYCHEFF(n) generates the (X) = Tchebycheff polynomial of the second kind, order n, defined as sin(n⋅arccos(X))/sin(arccos(X)).
  • Page 196: The Partfrac Function

    PROPFRAC(‘5/4’) = ‘1+1/4’ PROPFRAC(‘(x^2+1)/x^2’) = ‘1+1/x^2’ The PARTFRAC function The function PARTFRAC decomposes a rational fraction into the partial fractions that produce the original fraction. For example: PARTFRAC(‘(2*X^6-14*X^5+29*X^4-37*X^3+41*X^2-16*X+5)/(X^5- 7*X^4+11*X^3-7*X^2+10*X)’) = ‘2*X+(1/2/(X-2)+5/(X-5)+1/2/X+X/(X^2+1))’ This technique is useful in calculating integrals (see chapter on calculus) of rational fractions.
  • Page 197: The Froots Function

    If you press µ you will get: ‘(X^6+8*X^5+5*X^4-50*X^3)/(X^7+13*X^6+61*X^5+105*X^4-45*X^3- 297*X^2-81*X+243)’ The FROOTS function The function FROOTS obtains the roots and poles of a fraction. As an example, applying function FROOTS to the result produced above, will result in: [1 –2. –3 –5. 0 3. 2 1. –5 2.]. The result shows poles followed by their multiplicity as a negative number, and roots followed by their multiplicity as a positive number.
  • Page 198: 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. UNITS convert menu (Option 1) This menu is the same as the UNITS menu obtained by using ‚Û.
  • Page 199: Base Convert Menu

    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 200 NUM has the same effect as the keystroke combination ‚ï Function (associated with the ` key). Function NUM converts a symbolic result into its floating-point value. Function Q converts a floating-point value into Qπ converts a floating-point value into a fraction of π, a fraction.
  • Page 201 LNCOLLECT POWEREXPAND SIMPLIFY Page 5-30...
  • Page 202: Chapter 6 - Solution To Single 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 203: 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.
  • Page 204 The following examples show the use of function SOLVE in ALG and RPN modes: The screen shot shown above displays two solutions. In the first one, β -5β =125, SOLVE produces no solutions { }. In the second one, β - 5β...
  • Page 205: Function Solvevx

    Function SOLVEVX The function SOLVEVX solves an equation for the default CAS variable contained in the reserved variable name VX. By default, this variable is set to ‘X’. Examples, using the ALG mode with VX = ‘X’, are shown below: In the first case SOLVEVX could not find a solution.
  • Page 206: Numerical Solver Menu

    To use function ZEROS in RPN mode, enter first the polynomial expression, then the variable to solve for, and then function ZEROS. The following screen shots show the RPN stack before and after the application of ZEROS to the two examples above: The Symbolic Solver functions presented above produce solutions to rational equations (mainly, polynomial equations).
  • Page 207: Polynomial Equations

    Notes: 1. Whenever you solve for a value in the NUM.SLV applications, the value solved for will be placed in the stack. This is useful if you need to keep that value available for other operations. 2. There will be one or more variables created whenever you activate some of the applications in the NUM.SLV menu.
  • Page 208 Press ` to return to stack. The stack will show the following results in ALG mode (the same result would be shown in RPN mode): To see all the solutions, press the down-arrow key (˜) to trigger the line editor: All the solutions are complex numbers: (0.432,-0.389), (0.432,0.389), (- 0.766, 0.632), (-0.766, -0.632).
  • Page 209 Press ` to return to stack, the coefficients will be shown in the stack. Press ˜ to trigger the line editor to see all the coefficients. Note: If you want to get a polynomial with real coefficients, but having complex roots, you must include the complex roots in pairs of conjugate numbers.
  • Page 210: Financial Calculations

    To generate the algebraic expression using the roots, try the following example. Assume that the polynomial roots are [1,3,-2,1]. Use the following keystrokes: ‚Ϙ˜@@OK@@ Select Solve poly… ˜„Ô1‚í3 Enter vector of roots ‚í2\‚í 1@@OK@@ ˜@SYMB@ Generate symbolic expression Return to stack. The expression thus generated is shown in the stack as:' (X-1)*(X-3)*(X+2)*(X-1) To expand the products, you can use the EXPAND command.
  • Page 211 Definitions Often, to develop projects, it is necessary to borrow money from a financial institution or from public funds. The amount of money borrowed is referred to as the Present Value (PV). This money is to be repaid through n periods (typically multiples or sub-multiples of a month) subject to an annual interest rate of I%YR.
  • Page 212 The screen now shows the value of PMT as –39,132.30, i.e., the borrower must pay the lender US $ 39,132.30 at the end of each month for the next 60 months to repay the entire amount. 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.
  • Page 213 This means that at the end of 60 months the US $ 2,000,000.00 principal amount has been paid, together with US $ 347,937.79 of interest, with the balance being that the lender owes the borrower US $ 0.000316. Of course, the balance should be zero. The value shown in the screen above is simply round-off error resulting from the numerical solution.
  • Page 214 2. The values calculated in the financial calculator environment are copied to the stack with their corresponding tag (identifying label). Deleting the variables When you use the financial calculator environment for the first time within the HOME directory, or any sub-directory, it will generate the variables @@@N@@ @I©YR@ @@PV@@ @@PMT@@ @@PYR@@ @@FV@@ to store the corresponding terms in the calculations..
  • Page 215: Solving Equations With One Unknown Through Num.slv

    J „ä Prepare a list of variables to be purged @@@n@@ Enter name of variable N @I©YR@ Enter name of variable I%YR @@PV@@ Enter name of variable PV @@PMT@@ Enter name of variable PMT @@PYR@@ Enter name of variable PYR @@FV@@ Enter name of variable FV Enter list of variables in stack...
  • Page 216 Press J to see the newly created EQ variable: Then, enter the SOLVE environment and select Solve equation…, by using: ‚Ï@@OK@@. The corresponding screen will be shown as: The equation we stored in variable EQ is already loaded in the Eq field in the SOLVE EQUATION input form.
  • Page 217 • The user then highlights the field corresponding to the unknown for which to solve the equation, and presses @SOLVE@ • The user may force a solution by providing an initial guess for the solution in the appropriate input field before solving the equation. The calculator uses a search algorithm to pinpoint an interval for which the function changes sign, which indicates the existence of a root or solution.
  • Page 218 At this point follow the instructions from Chapter 2 on how to use the Equation Writer to build an equation. The equation to enter in the Eq field should look like this (notice that we use only one sub-index to refer to the variables, i.e., is translated as ex, etc.
  • Page 219 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 expansion.
  • Page 220 We can type in the equation for E as shown above and use auxiliary variables for A and V, so that the resulting input form will have fields for the fundamental variables y, Q, g, m, and b, as follows: •...
  • Page 221 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 222 . The quantity f is known as the friction factor of written as the flow and it has been found to be a function of the relative roughness of the pipe, ε/D, and a (dimensionless) Reynolds number, Re. The Reynolds number is defined as Re = ρVD/µ...
  • Page 223 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 224 Thus, the equation we are solving, after combining the different variables in the directory, is: ε π DARCY π The combined equation has primitive variables: h , Q, L, g, D, ε, and Nu. Launch the numerical solver (‚Ï@@OK@@) to see the primitive variables listed in the SOLVE EQUATION input form: Suppose that we use the values hf = 2 m, ε...
  • Page 225 Example 4 – Universal gravitation Newton’s law of universal gravitation indicates that the magnitude of the attractive force between two bodies of masses m and m separated by a ⋅ ⋅ distance r is given by the equation 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 as:...
  • Page 226 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 227 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 228: 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 229: The Solvr Sub-Menu

    The SOLVR sub-menu The SOLVR sub-menu activates the soft-menu solver for the equation currently stored in EQ. Some examples are shown next: 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 230 As variables Q, a, and b, get assigned numerical values, the assignments are listed in the upper left corner of the display. At this point we can solve for t, by using „[ t ]. The result is t: 2. Pressing @EXPR= shows the results: Example 3 - Solving two simultaneous equations, one at a time You can also solve more than one equation by solving one equation at a time, and repeating the process until a solution is found.
  • Page 231: The Diffe Sub-Menu

    After solving the two equations, one at a time, we notice that, up to the third decimal, X is converging to a value of 7.500, while Y is converging to a value o 0.799. Using units with the SOLVR sub-menu These are some rules on the use of units with the SOLVR sub-menu: •...
  • Page 232: The Sys Sub-Menu

    Function PROOT This function is used to find the roots of a polynomial given a vector containing the polynomial coefficients in decreasing order of the powers of the independent variable. In other words, if the polynomial is a + … + a x + a , the vector of coefficients should be entered as [a , …...
  • Page 233 The SOLVR sub-menu The SOLVR sub-menu in the TVM sub-menu will launch the solver for solving TVM problems. For example, pressing @) S OLVR, at this point, will trigger the following screen: As an exercise, try using the values n = 10, I%YR = 5.6, PV = 10000, and FV = 0, and enter „[ PMT ] to find PMT = -1021.08….
  • Page 234 Function BEG If selected, the TMV calculations use payments at the beginning of each period. If deselected, the TMV calculations use payments at the end of each period. Page 6-33...
  • Page 235: Chapter 7 - Solving Multiple Equations

    Chapter 7 Solving multiple equations Many problems of science and engineering require the simultaneous solutions of more than one equation. The calculator provides several procedures for solving multiple equations as presented below. Please notice that no discussion of solving systems of linear equations is presented in this chapter. Linear systems solutions will be discussed in detail in subsequent chapters on matrices and linear algebra.
  • Page 236: Example 2 - Stresses In A Thick Wall Cylinder

    At this point, we need only press K twice to store these variables. To solve, first change CAS mode to , then, list the contents of A2 and A1, Exact in that order: @@@A2@@@ @@@A1@@@ . Use command SOLVE at this point (from the S.SLV menu: „Î) After about 40 seconds, maybe more, you get as result a list: { ‘t = (x-x0)/(COS(θ0)*v0)’...
  • Page 237 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 238: Example 3 - System Of Polynomial Equations

    To solve for P and P , use the command SOLVE from the S.SLV menu („Î), it may take the calculator a minute to produce the result: {[‘Pi=-(((σθ-σr)*r^2-(σθ+σr)*a^2)/(2*a^2))’ ‘Po=-(((σθ-σr)*r^2-(σθ+σr)*b^2)/(2*b^2))’ ] } , i.e., Notice that the result includes a vector [ ] contained within a list { }. To remove the list symbol, use µ.
  • Page 239: 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 240: Example 2 - Entrance From A Lake Into An Open Channel

    Example 2 - Entrance from a lake into an open channel This particular problem in open channel flow requires the simultaneous solution of two equations, the equation of energy: , and Manning’s equation: . In these equations, H represents the energy head (m, or ft) available for a flow at the entrance to a channel, y is the flow depth (m or ft), V = Q/A is the flow velocity (m/s or ft/s), Q is the volumetric discharge (m /s or ft...
  • Page 241 To see the original equations, EQ1 and EQ2, in terms of the primitive variables listed above, we can use function EVAL applied to each of the equations, i.e., µ@@@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...
  • Page 242 Now, we are ready to solve the equation. First, we need to put the two equations together into a vector. We can do this by actually storing the vector into a variable that we will call EQS (EQuationS): As initial values for the variables y and Q we will use y = 5 (equal to the value of H , which is the maximum value that y can take) and Q = 10 (this is a guess).
  • Page 243 Press @@OK@@ and allow the solution to proceed. An intermediate solution step may look like this: The vector at the top representing the current value of [y,Q] as the solution progresses, and the value .358822986286 representing the criteria for convergence of the numerical method used in the solution. If the system is well posed, this value will diminish until reaching a value close to zero.
  • Page 244: Using The Multiple Equation Solver (Mes)

    Using the Multiple Equation Solver (MES) The multiple equation solver is an environment where you can solve a system of multiple equations by solving for one unknown from one equation at a time. It is not really a solver to simultaneous solutions, rather, it is a one-by-one solver of a number of related equations.
  • Page 245 cosine law, and sum of interior angles of a triangle, to solve for the other three variables. If the three sides are known, the area of the triangle can be calculated with ,where s is known as the Heron’s formula semi-perimeter of the triangle, i.e., Triangle solution using the Multiple Equation Solver (MES) The Multiple Equation Solver (MES) is a feature that can be used to solve two...
  • Page 246 ‘a^2 = b^2+c^2-2*b*c*COS(α)’ ‘α+β+γ = 180’ ‘s = (a+b+c)/2’ ‘A = √ (s*(s-a)*(s-b)*(s-c))’ 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 247 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`. Next, we want to keep in the stack the contents of TITLE and LVARI, by using: !@TITLE @LVARI! We will use the following MES functions...
  • Page 248 5[ a ] a:5 is listed in the top left corner of the display. 3[ b ] b:3 is listed in the top left corner of the display. 5[ c ] c:5 is listed in the top left corner of the display. To solve for the angles use: „[ α...
  • Page 249 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 set of variables): Variables corresponding to all the variables in the equations in EQ have been created.
  • Page 250 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: Opens the program symbol ‚å...
  • Page 251 Example 2 - Any type of triangle Use a = 3, b = 4, c = 6. The solution procedure used here consists of solving for all variables at once, and then recalling the solutions to the stack: J @TRISO To clear up data and re-start MES 3[ a ] 4 [ b ] 6[ c ] To enter data To move to the next variables menu.
  • Page 252: Application 2 - Velocity And Acceleration In Polar Coordinates

    carry over information from the previous solution that may wreck havoc with your current calculations. ο ο ο α( β( γ( 6.9837 20.299 84.771 8.6933 14.26 22.616 130.38 23.309 21.92 52.97 37.03 115.5 17.5 13.2 41.92 29.6 328.81 10.27 3.26 16.66 10.5 31.79 50.78 97.44 210.71...
  • Page 253 ________________________________________________________________ Program or value Store into variable: SOLVEP << PEQ STEQ MINIT NAME LIST MITM MSOLVR >> NAME "vel. & acc. polar coord." { r rD rDD θD θDD vr vθ v ar aθ a } LIST { 'vr = rD' 'vθ = r*θD' 'v = √(vr^2 + vθ^2)' 'ar = rDD −...
  • Page 254 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. Use the following keystrokes: 2.5 [ r ] 0.5 [ rD ] 1.5 \ [ rDD ] 2.3 [ θD ] 6.5 \ [ θDD ].
  • Page 255 To use a new set of values press, either @EXIT @@ALL@ LL, or J @SOLVE. Let's try another example using r = 2.5, vr = rD = -0.5, rDD = 1.5, v = 3.0, a = 25.0. Find, θD, θDD, vθ, ar, and aθ. You should get the following results: Page 7-21...
  • Page 256: Chapter 8 - Operations With 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 257: Composing And Decomposing Lists

    „ä 1 # 2 # 3 # 4 ` ~l1`™K 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 .
  • Page 258: Operations With Lists Of Numbers

    Operations with lists of numbers To demonstrate operations with lists of numbers, we will create a couple of other lists, besides list L1 created above: L2={-3,2,1,5}, L3={-6,5,3,1,0,3,-4}, L4={3,-2,1,5,3,2,1}. In ALG mode, the screen will look like this after entering lists L2, L3, L4: In RPN mode, the following screen shows the three lists and their names ready to be stored.
  • Page 259 Addition of a single number to a list produces a list augmented by the number, and not an addition of the single number to each element in the list. For example: Subtraction, multiplication, and division of lists of numbers of the same length produce a list of the same length with term-by-term operations.
  • Page 260: Real Number Functions From The Keyboard

    Real number functions from the keyboard , √, Real number functions from the keyboard (ABS, e , LN, 10 , LOG, SIN, x COS, TAN, ASIN, ACOS, ATAN, y ) can be used on lists. Here are some examples: EXP and LN LOG and ANTILOG SQ and square root SIN, ASIN...
  • Page 261: Examples Of Functions That Use Two Arguments

    SINH, ASINH COSH, ACOSH TANH, ATANH SIGN, MANT, XPON IP, FP FLOOR, CEIL 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 262: Lists Of Complex Numbers

    %({10, 20, 30},1) = {%(10,1),%(20,1),%(30,1)}, while %(5,{10,20,30}) = {%(5,10),%(5,20),%(5,30)} In the following example, both arguments of function % are lists of the same size. In this case, a term-by-term distribution of the arguments is performed, i.e., %({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.
  • Page 263: 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 264 Next, with system flag 117 set to SOFT menus: 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...
  • Page 265: 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...
  • Page 266: 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 267: 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 268: Defining Functions That Use Lists

    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. A function defined with DEF can also be used with list arguments, except that, any function incorporating an addition must use the ADD operator rather than the plus sign (+).
  • Page 269: Applications Of Lists

    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 ADD 3)*Y') : You can also define the function as G(X,Y) = (X--3)*Y.
  • Page 270: Harmonic Mean Of A List

    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. Just keep in mind that in RPN mode you place the arguments of functions in the stack before activating the function): Harmonic mean of a list This is a small enough sample that we can count on the screen the number of...
  • Page 271: 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 = 1.6348… Geometric mean of a list The geometric mean of a sample is defined as ∏...
  • Page 272: Weighted Average

    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} }, we notice that the k -th If we define the weight list as W = {w ,…,w element in list W, above, can be defined by w = k.
  • Page 273: 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 = 2.2. Note: ANS(1) refers to the most recent result (55), while ANS(2) refers to the previous to last result (121).
  • Page 274 Given the list of class marks S = {s , …, s }, and the list of frequency counts W = {w , …, w }, the weighted average of the data in S with weights W represents the mean value of the grouped data, that we call s, in this context: ∑...
  • Page 275 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 276: Chapter 9 - Vectors

    Chapter 9 Vectors This Chapter provides examples of entering and operating with vectors, both mathematical vectors of many elements, as well as physical vectors of 2 and 3 components. Definitions From a mathematical point of view, a vector is an array of 2 or more elements arranged into a row or a column.
  • Page 277: Entering Vectors

    There are two definitions of products of physical vectors, a scalar or internal product (the dot product) and a vector or external product (the cross product). The dot product produces a scalar value defined as A B = |A||B|cos( ), where is the angle between the two vectors.
  • Page 278: Storing Vectors Into Variables

    In RPN mode, you can enter a vector in the stack by opening a set of brackets and typing the vector components or elements separated by either commas (‚í) or spaces (#). Notice that after pressing ` , in either mode, the calculator shows the vector elements separated by spaces.
  • Page 279 Vectors vs. matrices To see the @VEC@ key in action, try the following exercises: With @VEC and @GO (1) Launch the Matrix Writer („²). selected, → enter 3`5`2``. This produces [3. 5. 2.]. (In RPN mode, you can use the following keystroke sequence to produce the same result: 3#5#2``).
  • Page 280 Activate the Matrix Writer again by using „², and press L to check out the second soft key menu at the bottom of the display. It will show the keys: @+ROW@ @-ROW @+COL@ @-COL@ STK@@ @GOTO@ @→ The @+ROW@ key will add a row full of zeros at the location of the selected cell of the spreadsheet.
  • Page 281: Building A Vector With Arry

    (5) Press @-COL@. The first column will disappear. (6) Press @+COL@. A row of two zeroes appears in the first row. (7) Press @GOTO@ 3@@OK@@ 3@@OK@@ @@OK@@ to move to position (3,3). STK@@. (8) Press This will place the contents of cell (3,3) on the stack, @→...
  • Page 282: Identifying, Extracting, And Inserting Vector Elements

    The following screen shots show the RPN stack before and after applying function ARRY: In RPN mode, the function [ ARRY] takes the objects from stack levels n+1, n, → n-1, …, down to stack levels 3 and 2, and converts them into a vector of n elements.
  • Page 283 More complicated expressions involving elements of A can also be written. For example, using the Equation Writer (‚O), we can write the following summation of the elements of A: Highlighting the entire expression and using the @EVAL@ soft menu key, we get the result: -15.
  • Page 284: Simple Operations With Vectors

    Note: This approach for changing the value of an array element is not allowed in ALG mode, if you try to store 4.5 into A(3) in this mode you get the following error message: Invalid Syntax. To find the length of a vector you can use the function SIZE, available through the command catalog (N) or through the PRG/LIST/ELEMENTS sub-menu.
  • Page 285: Absolute Value Function

    Attempting to add or subtract vectors of different length produces an error message (Invalid Dimension), e.g., v2+v3, u2+u3, A+v3, etc. Multiplication by a scalar, and division by a scalar Multiplication by a scalar or division by a scalar is straightforward: Absolute value function The absolute value function (ABS), when applied to a vector, produces the magnitude of the vector.
  • Page 286: Magnitude

    Magnitude The magnitude of a vector, as discussed earlier, can be found with function ABS. This function is also available from the keyboard („Ê). Examples of application of function ABS were shown above. Dot product Function DOT is used to calculate the dot product of two vectors of the same length.
  • Page 287: Decomposing A Vector

    Examples of cross products of one 3-D vector with one 2-D vector, or vice versa, are presented next: Attempts to calculate a cross product of vectors of length other than 2 or 3, produce an error message (Invalid Dimension), e.g., CROSS(v3,A), etc. Decomposing a vector Function V is used to decompose a vector into its elements or components.
  • Page 288: Building A Three-Dimensional Vector

    Building a three-dimensional vector Function V3 is used in the RPN mode to build a vector with the values in stack levels 1: , 2:, and 3:. The following screen shots show the stack before and after applying function Changing coordinate system Functions RECT, CYLIN, and SPHERE are used to change the current coordinate system to rectangular (Cartesian), cylindrical (polar), or spherical coordinates.
  • Page 289 „Ô5 ‚í ~‚6 25 ‚í 2.3 Before pressing `, the screen will look as in the left-hand side of the following figure. After pressing `, the screen will look as in the right-hand side of the figure (For this example, the numerical format was changed to Fix, with three decimals).
  • Page 290 The conversion from Cartesian to cylindrical coordinates is such that r = , θ = tan (y/x), and z = z. For the case shown above the transformation was such that (x,y,z) = (3.204, 2.112, 2.300), produced (r,θ,z) = (3.536,25 ,3.536).
  • Page 291: Application Of Vector Operations

    Notice that the vectors that were written in cylindrical polar coordinates have now been changed to the spherical coordinate system. The transformation is such that ρ = (r , θ = θ, and φ = tan (r/z). However, the vector that originally was set to Cartesian coordinates remains in that form.
  • Page 292: Moment Of A Force

    Thus, the result is θ = 122.891 In RPN mode use the following: [3,-5,6] ` [2,1,-3] ` DOT [3,-5,6] ` ABS [2,1,-3] ` ABS * ACOS Moment of a force The moment exerted by a force F about a point O is defined as the cross- product M = r×F, where r, also known as the arm of the force, is the position vector based at O and pointing towards the point of application of the force.
  • Page 293: Equation Of A Plane In Space

    Thus the angle between vectors r and F is θ = 41.038 . RPN mode, we can use: [3,-5,4] ` [2,5,-6] ` CROSS ABS [3,-5,4] ` ABS [2,5,-6] ` ABS * / ASIN Equation of a plane in space ) and a vector N = N k normal to a Given a point in space P plane containing point P...
  • Page 294: Row Vectors, Column Vectors, And Lists

    We can now use function EXPAND (in the ALG menu) to expand this expression: Thus, the equation of the plane through point P (2,3,-1) and having normal vector N = 4i+6j+2k, is 4x + 6y + 2z – 24 = 0. In RPN mode, use: [2,3,-1] ` ['x','y','z'] ` - [4,6,2] DOT EXPAND Row vectors, column vectors, and lists The vectors presented in this chapter are all row vectors.
  • Page 295: Function Obj

    LIST will be available in soft menu keys A, B, OBJ , ARRY, and and C. Function DROP is available by using „°@) S TACK @DROP. Following we introduce the operation of functions OBJ , LIST, ARRY, and DROP with some examples. Function OBJ This function decomposes an object into its components.
  • Page 296: Function Drop

    n+1:. For example, to create the list {1, 2, 3}, type: 1` 2` 3` 3` „°@) T YPE! ! LIST@. Function ARRY This function is used to create a vector or a matrix. In this section, we will use it to build a vector or a column vector (i.e., a matrix of n rows and 1 column). To build a regular vector we enter the elements of the vector in the stack, and in stack level 1: we enter the vector size as a list, e.g., 1` 2` 3` „ä...
  • Page 297: Transforming A Column Vector Into A Row Vector

    A new variable, @@RXC@@, will be available in the soft menu labels after pressing Press ‚@@RXC@@ to see the program contained in the variable RXC: << OBJ ARRY >> This variable, @@RXC@@, can now be used to directly transform a row vector to a column vector.
  • Page 298 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 @ „°@) S TACK @DROP „°@) T YPE! ! LIST@ ! ARRY@ `...
  • Page 299: Transforming A List Into A Vector

    resulting in: Transforming a list into a vector To illustrate this transformation, we’ll enter the list {1,2,3} in RPN mode. Then, follow the next exercise to transform a list into a vector: 1 - Use function OBJ to decompose the column vector 2 - Type a 1 and use function LIST to create a list in stack level 1: 3 - Use function...
  • Page 300: Transforming A Vector (Or Matrix) Into A List

    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 301: Definitions

    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 302: 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 303: Typing The Matrix Directly Into The Stack

    If you have selected the textbook display option (using H@) D ISP! and checking Textbook ), the matrix will look like the one shown above. Otherwise, the display will show: The display in RPN mode will look very similar to these. Note: Details on the use of the matrix writer were presented in Chapter 9.
  • Page 304 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 305 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 306: 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 307: 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 1.
  • Page 308: Function Trn

    Function TRN Function TRN is used to produce the transconjugate of a matrix, i.e., the transpose (TRAN) followed by its complex conjugate (CONJ). For example, the following screen shot shows the original matrix in variable A and its transpose, shown in small font display (see Chapter 1): If the argument is a real matrix, TRN simply produces the transpose of the real matrix.
  • Page 309: Function Idn

    value. Function CON generates a matrix with constant elements. For example, in ALG mode, the following command creates a 4×3 matrix whose elements are all equal to –1.5: In RPN mode this is accomplished by using {4,3} ` 1.5 \ ` CON.
  • Page 310: Function Rdm

    Function RDM Function RDM (Re-DiMensioning) is used to re-write vectors and matrices as matrices and vectors. The input to the function consists of the original vector or matrix followed by a list of a single number, if converting to a vector, or two numbers, if converting to a matrix.
  • Page 311: Function Ranm

    If using RPN mode, we assume that the matrix is in the stack and use {6} ` RDM. Note: Function RDM provides a more direct and efficient way to transform lists to arrays and vice versa, than that provided at the end of Chapter 9. Function RANM Function RANM (RANdom Matrix) will generate a matrix with random integer elements given a list with the number of rows and columns (i.e., the...
  • Page 312: Function Repl

    want to extract elements a , and a from the last result, as a 2×2 sub-matrix, in ALG mode, use: 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.
  • Page 313: Function Diag

    Function →DIAG Function DIAG takes the main diagonal of a square matrix of dimensions → n×n, and creates a vector of dimension n containing the elements of the main diagonal. For example, for the matrix remaining from the previous exercise, we can extract its main diagonal by using: In RPN mode, with the 3×3 matrix in the stack, we simply have to activate DIAG to obtain the same result as above.
  • Page 314: Function Vandermonde

    so the main diagonal included only the elements in positions (1,1) and (2,2). Thus, only the first two elements of the vector were required to form the main diagonal. Function VANDERMONDE Function VANDERMONDE generates the Vandermonde matrix of dimension n based on a given list of input data.
  • Page 315: A Program To Build A Matrix Out Of A Number Of Lists

    The Hilbert matrix has application in numerical curve fitting by the method of linear squares. A program to build a matrix out of a number of lists In this section we provide a couple of UserRPL programs to build a matrix out of a number of lists of objects.
  • Page 316 „° @) B RCH! @) F OR@! @NEXT NEXT „° @) B RCH! @) @ IF@ @@IF@@ ~ „n #1 „° @) T EST! @@@>@@@ > „° @) B RCH! @@IF@ @THEN THEN ~ „n #1- n 1 - „° @) B RCH! @) F OR@! @FOR@ ~ „j # ~ „j #1+...
  • Page 317: Lists Represent Rows Of The Matrix

    To use the program in ALG mode, press @CRMC followed by a set of parentheses („Ü). Within the parentheses type the lists of data representing the columns of the matrix, separated by commas, and finally, a comma, and the number of columns. The command should look like this: CRMC({1,2,3,4}, {1,4,9,16}, {1,8,27,64}, 3) The ALG screen showing the execution of program CRMC is shown below:...
  • Page 318: Function Col,

    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 to CHOOSE boxes: or through the MATRICES/CREATE/COLUMN sub-menu: Both approaches will show the same functions: When system flag 117 is set to SOFT menus, the COL menu is accessible...
  • Page 319: Col

    decomposed in columns. To see the full result, use the line editor (triggered by pressing ˜). In RPN mode, you need to list the matrix in the stack, and the activate function COL, i.e., @@@A@@@ COL. The figure below shows the RPN stack before and after the application of function COL.
  • Page 320: Function Col

    as columns in the resulting matrix. The following figure shows the RPN stack before and after using function COL . Function COL+ Function COL+ takes as argument a matrix, a vector with the same length as the number of rows in the matrix, and an integer number n representing the location of a column.
  • Page 321: Function Cswp

    In RPN mode, place the matrix in the stack first, then enter the number representing a column location before applying function COL-. The following figure shows the RPN stack before and after applying function COL-. Function CSWP Function CSWP (Column SWaP) takes as arguments two indices, say, i and j, (representing two distinct columns in a matrix), and a matrix, and produces a new matrix with columns i and j swapped.
  • Page 322: Function Row,

    MTH/MATRIX/ROW.. sequence: („´) shown in the figure below with system flag 117 set to CHOOSE boxes: or through the MATRICES/CREATE/ROW sub-menu: Both approaches will show the same functions: When system flag 117 is set to SOFT menus, the ROW menu is accessible through „´!) M ATRX !) @ MAKE@ !) @ @ROW@ , or through „Ø!) @ CREAT@ !) @ @ROW@ .
  • Page 323: Row

    In RPN mode, you need to list the matrix in the stack, and the activate function ROW, i.e., @@@A@@@ ROW. The figure below shows the RPN stack before and after the application of function ROW. In this result, the first row occupies the highest stack level after decomposition, and stack level 1 is occupied by the number of rows of the original matrix.
  • Page 324: Function Row Function Row

    Function ROW+ Function ROW+ takes as argument a matrix, a vector with the same length as the number of rows in the matrix, and an integer number n representing the location of a row. Function ROW+ inserts the vector in row n of the matrix. For example, in ALG mode, we’ll insert the second row in matrix A with the vector [-1,-2,-3], i.e., In RPN mode, enter the matrix first, then the vector, and the row number,...
  • Page 325: Function Rswp

    Function RSWP Function RSWP (Row SWaP) takes as arguments two indices, say, i and j, (representing two distinct rows in a matrix), and a matrix, and produces a new matrix with rows i and j swapped. The following example, in ALG mode, shows an application of this function.
  • Page 326: Function Rcij

    This same exercise done in RPN mode is shown in the next figure. The left- hand side figure shows the setting up of the matrix, the factor and the row number, in stack levels 3, 2, and 1. The right-hand side figure shows the resulting matrix after function RCI is activated.
  • Page 327: Chapter 11 - Matrix Operations And Linear Algebra

    Chapter 11 Matrix Operations and Linear Algebra In Chapter 10 we introduced the concept of a matrix and presented a number of functions for entering, creating, or manipulating matrices. In this Chapter we present examples of matrix operations and applications to problems of linear algebra.
  • Page 328: Addition And Subtraction

    Addition and subtraction Consider a pair of matrices A = [a and B = [b . Addition and × × subtraction of these two matrices is only possible if they have the same number of rows and columns. The resulting matrix, C = A ± B = [c ×...
  • Page 329 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 330 Vector-matrix multiplication, on the other hand, is not defined. This multiplication can be performed, however, as a special case of matrix multiplication as defined next. Matrix multiplication Matrix multiplication is defined by C ⋅B , where A = [a , B = ×...
  • Page 331 The product of a vector with a matrix is possible if the vector is a row vector, i.e., a 1×m matrix, which multiplied with a matrix m×n produces a 1xn matrix (another row vector). For the calculator to identify a row vector, you must use double brackets to enter it, e.g., Term-by-term multiplication Term-by-term multiplication of two matrices of the same dimensions is possible...
  • Page 332: Characterizing A Matrix (The Matrix Norm Menu)

    The inverse matrix The inverse of a square matrix A is the matrix A such that A⋅A ⋅A = I, where 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).
  • Page 333: Function Abs

    These functions are described next. Because many of these functions use concepts of matrix theory, such as singular values, rank, etc., we will include short descriptions of these concepts intermingled with the description of functions. 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 ×...
  • Page 334: 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 335: 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 = λ⋅x. The values of λ...
  • Page 336: Function Rank

    The condition number of a singular matrix is infinity. The condition number of a non-singular matrix is a measure of how close the matrix is to being singular. The larger the value of the condition number, the closer it is to singularity.
  • Page 337: Function Det

    are constant, we say that c where the values d is linearly dependent on the 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 338 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 339: 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 340: 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 341: Function Axl

    Function AXL Function AXL converts an array (matrix) into a list, and vice versa. For examples, Note: the latter operation is similar to that of the program CRMR presented in Chapter 10. Function AXM Function AXM converts an array containing integer or fraction elements into its corresponding decimal, or approximate, form.
  • Page 342: 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 ⋅x...
  • Page 343: 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 344 To enter matrix A you can activate the Matrix Writer while the A: field is selected. The following screen shows the Matrix Writer used for entering matrix A, as well as the input form for the numerical solver after entering matrix A (press ` in the Matrix Writer): Press ˜...
  • Page 345 Under-determined system The system of linear equations + 3x –5x = -10, – 3x + 8x = 85, can be written as the matrix equation A⋅x = b, if This system has more unknowns than equations, therefore, it is not uniquely determined.
  • Page 346 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, e.g., Thus, the solution is x = [15.373, 2.4626, 9.6268]. To return to the numerical solver environment, press `.
  • Page 347 Let’s store the latest result in a variable X, and the matrix into variable A, as follows: Press K~x` to store the solution vector into variable X Press ƒ ƒ ƒ to clear three levels of the stack Press K~a` to store the matrix into variable A Now, let’s verify the solution by using: @@@A@@@ * @@@X@@@ `, which results in (press ˜...
  • Page 348 can be written as the matrix equation A⋅x = b, if This system has more equations than unknowns (an over-determined system). The system does not have a single solution. Each of the linear equations in the system presented above represents a straight line in a two-dimensional Cartesian coordinate system (x ).
  • Page 349: 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.
  • Page 350 • 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 351 Under-determined system Consider the system + 3x –5x = -10, – 3x + 8x = 85, with The solution using LSQ is shown next: Over-determined system Consider the system + 3x = 15, – 5x = 5, = 22, with The solution using LSQ is shown next: Page 11-25...
  • Page 352: Solution With The Inverse Matrix

    Compare these three solutions with the ones calculated with the numerical solver. Solution with the inverse matrix The solution to the system A⋅x = b, where A is a square matrix is x = A ⋅ b. This results from multiplying the first equation by A , i.e., A ⋅A⋅x = A ⋅b.
  • Page 353: Solving Multiple Set Of Equations With The Same Coefficient Matrix

    previous section. The procedure for the case of “dividing” b by A is illustrated below for the case + 3x –5x = 13, – 3x + 8x = -13, – 2x + 4x = -6, The procedure is shown in the following screen shots: The same solution as found above with the inverse matrix.
  • Page 354: Gaussian And Gauss-Jordan Elimination

    The sub-indices in the variable names X, Y, and Z, determine to which equation system they refer to. To solve this expanded system we use the following procedure, in RPN mode, [[14,9,-2],[2,-5,2],[5,19,12]] ` [[1,2,3],[3,-2,1],[4,2,-1]] `/ The result of this operation is: Gaussian and Gauss-Jordan elimination Gaussian elimination is a procedure by which the square matrix of coefficients belonging to a system of n linear equations in n unknowns is reduced to an...
  • Page 355 To start the process of forward elimination, we divide the first equation (E1) by 2, and store it in E1, and show the three equations again to produce: Next, we replace the second equation E2 by (equation 2 – 3×equation 1, i.e., E1-3×E2), and the third by (equation 3 –...
  • Page 356 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. Thus, we solve for Z first: Next, we substitute Z=2 into equation 2 (E2), and solve E2 for Y: Next, we substitute Z=2 and Y = 1 into E1, and solve E1 for X: The solution is, therefore, X = -1, Y = 1, Z = 2.
  • Page 357 The matrix A is the same as the original matrix A with a new row, corresponding to the elements of the vector b, added (i.e., augmented) to the right of the rightmost column of A. Once the augmented matrix is put together, we can proceed to perform row operations on it that will reduce the original A matrix into an upper-triangular matrix.
  • Page 358 If you were performing these operations by hand, you would write the following:         − − ≅ − −         − − − −   ...
  • Page 359 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:   ...
  • Page 360 pivoting operations. When row and column exchanges are allowed in pivoting, the procedure is known as full pivoting. When exchanging rows and columns in partial or full pivoting, it is necessary to keep track of the exchanges because the order of the unknowns in the solution is altered by those exchanges.
  • Page 361 First, we check the pivot a . We notice that the element with the largest absolute value in the first row and first column is the value of a = 8. Since we want this number to be the pivot, then we exchange rows 1 and 3, by using: 1#3L @RSWP.
  • Page 362 25/8 -25/82 Checking the pivot at position (2,2), we now find that the value of 25/8, at position (3,2), is larger than 3. Thus, we exchange rows 2 and 3 by using: 2#3 L@RSWP -1/16 1/2 41/16 25/8 -25/8 Now, we are ready to divide row 2 by the pivot 25/8, by using ³...
  • Page 363: Step-By-Step Calculator Procedure For Solving Linear Systems

    Finally, we eliminate the –1/16 from position (1,2) by using: 16 Y # 2#1@RCIJ 0 1 0 0 0 1 1 0 0 We now have an identity matrix in the portion of the augmented matrix corresponding to the original coefficient matrix A, thus we can proceed to obtain the solution while accounting for the row and column exchanges coded in the permutation matrix P.
  • Page 364 Then, for this particular example, in RPN mode, use: [2,-1,41] ` [[1,2,3],[2,0,3],[8,16,-1]] `/ The calculator shows an augmented matrix consisting of the coefficients matrix A and the identity matrix I, while, at the same time, showing the next procedure to calculate: L2 = L2-2⋅L1 stands for “replace row 2 (L2) with the operation L2 –...
  • Page 365 To see the intermediate steps in calculating and inverse, just enter the matrix A from above, and press Y, while keeping the step-by-step option active in the calculator’s CAS. Use the following: [[ 1,2,3],[3,-2,1],[4,2,-1]] `Y After going through the different steps, the solution returned is: What the calculator showed was not exactly a Gauss-Jordan elimination with full pivoting, but a way to calculate the inverse of a matrix by performing a Gauss-Jordan elimination, without pivoting.
  • Page 366: Solution To Linear Systems Using Calculator Functions

    Based on the equation A = C/det(A), sketched above, the inverse matrix, , is not defined if det(A) = 0. Thus, the condition det(A) = 0 defines also a singular matrix. Solution to linear systems using calculator functions 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 /.
  • Page 367 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 368 The diagonal matrix that results from a Gauss-Jordan elimination is called a row-reduced echelon form. Function RREF ( Row-Reduced Echelon Form) The results of this function call is to produce the row-reduced echelon form so that the matrix of coefficients is reduced to an identity matrix. The extra column in the augmented matrix will contain the solution to the system of equations.
  • Page 369: Residual Errors In Linear System Solutions (Function Rsd)

    The result is the augmented matrix corresponding to the system of equations: X+Y = 0 X-Y =2 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 370: Eigenvalues And Eigenvectors

    Eigenvalues and eigenvectors Given a square matrix A, we can write the eigenvalue equation A⋅x = λ⋅x, where the values of λ that satisfy the equation are known as the eigenvalues of matrix A. For each value of λ, we can find, from the same equation, values of x that satisfy the eigenvalue equation.
  • Page 371: Function Egvl

    Using the variable λ to represent eigenvalues, this characteristic polynomial is λ to be interpreted as -2λ -22λ +21=0. 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 λ...
  • Page 372: Function Egv

    Change mode to Approx and repeat the entry, to get the following eigenvalues: [(1.38,2.22), (1.38,-2.22), (-1.76,0)]. Function EGV Function EGV (EiGenValues and eigenvectors) produces the eigenvalues and eigenvectors of a square matrix. The eigenvectors are returned as the columns of a matrix, while the corresponding eigenvalues are the components of a vector.
  • Page 373: Function Jordan

    Function JORDAN Function JORDAN is intended to produce the diagonalization or Jordan-cycle decomposition of a matrix. In RPN mode, given a square matrix A, function JORDAN produces four outputs, namely: • The minimum polynomial of matrix A (stack level 4) •...
  • Page 374: Matrix Factorization

    In RPN mode, function MAD generate a number of properties of a square matrix, namely: • the determinant (stack level 4) • the formal inverse (stack level 3), • in stack level 2, the matrix coefficients of the polynomial p(x) defined by (x⋅I-A) ⋅p(x)=m(x)⋅I, •...
  • Page 375: Function Lu

    Function contained in this menu are: LQ, LU, QR,SCHUR, SVD, SVL. Function LU Function LU takes as input a square matrix A, and returns a lower-triangular matrix L, an upper triangular matrix U, and a permutation matrix P, in stack levels 3, 2, and 1, respectively.
  • Page 376: Function Schur

    The Singular Value Decomposition (SVD) of a rectangular matrix A consists × in determining the matrices U, S, and V, such that A ⋅S ⋅V × × × × where U and V are orthogonal matrices, and S is a diagonal matrix. The diagonal elements of S are called the singular values of A and are usually ≥...
  • Page 377: Function Lq

    1: [[-1.03 1.02 3.86 ][ 0 5.52 8.23 ][ 0 –1.82 5.52]] Function LQ The LQ function produces the LQ factorization of a matrix A returning a × lower L trapezoidal matrix, a Q orthogonal matrix, and a P × ×...
  • Page 378: The Quadf Menu

    x⋅A⋅x Finally, = 2X +6XY+2XZ+7ZY The QUADF menu The HP 49 G calculator provides the QUADF menu for operations related to QUADratic Forms. The QUADF menu is accessed through „Ø. 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...
  • Page 379 Function QXA Function QXA takes as arguments a quadratic form in stack level 2 and a vector of variables in stack level 1, returning the square matrix A from which the quadratic form is derived in stack level 2, and the list of variables in stack level 1.
  • Page 380: Linear Applications

    • The list of variables (stack level 1) For example, 'X^2+Y^2-Z^2+4*X*Y-16*X*Z' ` ['X','Y','Z'] ` GAUSS returns 4: [1 –0.333 20.333] 3: [[1 2 –8][0 –3 16][0 0 1]] 2: ’61/3*Z^2+ -1/3*(16*Z+-3*Y)^2+(-8*z+2*Y+X)^2‘ 1: [‘X’ ‘Y’ ‘Z’] Linear Applications The LINEAR APPLICATIONS menu is available through the „Ø. Information on the functions listed in this menu is presented below by using the calculator’s own help facility.
  • Page 381: Function Ker

    Function KER Function MKISOM Page 11-55...
  • Page 382: Chapter 12 - Graphics

    Chapter 12 Graphics In this chapter we introduce some of the graphics capabilities of the calculator. We will present graphics of functions in Cartesian coordinates and polar coordinates, parametric plots, graphics of conics, bar plots, scatterplots, and a variety of three-dimensional graphs. Graphs options in the calculator To access the list of graphic formats available in the calculator, use the keystroke sequence „ô(D) Please notice that if you are using the...
  • Page 383: Plotting An Expression Of The Form Y = F(X)

    These graph options are described briefly next. Function: for equations of the form y = f(x) in plane Cartesian coordinates Polar: for equations of the from r = f(θ) in polar coordinates in the plane Parametric: for plotting equations of the form x = x(t), y = y(t) in the plane Diff Eq: for plotting the numerical solution of a linear differential equation Conic: for plotting conic equations (circles, ellipses, hyperbolas, parabolas) Truth: for plotting inequalities in the plane...
  • Page 384 return to normal calculator display. The PLOT SET UP window should look similar to this: • Note: You will notice that a new variable, called PPAR, shows up in your soft menu key labels. This stands for Plot PARameters. To see its contents, press ‚@PPAR.
  • Page 385 << X ‘EXP(-X^2/2)/ √(2*π)‘ >>. → Press ƒ, twice, to drop the contents of the stack. • Enter the PLOT WINDOW environment by entering „ò (press them simultaneously if in RPN mode). Use a range of –4 to 4 for H- VIEW, then press @AUTO to generate the V-VIEW automatically.
  • Page 386: Some Useful Plot Operations For Function Plots

    Some useful PLOT operations for FUNCTION plots In order to discuss these PLOT options, we'll modify the function to force it to have some real roots (Since the current curve is totally contained above the x Press ‚@@@Y1@@ to list the contents of the function axis, it has no real roots.) X ‘EXP(-X^2/2)/ √(2*π) ‘...
  • Page 387 • If you move the cursor towards the right-hand side of the curve, by pressing the right-arrow key (™), and press @ROOT, the result now is ROOT: 1.6635... The calculator indicated, before showing the root, that it was found through SIGN REVERSAL. Press L to recover the menu.
  • Page 388: Saving A Graph For Future Use

    curves intercept at two points. Move the cursor near the left intercept point and press @) @ FCN! @ISECT, to get I-SECT: (-0.6834…,0.21585). Press L to recover the menu. • To leave the FCN environment, press @) P ICT (or L) P ICT). •...
  • Page 389: Graphics Of Transcendental Functions

    Move the cursor to the upper left corner of the display, by using the š and — keys. To display the figure currently in level 1 of the stack press L REPL . To return to normal calculator function, press @) P ICT @CANCL. Note: To save printing space, we will not include more graphs produced by following the instructions in this Chapter.
  • Page 390 . Type LN(X). Press ` to equation writer with the expression Y1(X)= return to the PLOT-FUNCTION window. Press L@@@OK@@@ to return to normal calculator display. The next step is to press, simultaneously if in RPN mode, the left-shift key „ and the ò(B) key to produce the PLOT WINDOW - FUNCTION window.
  • Page 391: Graph Of The Exponential Function

    Note: When you press J , your variables list will show new variables called @@@X@@ and @@Y1@@ Press ‚@@Y1@@ to see the contents of this variable. You will get the program << X ‘LN(X)’ >> , which you will → recognize as the program that may result from defining the function ‘Y1(X) = LN(X)’...
  • Page 392: The Ppar Variable

    To add labels to the graph press @EDIT L@) L ABEL. Press @MENU to remove the menu labels, and get a full view of the graph. Press LL@) P ICT! @CANCL to Press ` to return to normal return to the PLOT WINDOW – FUNCTION. calculator display.
  • Page 393: Inverse Functions And Their Graphs,

    Inverse functions and their graphs Let y = f(x), if we can find a function y = g(x), such that, g(f(x)) = x, then we say that g(x) is the inverse function of f(x). Typically, the notation g(x) = f is used to denote an inverse function.
  • Page 394: Summary Of Function Plot Operation

    Press @CANCL to return to the PLOT FUNCTION – WINDOW screen. Modify the vertical and horizontal ranges to read: H-View: -8 8, V-View: -4 By selecting these ranges we ensure that the scale of the graph is kept 1 vertical to 1 horizontal. Press @ERASE @DRAW and you will get the plots of the natural logarithm, exponential, and y = x functions.
  • Page 395 Note: the soft menu keys @EDIT and @CHOOS are not available at the same time. One or the other will be selected depending on which input field is highlighted. • Press the AXES soft menu key to select or deselect the plotting of axes in the graph.
  • Page 396 • Use @MOVE° and @MOVE³ to move the selected equation one location up or down, respectively. • 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.
  • Page 397: Plots Of Trigonometric And Hyperbolic Functions And Their Inverses,

    • Use @ERASE to erase any graph currently existing in the graphics display window. • Use @DRAW to produce the graph according to the current contents of PPAR for the equations listed in the PLOT-FUNCTION window. • Press L to activate the second menu list. •...
  • Page 398: Generating A Table Of Values For A Function

    the function Y=X when plotting simultaneously a function and its inverse to verify their ‘reflection’ about the line Y = X. H-View range V-View range Function Minimum Maximum Minimum Maximum SIN(X) -3.15 3.15 AUTO ASIN(X) -1.2 AUTO SIN & ASIN -3.2 -1.6 COS(X)
  • Page 399: The Tpar Variable

    will be highlighted. If this field is not already set to , press the FUNCTION soft key @CHOOS and select the option, then press @@@OK@@@. FUNCTION • Next, press ˜ to highlight the field in front of the option EQ, and type the function expression: ‘X/(X+10)’...
  • Page 400: Plots In Polar Coordinates

    • The @ZOOM key, when pressed, produces a menu with the options: In, Out, • Decimal, Integer, and Trig. Try the following exercises: • 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.
  • Page 401 • field. Press ³~‚t @@@OK@@@ to The cursor is now in the Indep change the independent variable to θ. • 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 402: Plotting Conic Curves

    will get the equation ‘2*(1-SIN(θ))’ highlighted. Let’s say, we want to plot also the function ‘2*(1-COS(θ))’ along with the previous equation. • Press @@ADD@! , and type 2*„Ü1- T~‚t`, to enter the new equation. • Press @ERASE @DRAW to see the two equations plotted in the same figure. The result is two intersecting cardioids.
  • Page 403 { ‘(X-1)^2+(Y-2)^2=3’ , ‘X^2/4+Y^2/3=1’ } into the variable EQ. These equations we recognize as those of a circle centered at (1,2) with radius √3, and of an ellipse centered at (0,0) with semi-axis lengths a = 2 and b = √3. •...
  • Page 404: Parametric Plots

    centered at the origin (0,0), will extend from -2 to 2 in x, and from -√3 to √3 in y. Notice that for the circle and the ellipse the region corresponding to the left and right extremes of the curves are not plotted. This is the case with all circles or ellipses plotted using as the Conic...
  • Page 405 X(t) = X0 + V0*COS(θ0)*t Y(t) = Y0 + V0*SIN(θ0)*t – 0.5*g*t^2 which will add the variables @@@Y@@@ and @@@X@@@ to the soft menu key labels. To produce the graph itself, follow these steps: • Press „ô, simultaneously if in RPN mode, to access to the PLOT SETUP window.
  • Page 406 • Press @ERASE @DRAW to draw the parametric plot. • Press @EDIT L @LABEL @MENU to see the graph with labels. The window parameters are such that you only see half of the labels in the x-axis. • Press L to recover the menu. Press L@) P ICT to recover the original graphics menu.
  • Page 407: Plotting The Solution To Simple Differential Equations

    if in RPN mode). Then, press @ERASE @DRAW. Press @CANCL to return to the PLOT, PLOT WINDOW, or PLOT SETUP screen. Press $, or L@@@OK@@@, to return to normal calculator display. Generating a table for parametric equations In an earlier example we generated a table of values (X,Y) for an expression of the form Y=f(X), i.e., a Function type of graph.
  • Page 408 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 Before plotting the solution, x(t), for t = 0 to 5, delete the variables EQ and PPAR.
  • Page 409 • Press L to recover the menu. Press L@) P ICT to recover the original graphics menu. • When we observed the graph being plotted, you'll notice that the graph is not very smooth. That is because the plotter is using a time step that is too large.
  • Page 410: Truth Plots

    Truth plots Truth plots are used to produce two-dimensional plots of regions that satisfy a certain mathematical condition that can be either true or false. For example, suppose that you want to plot the region for X^2/36 + Y^2/9 < 1, proceed as follows: •...
  • Page 411: Plotting Histograms, Bar Plots, And Scatterplots

    You can have more than one condition plotted at the same time if you multiply the conditions. For example, to plot the graph of the points for which X /9 < 1, and X /16 + Y /9 > 1, use the following: •...
  • Page 412 [[3.1,2.1,1.1],[3.6,3.2,2.2],[4.2,4.5,3.3], [4.5,5.6,4.4],[4.9,3.8,5.5],[5.2,2.2,6.6]] ` to store it in ΣDAT, use the function STOΣ (available in the function catalog, ‚N). Press VAR to recover your variables menu. A soft menu key labeled ΣDAT should be available in the stack. The figure below shows the storage of this matrix in ALG mode: To produce the graph: •...
  • Page 413: Scatter Plots

    • 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. We changed the V-VIEW to better accommodate the maximum value in column 1 of ΣDAT.
  • Page 414 • Press ˜˜ to highlight the field. Enter 1@@@OK@@@ 2@@@OK@@@ to Cols: 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: 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. Slope fields Slope fields are used to visualize the solutions to a differential equation of the form y’...
  • Page 416: Fast 3D Plots

    • 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. This lines constitute lines of y(x,y) = constant, for the solution of y’...
  • Page 417 • Make sure that ‘X’ is selected as the and ‘Y’ as the variables. Indep: Depnd: • Press L@@@OK@@@ to return to normal calculator display. • Press „ò, simultaneously if in RPN mode, to access the PLOT WINDOW screen. • Keep the default plot window ranges to read: X-Left:-1, X-Right:1, Y-Near:-1, Y-Far: 1, Z-Low: -1, Z-High: 1, Step Indep: 10, Depnd: 8...
  • Page 418: Wireframe Plots

    • 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 •...
  • Page 419 The coordinates XE, YE, ZE, stand for “eye coordinates,” i.e., the coordinates from which an observer sees the plot. The values shown are the default values. The Step Indep: and Depnd: values represent the number of gridlines to be used in the plot. The larger these number, the slower it is to produce the graph.
  • Page 420: Ps-Contour Plots

    • 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. Try also a Wireframe plot for the surface z = f(x,y) = x •...
  • Page 421 • Press „ô, simultaneously if in RPN mode, to access to the PLOT SETUP window. • Change TYPE Ps-Contour. • Press ˜ and type ‘X^2+Y^2’ @@@OK@@@. • Make sure that ‘X’ is selected as the and ‘Y’ as the Indep: Depnd: variables.
  • Page 422: Y-Slice 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. Y-Slice plots Y-Slice plots are animated plots of z-vs.-y for different values of x from the function z = f(x,y).
  • Page 423: Gridmap Plots

    • Press „ô, simultaneously if in RPN mode, to access the PLOT SETUP window. • Press ˜ and type ‘(X+Y)*SIN(Y)’ @@@OK@@@. • Press @ERASE @DRAW to produce the Y-Slice animation. • Press $ to stop the animation. • Press @CANCL to return to the PLOT WINDOW environment. Then, press $ , or L@@@OK@@@, to return to normal calculator display.
  • Page 424: Pr-Surface Plots

    • 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) (2)(X,Y)^2 i.e., F(z) = z (3) EXP((X,Y)) i.e., F(z) = e (4) SINH((X,Y)) i.e., F(z) = sinh(z) (5) TAN((X,Y)) i.e., F(z) = tan(z)
  • Page 425: The Vpar Variable

    • 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” used to produce a three dimensional graph. Therefore, you will see it produced whenever you create a three dimensional plot such as Fast3D, Wireframe, or Pr-Surface.
  • Page 426: Dot+ And Dot

    points, lines, circles, etc. on the graphics screen, as described below. To see how to use these functions we will try the following exercise: First, we get the graphics screen corresponding to the following instructions: • Press „ô, simultaneously if in RPN mode, to access to the PLOT SETUP window.
  • Page 427: Mark

    MARK This command allows the user to set a mark point which can be used for a number of purposes, such as: • Start of line with the LINE or TLINE command • Corner for a BOX command • Center for a CIRCLE command Using the MARK command by itself simply leaves an x in the location of the mark (Press L@MARK to see it in action).
  • Page 428: Box

    This command is used to draw a box in the graph. Move the cursor to a clear area of the graph, and press @BOX@. This highlights the cursor. Move the cursor with the arrow keys to a point away, and in a diagonal direction, from Press @BOX@ again.
  • Page 429: Erase

    ERASE The function ERASE clears the entire graphics window. This command is available in the PLOT menu, as well as in the plotting windows accessible through the soft menu keys. MENU Pressing @MENU will remove the soft key menu labels to show the graphic unencumbered by those labels.
  • Page 430: Zooming In And Out In The Graphics Display

    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. The ZOOM menu includes the following functions (press Lto move to the next menu): We present each of these functions following.
  • Page 431: Boxz

    BOXZ Zooming in and out of a given graph can be performed by using the soft- menu key BOXZ. With BOXZ you select the rectangular sector (the “box”) that you want to zoom in into. Move the cursor to one of the corners of the box (using the arrow keys), and press @) Z OOM @BOXZ.
  • Page 432: Zintg

    ZINTG Zooms the graph so that the pixel units become user-define units. For example, the minimum PICT window has 131 pixels. When you use ZINTG, with the cursor at the center of the screen, the window gets zoomed so that the x-axis extends from –64.5 to 65.5.
  • Page 433: The Symb/Graph Menu

    ‚× (the 4 key) ALGEBRA.. Ch. 5 „Þ (the 1 key) ARITHMETIC.. Ch. 5 „Ö (the 4 key) CALCULUS.. Ch. 13 „Î (the 7 key) SOLVER.. Ch. 6 ‚Ñ (the 8 key) TRIGONOMETRIC.. Ch. 5 „Ð (the 8 key) EXP&LN.. Ch.
  • Page 434 PLOTADD(X^2-X) is similar to „ô but adding this function to EQ: X^2 -1. Using @ERASE @DRAW produces the plot: 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) >...
  • Page 435: Function Draw3Dmatrix

    The output is in a graphical format, showing the original function, F(X), the derivative F’(X) right after derivation and after simplification, and finally a table of variation. The table consists of two rows, labeled in the right-hand side. Thus, the top row represents values of X and the second row represents values of F.
  • Page 436: Chapter 13 - Calculus Applications

    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 Function lim is available through the where the limit is to be calculated. command catalog (‚N~„l) or through option 2. LIMITS & SERIES…...
  • Page 438: The Deriv&Integ Menu

    Derivatives The derivative of a function f(x) at x = a is defined as the limit − − > Some examples of derivatives using this limit are shown in the following screen shots: Functions DERIV and DERVX The function DERIV is used to take derivatives in terms of any independent variable, while the function DERVX takes derivatives with respect to the CAS default variable VX (typically ‘X’).
  • Page 439 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). Next we discuss functions DERIV and DERVX, the remaining functions are presented either later in this Chapter or in subsequent Chapters.
  • Page 440 The insert cursor ( ) will be located right at the denominator awaiting for the user to enter an independent variable, say, s: ~„s. Then, press the right-arrow key (™) to move to the placeholder between parentheses: Next, enter the function to be differentiated, say, s*ln(s): To evaluate the derivative in the Equation Writer, press the up-arrow key —, four times, to select the entire expression, then, press @EVAL.
  • Page 441 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)⋅...
  • Page 442: Implicit Derivatives

    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. In these cases, the equation was re-written with all its terms moved to the left-hand side of the equal sign.
  • Page 443 maxima) of the function, to plot the derivative, and to find the equation of the tangent line. Try the following example for the function y = tan(x). • Press „ô, simultaneously in RPN mode, to access to the PLOT SETUP window. •...
  • 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 Signtab

    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. example, for the TAN(X) function, SIGNTAB indicates that TAN(X) is negative between –π/2 and 0, and positive between 0 and π...
  • Page 446 • Two lists, the first one indicates the variation of the function (i.e., where it increases or decreases) in terms of the independent variable VX, the second one indicates the variation of the function in terms of the dependent variable. •...
  • 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 Also, at X = ±∞, F(X)= 400/27 After that F(X) increases until reaching +∞...
  • Page 448: Higher-Order Derivatives

    For example, to determine where the critical points of function 'X^3-4*X^2- 11*X+30' occur, we can use the following entries in ALG mode: 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.
  • Page 449 Anti-derivatives and integrals An anti-derivative of a function f(x) is a function F(x) such that f(x) = dF/dx. For example, since d(x ) /dx = 3x , an anti-derivative of f(x) = 3x is F(x) = x + C, where C is a constant. One way to represent an anti-derivative is as a ∫...
  • Page 450 Please notice that functions SIGMAVX and SIGMA are designed for integrands that involve some sort of integer function like the factorial (!) function shown above. Their result is the so-called discrete derivative, i.e., one defined for integer numbers only. Definite integrals In a definite integral of a function, the resulting anti-derivative is evaluated at the upper and lower limit of an interval (a,b) and the evaluated values ∫...
  • Page 451 At this point, you can press ` to return the integral to the stack, which will show the following entry (ALG mode shown): 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 Notice the application of the chain rule in the first step, leaving the derivative of the function under the integral explicitly in the numerator. In the second step, the resulting fraction is rationalized (eliminating the square root from the denominator), and simplified. The final version is shown in the third step. Each step is shown by pressing the @EVAL menu key, until reaching the point where further application of function EVAL produce no more changes in the expression.
  • Page 453: Integrating An Equation

    Integrating an equation Integrating an equation is straightforward, the calculator simply integrates both sides of the equation simultaneously, e.g., Techniques of integration Several techniques of integration can be implemented in the calculators, as shown in the following examples. Substitution or change of variables ∫...
  • Page 454 The last four steps show the progression of the solution: a square root, followed by a fraction, a second fraction, and the final result. This result can be simplified by using function @SIMP, to read: Integration by parts and differentials A differential of a function y = f(x), is defined as dy = f’(x) dx, where f’(x) is the derivative of f(x).
  • Page 455 Thus, we can use function IBP to provide the components of an integration by parts. The next step will have to be carried out separately. It is important to mention that the integral can be calculated directly by using, for example, Integration by partial fractions Function PARTFRAC, presented in Chapter 5, provides the decomposition of a fraction into partial fractions.
  • Page 456: Integration With Units

    Improper integrals These are integrals with infinite limits of integration. Typically, an improper integral is dealt with by first calculating the integral as a limit to infinity, e.g., ∞ ε ∫ ∫ ε → ∞ 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...
  • Page 457 If you enter the integral with the CAS set to Exact mode, you will be asked to change to Approx mode, however, the limits of the integral will be shown in a different format as shown here: These limits represent 1×1_mm and 0×1_mm, which is the same as 1_mm and 0_mm, as before.
  • Page 458: Infinite Series

    Infinite series ∑ − An infinite series has the form . The infinite series typically starts with indices n = 0 or n = 1. Each term in the series has a coefficient h(n) that depends on the index n. 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,...
  • Page 459 ∑ ∑ i.e., The polynomial P (x) is referred to as Taylor’s polynomial. The order of the residual is estimated in terms of a small quantity h = x-x , i.e., evaluating the polynomial at a value of x very close to x .
  • Page 460 Function TAYLR produces a Taylor series expansion of a function of any variable x about a point x = a for the order k specified by the user. Thus, the function has the format TAYLR(f(x-a),x,k). For example, Function SERIES produces a Taylor polynomial using as arguments the function f(x) to be expanded, a variable name alone (for Maclaurin’s series) or an expression of the form ‘variable = value’...
  • Page 461 In the right-hand side figure above, we are using the line editor to see the series expansion in detail. Page 13-26...
  • Page 462: Chapter 14 - Multi-Variate Calculus Applications

    Chapter 14 Multi-variate Calculus Applications Multi-variate calculus refers to functions of two or more variables. In this Chapter we discuss the basic concepts of multi-variate calculus including partial derivatives and multiple integrals. Multi-variate functions A function of two or more variables can be defined in the calculator by using the DEFINE function („à).
  • Page 463 → Similarly, → We will use the multi-variate functions defined earlier to calculate partial derivatives using these definitions. Here are the derivatives of f(x,y) with respect to x and y, respectively: Notice that the definition of partial derivative with respect to x, for example, requires that we keep y fixed while taking the limit as h 0.
  • Page 464: 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. In the left-hand side, the derivation is taking first with respect to x and then with respect to y, and in the right-hand side, the opposite is true.
  • Page 465: The Chain Rule For Partial Derivatives

    Third-, fourth-, and higher order derivatives are defined in a similar manner. To calculate higher order derivatives in the calculator, simply repeat the derivative function as many times as needed. Some examples are shown below: The chain rule for partial derivatives Consider the function z = f(x,y), such that x = x(t), y = y(t).
  • Page 466: 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 ∂z/∂x) function z = z(x,y), i.e., dz = ⋅ dx + (∂z/∂y) ⋅ 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 467: Using Function Hess To Analyze Extrema,

    We find critical points at (X,Y) = (1,0), and (X,Y) = (-1,0). To calculate the discriminant, we proceed to calculate the second derivatives, fXX(X,Y) = ∂ , fXY(X,Y) = ∂ f/∂X/∂Y, and fYY(X,Y) = ∂ f/∂X f/∂Y The last result indicates that the discriminant is ∆ = -12X, thus, for (X,Y) = (1,0), ∆...
  • Page 468 Applications of function HESS are easier to visualize in the RPN mode. Consider as an example the function φ(X,Y,Z) = X + XY + XZ, we’ll apply function HESS to function φ in the following example. The screen shots show the RPN stack before and after applying function HESS.
  • Page 469: Multiple Integrals

    = ∂ φ/∂X = ∂ φ/∂X The resulting matrix has elements a = 6., a = -2., = ∂ φ/∂X∂Y = 0. The discriminant, for this critical point s2(1,0) and a ⋅ is ∆ = (∂ f/∂x (∂ f/∂y )-[∂ f/∂x∂y] = (6.)(-2.) = -12.0 <...
  • Page 470: 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 det( When calculating an integral using such transformation, the expression to use ∫∫ ∫∫ φ φ | )] dydx dudv , where R’...
  • Page 471 β θ ∫∫ ∫ ∫ φ θ φ θ θ rdrd α θ where the region 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.
  • Page 472: Chapter 15 - Vector Analysis Applications

    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 473: 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) = | = | The equation (x,y,z) = 0 represents a surface in space.
  • Page 474: Potential Of A Gradient,

    n independent variables (x , …,x ), and a vector of the functions [‘x ’ ‘x ’…’x ’]. Function HESS returns the Hessian matrix of the function , defined as the matrix H = [h ] = [ / x ], the gradient of the function with respect to the n-variables, grad f = [ , …...
  • Page 475: Divergence

    function (x,y,z) does not exist. In such case, function POTENTIAL returns an error message. For example, the vector field F(x,y,z) = (x+y)i + (x-y+z)j + xzk, does not have a potential function associated with it, since, f/ z h/ x. The calculator response in this case is shown below: 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”...
  • Page 476: Curl

    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 ,YZ], the curl is calculated as follows: Irrotational fields and potential function In an earlier section in this chapter we introduced function POTENTIAL to...
  • Page 477: Vector Potential

    As an example, in an earlier example we attempted to find a potential function for the vector field F(x,y,z) = (x+y)i + (x-y+z)j + xzk, and got an error message back from function POTENTIAL. To verify that this is a rotational field (i.e., 0), we use function CURL on this field: On the other hand, the vector field F(x,y,z) = xi + yj + zk, is indeed...
  • Page 478 produces the vector potential function Φ = [0, ZYX-2YX, Y-(2ZX-X)], which is 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) = (x,y,z)i+ (x,y,z)j+ (x,y,z)k, are related by f = / y -...
  • Page 479: Chapter 16 - Differential Equations ,

    Chapter 16 Differential Equations In this Chapter we present examples of solving ordinary differential equations (ODE) using calculator functions. A differential equation is an equation involving derivatives of the independent variable. 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.
  • Page 480: Checking Solutions In The Calculator

    The result is ‘∂ ∂ ∂ ’. This format x(u(x)))+3*u(x)* x(u(x))+u^2=1/x shows up in the screen when the _Textbook option in the display setting (H@) D ISP) is not selected. Press ˜ to see the equation in the Equation Writer. An alternative notation for derivatives typed directly in the stack is to use ‘d1’...
  • Page 481: Slope Field Visualization Of Solutions

    result by using function EVAL to verify the solution. For example, to check that u = A sin ω t is a solution of the equation d u/dt + ω ⋅u = 0, use the following: In ALG mode: SUBST(‘∂t(∂t(u(t)))+ ω0^2*u(t) = 0’,‘u(t)=A*SIN (ω0*t)’) ` EVAL(ANS(1)) ` In RPN mode: ‘∂t(∂t(u(t)))+ ω0^2*u(t) = 0’...
  • Page 482: The Calc/Diff Menu

    The CALC/DIFF menu The DIFFERENTIAL EQNS.. sub-menu within the CALC („Ö) menu provides functions for the solution of differential equations. The menu is listed below with system flag 117 set to CHOOSE boxes: These functions are briefly described next. They will be described in more detail in later parts of this Chapter.
  • Page 483: Function Ldec

    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 provide two pieces of input: •...
  • Page 484 of constants result from factoring out the exponential terms after the Laplace transform solution is obtained. Example 2 – Using the function LDEC, solve the non-homogeneous ODE: y/dx -4⋅(d y/dx )-11⋅(dy/dx)+30⋅y = x Enter: 'X^2' ` 'X^3-4*X^2-11*X+30' ` LDEC The solution, shown partially here in the Equation Writer, is: Replacing the combination of constants accompanying the exponential terms –3x with simpler values, the expression can be simplified to y = K...
  • Page 485: Function Desolve

    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: ’(t) + 2x ’(t) = 0, ’(t) + x ’(t) = 0.
  • Page 486: The Variable Odetype

    dy/dx + x ⋅y(x) = 5. In the calculator use: 'd1y(x)+x^2*y(x)=5' ` 'y(x)' ` DESOLVE solution provided {‘y (INT(5*EXP(xt^3/3),xt,x)+cC0)*1/EXP(x^3/3))’ }, i.e., exp( exp( − ⋅ ⋅ ⋅ The variable ODETYPE You will notice in the soft-menu key labels a new variable called @ODETY (ODETYPE).
  • Page 487 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’ }, i.e., ⋅...
  • Page 488: Laplace Transforms

    The solution is: Press µµto simplify the result to ‘y(t) = -((19*√5*SIN(√5*t)-(148*COS(√5*t)+80*COS(t/2)))/190)’. Press J @ODETY to get the string “ Linear w/ cst coeff ” for the ODE type in 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 489: Laplace Transform And Inverses In The Calculator

    circuits. In most cases one is interested in the system response after time t>0, thus, the definition of the Laplace transform, given above, involves an integration for values of t larger than zero. The inverse Laplace transform maps the function F(s) onto the original function f(t) in the time domain, i.e., L {F(s)} = f(t).
  • Page 490: Laplace Transform Theorems

    function LAP you get back a function of X, which is the Laplace transform of f(X). ⋅sin(t). Use: Example 2 – Determine the Laplace transform of f(t) = e ‘EXP(2*X)*SIN(X)’ ` LAP The calculator returns the result: 1/(SQ(X-2)+1). Press µ to obtain, 1/(X -4X+5).
  • Page 491 L{df/dt} = s⋅F(s) - f Example 1 – The velocity of a moving particle v(t) is defined as v(t) = dr/dt, where r = r(t) is the position of the particle. Let r = r(0), and R(s) =L{r(t)}, then, the transform of the velocity can be written as V(s) = L{v(t)}=L{dr/dt}= s⋅R(s)-r •...
  • Page 492 Now, use ‘(-X)^3*EXP(-a*X)’ ` LAP µ. The result is exactly the same. • Integration theorem. Let F(s) = L{f(t)}, then • Convolution theorem. Let F(s) = L{f(t)} and G(s) = L{g(t)}, then − Example 4 – Using the convolution theorem, find the Laplace transform of (f*g)(t), if f(t) = sin(t), and g(t) = exp(t).
  • Page 493: Dirac's Delta Function And Heaviside's Step Function

    ∞ • Laplace transform of a periodic function of period T: − − • Limit theorem for the initial value: Let F(s) = L{f(t)}, then → → ∞ • Limit theorem for the final value: Let F(s) = L{f(t)}, then ∞...
  • Page 494 An interpretation for the integral above, paraphrased from Friedman (1990), is that the δ-function “picks out” the value of the function f(x) at x = x . Dirac’s delta function is typically represented by an upward arrow at the point x = x0, indicating that the function has a non-zero value only at that particular value of x Heaviside’s step function, H(x), is defined as...
  • Page 495 Another important result, known as the second shift theorem for a shift to the –as ⋅F(s)}=f(t-a)⋅H(t-a), with F(s) = L{f(t)}. right, is that L 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’, Similarly, ‘U0’...
  • Page 496 Example 1 – To solve the first order equation, –t dh/dt + k⋅h(t) = a⋅e by using Laplace transforms, we can write: –t L{dh/dt + k⋅h(t)} = L{a⋅e –t L{dh/dt} + k⋅L{h(t)} = a⋅L{e –t Note: ‘EXP(-X)’ ` LAP , produces ‘1/(X+1)’, i.e., L{e }=1/(s+1).
  • Page 497 The result is: , i.e., h(t) = a/(k-1)⋅e +((k-1)⋅cC -a)/(k-1)⋅e Thus, cC0 in the results from LDEC represents the initial condition h(0). Note: When using the function LDEC to solve a linear ODE of order n in f(X), the result will be given in terms of n constants cC0, cC1, cC2, …, cC(n-1), (n-1) representing the initial conditions f(0), f’(0), f”(0), …, f (0).
  • Page 498 To find the solution to the ODE, y(t), we need to use the inverse Laplace transform, as follows: ƒ ƒ Isolates right-hand side of last expression ILAPµ Obtains the inverse Laplace transform The result is i.e., cos √2x + (√2 (7y +3)/14) sin √2x.
  • Page 499 y/dt } + L{y(t)} = L{δ(t-3)}. ’ ` LAP , the calculator produces EXP(-3*X), i.e., L{δ(t-3)} With ‘ Delta(X-3) –3s ⋅Y(s) - s⋅y . With Y(s) = L{y(t)}, and L{d y/dt } = s – y , where y = h(0) –3s ⋅Y(s) –...
  • Page 500 ‘X/(X^2+1)’ ` ILAP Result, ‘COS(X)’, i.e., L {s/(s +1)}= cos t. ‘1/(X^2+1)’ ` ILAP Result, ‘SIN(X)’, i.e., L {1/(s +1)}= sin t. ‘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 theorem for a shift to the right –as...
  • Page 501 Defining and using Heaviside’s step function in the calculator The previous example provided some experience with the use of Dirac’s delta function as input to a system (i.e., in the right-hand side of the ODE describing the system). In this example, we want to use Heaviside’s step function, H(t). In the calculator we can define this function as: ‘H(X) = IFTE(X>0, 1, 0)’...
  • Page 502 Change , if needed TYPE FUNCTION Change EQ to ‘0.5*COS(X)-0.25*SIN(X)+SIN(X-3)*H(X-3)’. Make sure that is set to ‘X’. Indep Press @ERASE @DRAW to plot the function. Press @EDIT L @LABEL to see the plot. The resulting graph will look like this: Notice that the signal starts with a relatively small amplitude, but suddenly, at t=3, it switches to an oscillatory signal with a larger amplitude.
  • Page 503 ƒ ƒ Isolates right-hand side of last expression ILAP Obtains the inverse Laplace transform The result is ‘y1*SIN(X-1)+y0*COS(X-1)-(COS(X-3)-1)*Heaviside(X-3)’. Thus, we write as the solution: y(t) = y cos t + y sin t + H(t-3)⋅(1+sin(t-3)). Check what the solution to the ODE would be if you use the function LDEC: ‘H(X-3)’...
  • Page 504 Again, there is a new component to the motion switched at t=3, namely, the particular solution y (t) = [1+sin(t-3)]⋅H(t-3), which changes the nature of the solution for t>3. The Heaviside step function can be combined with a constant function and with linear functions to generate square, triangular, and saw tooth finite pulses, as follows: •...
  • Page 505: Fourier Series

    Fourier series Fourier series are series involving sine and cosine functions typically used to expand periodic functions. A function f(x) is said to be periodic, of period T, if f(x+T) = f(t). For example, because sin(x+2π) = sin x, and cos(x+2π) = cos x, the functions sin and cos are 2π-periodic functions.
  • Page 506: Function Fourier

    Thus, the first three terms of the function are: f(t) ≈ 1/3 – (4/π )⋅cos (π⋅t)+(2/π)⋅sin (π⋅t). A graphical comparison of the original function with the Fourier expansion using these three terms shows that the fitting is acceptable for t < 1, or thereabouts.
  • Page 507: Fourier Series For A Quadratic Function

    π exp( ,..., ,... Function FOURIER provides the coefficient c of the complex-form of the Fourier series given the function f(t) and the value of n. The function FOURIER requires you to store the value of the period (T) of a T-periodic function into the CAS variable PERIOD before calling the function.
  • Page 508 Thus, = 1/3, c = (π⋅i+2)/π = (π⋅i+1)/(2π The Fourier series with three elements will be written as g(t) ≈ Re[(1/3) + (π⋅i+2)/π ⋅exp(i⋅π⋅t)+ (π⋅i+1)/(2π )⋅exp(2⋅i⋅π⋅t)]. A plot of the shifted function g(t) and the Fourier series fitting follows: The fitting is somewhat acceptable for 0<t<2, although not as good as in the previous example.
  • Page 509 A general expression for c The function FOURIER can provide a general expression for the coefficient c of the complex Fourier series expansion. For example, using the same function g(t) as before, the general term c is given by (figures show normal font and small font displays): The general expression turns out to be, after simplifying the previous result, π...
  • Page 510 • First, define a function c(n) representing the general term c in the complex Fourier series. • Next, define the finite complex Fourier series, F(X,k), where X is the independent variable and k determines the number of terms to be used. Ideally we would like to write this finite complex Fourier series as π...
  • Page 511 The function @@@F@@@ can be used to generate the expression for the complex Fourier series for a finite value of k. For example, for k = 2, c = 1/3,and using t as the independent variable, we can evaluate F(t,2,1/3) to get: This result shows only the first term (c0) and part of the first exponential term in the series.
  • Page 512 F (0.5, 4, 1/3) = (-0.167070735979,0.) F (0.5, 5, 1/3) = (-0.294394690453,0.) F (0.5, 6, 1/3) = (-0.305652599743,0.) To compare the results from the series with those of the original function, load these functions into the PLOT – FUNCTION input form („ñ, simultaneously if using RPN mode): Change the limits of the Plot Window („ò) as follows: Press the soft-menu keys @ERASE @DRAW to produce the plot:...
  • Page 513: Fourier Series For A Triangular Wave

    Fourier series for a triangular wave Consider the function which we assume to be periodic with period T = 2. This function can be defined in the calculator, in ALG mode, by the expression DEFINE(‘g(X) = IFTE(X<1,X,2-X)’) If you started this example after finishing example 1 you already have a value of 2 stored in CAS variable PERIOD.
  • Page 514 The calculator returns an integral that cannot be evaluated numerically because it depends on the parameter n. The coefficient can still be calculated by typing its definition in the calculator, i.e., ⋅ ⋅ ⋅ π ⋅   ⋅ ⋅ −...
  • Page 515 Press `` to copy this result to the screen. Then, reactivate the Equation Writer to calculate the second integral defining the coefficient c , namely, π π Once again, replacing e = (-1) , and using e = 1, we get: Press `` to copy this second result to the screen.
  • Page 516 π Once again, replacing e = (-1) , results in 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...
  • Page 517: Fourier Series For A Square Wave

    The resulting graph is shown below for k = 5 (the number of elements in the series is 2k+1, i.e., 11, in this case): 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 518 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 ): Using a procedure similar to that of the triangular shape in example 2, above, you can find that...
  • Page 519 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 520: Fourier Series Applications In Differential Equations

    Fourier series applications in differential equations Suppose we want to use the periodic square wave defined in the previous example as the excitation of an undamped spring-mass system whose homogeneous equation is: d y/dX + 0.25y = 0. We can generate the excitation force by obtaining an approximation with k =10 out of the Fourier series by using SW(X) = F(X,10,0.5): We can use this result as the first input to the function LDEC when used to obtain a solution to the system d...
  • Page 521: Fourier Transforms

    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. Change the decimal mode to Standard, and use the following: The solution is shown below: Fourier Transforms Before presenting the concept of Fourier transforms, we’ll discuss the general...
  • Page 522 κ The function κ(s,t) is integration of the form known as the kernel of the transformation. The use of an integral transform allows us to resolve a function into a given spectrum of components. To understand the concept of a spectrum, consider the Fourier series ω...
  • Page 523 vs. ω A plot of the values A is the typical representation of a discrete spectrum for a function. The discrete spectrum will show that the function has components at angular frequencies ω which are integer multiples of the fundamental angular frequency ω Suppose that we are faced with the need to expand a non-periodic function into sine and cosine components.
  • Page 524: Definition Of Fourier Transforms

    In the calculator, set up and evaluate the following integrals to calculate C(ω) and S(ω), respectively. CAS modes are set to Exact and Real. Their results are, respectively: The continuous spectrum, A(ω) is calculated as: Define this expression as a function by using function DEFINE („à). Then, plot the continuous spectrum, in the range 0 <...
  • Page 525 ∞ ω sin( ω π Inverse sine transform ∞ − ω ω sin( ω Fourier cosine transform ∞ ω cos( ω π Inverse cosine transform ∞ − ω ω ⋅ cos( ω ⋅ ⋅ Fourier transform (proper) ∞ − iω ω...
  • Page 526: Properties Of The Fourier Transform

    ω ω π ω π ω ω ω π ω ω 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 frequency spectrum of the original function f(t).
  • Page 527: Fast Fourier Transform (Fft)

    convolution: For Fourier transform applications, the operation of convolution is defined as ⋅ − ξ ⋅ ξ ⋅ ξ π The following property holds for convolution: F{f*g} = F{f}⋅F{g}. Fast Fourier Transform (FFT) The Fast Fourier Transform is a computer algorithm by which one can calculate very efficiently a discrete Fourier transform (DFT).
  • Page 528: Examples Of Fft Applications

    Introduction to Random Vibrations, Spectral & Wavelet Analysis – Third Edition,” Longman Scientific and Technical, New York. The only requirement for the application of the FFT is that the number n be a power of 2, i.e., select your data so that it contains 2, 4, 8, 16, 32, 62, etc., points.
  • Page 529 in the command catalog, ‚N). Store the array into variable ΣDAT by using function STOΣ (also available through ‚N). Select Bar in the TYPE for graphs, change the view window to 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 530 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 531: 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 532: Legendre's Equation

    Legendre’s equation )-2⋅x⋅ (dy/dx)+n⋅ (n+1) ⋅y = 0, where n An equation of the form (1-x )⋅(d y/dx is a real number, is known as the Legendre’s differential equation. Any solution for this equation is known as a Legendre’s function. When n is a nonnegative integer, the solutions are called Legendre’s polynomials.
  • Page 533: Bessel's Equation

    Bessel’s equation ⋅(d ) ⋅y = 0, The ordinary differential equation x y/dx ) + x⋅ (dy/dx)+ (x -ν where the parameter ν is a nonnegative real number, is known as Bessel’s differential equation. Solutions to Bessel’s equation are given in terms of Bessel functions of the first kind of order ν: ν...
  • Page 534 If you want to obtain an expression for J (x) with, say, 5 terms in the series, use J(x,0,5). The result is ‘1-0.25*x^3+0.015625*x^4-4.3403777E-4*x^6+6.782168E-6*x^8- 6.78168*x^10’. For non-integer values ν, the solution to the Bessel equation is given by ⋅J ⋅J y(x) = K (x)+K (x).
  • Page 535: Chebyshev Or Tchebycheff Polynomials,

    With these definitions, a general solution of Bessel’s equation for all values of ν is given by ⋅J ⋅Y y(x) = K (x)+K (x). ν ν In some instances, it is necessary to provide complex solutions to Bessel’s equations by defining the Bessel functions of the third kind of order ν as (x) = J (x)+i⋅Y (x), and H...
  • Page 536: Laguerre's Equation

    (x) = sin(n⋅arccos(x))/sin(arccos(x)). You can access the function TCHEBYCHEFF through the command catalog (‚N). The first four Chebyshev or Tchebycheff polynomials of the first and second kind are obtained as follows: 0 TCHEBYCHEFF, result: 1, i.e., (x) = 1.0. -0 TCHEBYCHEFF, result: 1, i.e., (x) = 1.0.
  • Page 537: Weber's Equation And Hermite Polynomials,

    is the m-th coefficient of the binomial expansion (x+y) . It also represents the 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).
  • Page 538: Numerical And Graphical Solutions To Odes

    0 HERMITE, result: 1, i.e., H = 1. 1 HERMITE, result: ’2*X’, i.e., H = 2x. 2 HERMITE, result: ’4*X^2-2’, i.e., H = 4x 3 HERMITE, result: ’8*X^3-12*X’, i.e., H = 8x -12x. Numerical and graphical solutions to ODEs Differential equations that cannot be solved analytically can be solved numerically or graphically as illustrated below.
  • Page 539 To solve, press: @SOLVE (wait) @EDIT@. The result is 0.2499 ≈ 0.25. Press @@@OK@@@. Solution presented as a table of values Suppose we wanted to produce a table of values of v, for t = 0.00, 0.25, …, 2.00, we will proceed as follows: First, prepare a table to write down your results.
  • Page 540: Graphical Solution Of First-Order Ode

    0.00 4.000 0.25 3.285 0.50 2.640 0.75 2.066 1.00 1.562 1.25 1.129 1.50 0.766 1.75 0.473 2.00 0.250 Graphical solution of first-order ODE When we can not obtain a closed-form solution for the integral, we can always plot the integral by selecting Diff Eq in the TYPE field of the PLOT environment as follows: suppose that we want to plot the position x(t) for a velocity function v(t) = exp(-t ), with x = 0 at t = 0.
  • Page 541 • Also, use the following values for the remaining parameters: Init: 0, Final: 5, Step: Default, Tol: 0.0001, Init-Soln: 0 • To plot the graph use: @ERASE @DRAW When you observe the graph being plotted, you'll notice that the graph is not very smooth.
  • Page 542: Numerical Solution Of Second-Order Ode

    Numerical solution of second-order ODE Integration of second-order ODEs can be accomplished by defining the solution as a vector. As an example, suppose that a spring-mass system is subject to a damping force proportional to its speed, so that the resulting differential equation is: x"...
  • Page 543 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. Press @CANCL to return to SOLVE environment. Solution presented as a table of values In the previous example we were interested only in finding the values of the position and velocity at a given time t.
  • Page 544: 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. The final results look as follows: 0.00 0.000...
  • Page 545 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 546: Numerical Solution For Stiff First-Order Ode

    Numerical solution for stiff first-order ODE Consider the ODE: dy/dt = -100y+100t+101, subject to the initial condition y(0) = 1. Exact solution This equation can be written as dy/dt + 100 y = 100 t + 101, and solved using an integrating factor, IF(t) = exp(100t), as follows (RPN mode, with CAS set to Exact mode): ‘(100*t+101)*EXP(100*t)’...
  • Page 547: Numerical Solution To Odes With The Solve/Diff Menu

    Soln: Here we are trying to obtain the value of y(2) given y(0) = 1. With the field highlighted, press @SOLVE. You can check that a solution takes Final about 6 seconds, while in the previous first-order example the solution was almost instantaneous.
  • Page 548: Function Rkf

    contains functions for the numerical solution of ordinary differential equations for use in programming. These functions are described next using RPN mode and system flag 117 set to SOFT menus. The functions provided by the SOLVE/DIFF menu are the following: Function RKF This function is used to compute the solution to an initial value problem for a first-order differential equation using the Runge-Kutta-Fehlbert 4...
  • Page 549: Function Rrk

    RKF solution Actual solution init init final final init final init final The following screens show the RPN stack before and after applying function RKF for the differential equation dy/dx = x+y, ε = 0.001, ∆x = 0.1. After applying function RKF, variable @@@y@@@ contains the value 4.3880... Function RRK This function is similar to the RKF function, except that RRK (Rosenbrock and Runge-Kutta methods) requires as the list in stack level 3 for input not only the...
  • Page 550: Function Rkfstep

    The following screen shots show the RPN stack before and after application of function RRK: The value stored in variable y is 3.00000000004. Function RKFSTEP This function uses an input list similar to that of function RKF, as well as the tolerance for the solution, and a possible step ∆x, and returns the same input list, followed by the tolerance, and an estimate of the next step in the independent variable.
  • Page 551: Function Rrkstep

    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).
  • Page 552: Function Rkferr

    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: {‘x’, ‘y’, ‘f(x,y)’} ∆x After running this function, the stack will show the lines: {‘x’, ‘y’, ‘f(x,y)’} ε...
  • Page 553 The following screen shots show the RPN stack before and after application of function RSBERR: These results indicate that ∆y = 4.1514… and error = 2.762..., for Dx = 0.1. Check that, if Dx is reduced to 0.01, ∆y = -0.00307… and error = 0.000547.
  • Page 554: Chapter 17 - Probability Applications

    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 555: Random Numbers

    To simplify notation, use P(n,r) for permutations, and C(n,r) for combinations. We can calculate combinations, permutations, and factorials with functions COMB, PERM, and ! from the MTH/PROBABILITY.. sub-menu. The operation of those functions is described next: • COMB(n,r): Combinations of n items taken r at a time •...
  • Page 556 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 557: Binomial Distribution

    Discrete probability distributions A random variable is said to be discrete when it can only take a finite number of values. For example, the number of rainy days in a given location can be considered a discrete random variable because we count them as integer numbers only.
  • Page 558: Poisson Distribution

    probability of getting a success in any given repetition. The cumulative distribution function for the binomial distribution is given by ∑ ,..., 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...
  • Page 559: Continuous Probability Distributions

    Examples of calculations using these functions are shown next: Continuous probability distributions The probability distribution for a continuous random variable, X, is characterized by a function f(x) known as the probability density function (pdf). The pdf has the following properties: f(x) > 0, for all x, and ∫...
  • Page 560 The corresponding (cumulative) distribution function (cdf) would be given by an integral that has no closed-form solution. The exponential distribution The exponential distribution is the gamma distribution with a = 1. Its pdf is given by exp( β β β while its cdf is given by F(x) = 1 - exp(-x/β), for x>0, β...
  • Page 561 (Continuous FUNctions) and define the following functions (change to Approx mode): Gamma pdf: 'gpdf(x) = x^(α-1)*EXP(-x/β)/(β^α*GAMMA(α))' 'gcdf(x) = ∫(0,x,gpdf(t),t)' Gamma cdf: Beta pdf: ' βpdf(x)= GAMMA(α+β)*x^(α-1)*(1-x)^(β-1)/(GAMMA(α)*GAMMA(β))' ' βc ∫(0,x, βpdf(t),t)' Beta cdf: df(x) Exponential pdf: 'epdf(x) = EXP(-x/β)/β' Exponential cdf: 'ecdf(x) = 1 - EXP(-x/β)' 'Wpdf(x) = α*β*x^(β-1)*EXP(-α*x^β)' Weibull pdf:...
  • Page 562: Continuous Distributions For Statistical Inference

    Some examples of application of these functions, for values of α = 2, β = 3, are shown below. Notice the variable IERR that shows up in the second screen shot. This results from a numerical integration for function gcdf. Continuous distributions for statistical inference In this section we discuss four continuous probability distributions that are commonly used for problems related to statistical inference.
  • Page 563: Normal Distribution Cdf

    − µ exp[ − σ σ π where µ is the mean, and σ is the variance of the distribution. To calculate the value of f(µ,σ ,x) for the normal distribution, use function NDIST with the following arguments: the mean, µ, the variance, σ , and, the value x , i.e., NDIST(µ,σ...
  • Page 564: The Student-T Distribution

    The Student-t distribution The Student-t, or simply, the t-, distribution has one parameter ν, known as the degrees of freedom of the distribution. The probability distribution function (pdf) is given by ν ν − ν ν πν where Γ(α) = (α-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 ν...
  • Page 565 ν − − ν ν ν 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, ∞ ∫...
  • Page 566: 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, ∞...
  • Page 567 • Exponential, F(x) = 1 - exp(-x/β) β • Weibull, F(x) = 1-exp(-αx (Before continuing, make sure to purge variables α and β). To find the inverse cdf’s for these two distributions we need just solve for x from these expressions, i.e., Exponential: Weibull:...
  • Page 568 of the complicated nature of function Y(X), it will take some time before the graph is produced. Be patient.) There are two roots of this function found by using function @ROOT within the plot environment. Because of the integral in the equation, the root is approximated and will not be shown in the plot screen.
  • Page 569 For the normal, Student’s t, Chi-square (χ ), and F distributions, which are 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 – UTPN(µ,σ2,x) •...
  • Page 570 To facilitate solution of equations involving functions UTPN, UTPT, UTPC, and UTPF, you may want to create a sub-directory UTPEQ were you will store the equations listed above: 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.
  • Page 571 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 572: Chapter 18 - Statistical Applications

    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 573: Calculating Single-Variable Statistics

    Store the program in a variable called LXC. After storing this program in RPN mode you can also use it in ALG mode. To store a column vector into variable ΣDAT use function STOΣ, available through the catalog (‚N), e.g., STOΣ (ANS(1)) in ALG mode. Example 1 –...
  • Page 574 Definitions The definitions used for these quantities are the following: Suppose that you have a number data points x , …, representing different measurements of the same discrete or continuous variable x. The set of all possible values of the quantity x is referred to as the population of x. A finite population will have only a fixed number of elements x .
  • Page 575 (n+1)/2. If you have an even number, n, of elements, the median is the average of the elements located in positions n/2 and (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 576: Obtaining Frequency Distributions

    Coefficient of variation The coefficient of variation of a sample combines the mean, a measure of central tendency, with the standard deviation, a measure of spreading, and is defined, as a percentage, by: V = (s /x)100. Sample vs. population The pre-programmed functions for single-variable statistics used above can be applied to a finite population by selecting the in the...
  • Page 577 Suppose that the classes, or bins, will be selected by dividing the interval (x ), into k = Bin Count classes by selecting a number of class boundaries, i.e., {xB , xB , …, xB }, so that class number 1 is limited by xB , class number 2 by xB - xB...
  • Page 578 • Obtain single-variable information using: ‚Ù @@@OK@@@. Use Sample for the Type of data set, and select all options as results. The results for this example were: Mean: 51.0406, Std Dev: .29.5893…, Variance: 875.529… Total: 10208.12, Maximum: 99.35, Minimum: 0.13 This information indicates that our data ranges from values close to zero to values close to 100.
  • Page 579 of the next row. Thus, for the second class, the cumulative frequency is 18+15 = 33, while for class number 3, the cumulative frequency is 33 + 16 = 49, and so on. The cumulative frequency represents the frequency of those numbers that are smaller than or equal to the upper boundary of any given class.
  • Page 580 Histograms A histogram is a bar plot showing the frequency count as the height of the bars while the class boundaries shown the base of the bars. If you have your raw data (i.e., the original data before the frequency count is made) in the variable ΣDAT, you can select as your graph type and provide Histogram...
  • Page 581: Fitting Data To A Function Y = F(X)

    A plot of frequency count, f , vs. class marks, xM , is known as a frequency polygon. A plot of the cumulative frequency vs. the upper boundaries is known as a cumulative frequency ogive. You can produce scatterplots that simulate these two plots by entering the proper data in columns 1 and 2 of a new ΣDAT matrix and changing the : to...
  • Page 582 • To obtain the data fitting press @@OK@@. The output from this program, shown below for our particular data set, consists of the following three lines in RPN mode: 3: '0.195238095238 + 2.00857142857*X' 2: Correlation: 0.983781424465 1: Covariance: 7.03 Level 3 shows the form of the equation. In this case, y = 0.06924 + 0.00383 x.
  • Page 583 Indep. Depend. Type of Actual Linearized variable Variable Covar. ξ η Fitting Model Model ξη Linear y = a + bx [same] Log. y = a + b ln(x) [same] ln(x) ln(x),y Exp. y = a e ln(y) = ln(a) + bx ln(y) x,ln(y) Power...
  • Page 584: Obtaining Additional Summary Statistics

    the program CRMC developed in Chapter 10. Next, save this matrix into the statistical matrix ΣDAT, by using function STOΣ. Finally, launch the data fit application by using: ‚Ù˜˜@@@OK@@@ . The display shows the current ΣDAT, already loaded. Change your set up screen to the following parameters if needed: Press @@@OK@@@, to get: 1: '3.99504833324*EXP(-.579206831203*X)'...
  • Page 585: Calculation Of Percentiles

    • To access the summary stats… option, use: ‚Ù˜˜˜@@@OK@@@ • Select the column numbers corresponding to the x- and y-data, i.e., X-Col: 1, and Y-Col: 2. • Using the @ CHK@ key select all the options for outputs, i.e., _ΣX, _ΣY, etc. •...
  • Page 586: The Stat Soft Menu

    which we’ll store in variable %TILE (percent-tile). This program requires as input a value p within 0 and 1, representing the 100p percentile, and a list of values. The program returns the 100p percentile of the list. Example 1 - Determine the 37% percentile of the list { 2 1 0 1 3 5 1 2 3 6 7 9}.
  • Page 587: The Σpar Sub-Menu

    ΣDAT: places contents of current ΣDATA matrix in level 1 of the stack. „ΣDAT: stores matrix in level 1 of stack into ΣDATA matrix. The ΣPAR sub-menu The ΣPAR sub-menu contains functions used to modify statistical parameters. The parameters shown correspond to the last example of data fitting. The parameters shown in the display are: Xcol: indicates column of ΣDATA representing x (Default: 1) Ycol: indicates column of ΣDATA representing y (Default: 2)
  • Page 588: The Plot Sub-Menu

    The functions available are the following: TOT: show sum of each column in ΣDATA matrix. MEAN: shows average of each column in ΣDATA matrix. SDEV: shows standard deviation of each column in ΣDATA matrix. MAXΣ: shows maximum value of each column in ΣDATA matrix. MINΣ: shows average of each column in ΣDATA matrix.
  • Page 589: The Fit Sub-Menu

    The FIT sub-menu The FIT sub-menu contains functions used to fit equations to the data in columns Xcol and Ycol of the ΣDATA matrix. The functions available in this sub-menu are: ΣLINE: provides the equation corresponding to the most recent fitting. LR: provides intercept and slope of most recent fitting.
  • Page 590 • Calculate statistics of each column: @) S TAT @) 1 VAR: @TOT produces [38.5 87.5 82799.8] @MEAN produces [5.5. 12.5 11828.54…] @SDEV produces [3.39… 6.78… 21097.01…] @MAX£ produces [10 21.5 55066] @MIN£ produces [1.1 3.7 7.8] L @VAR produces [11.52 46.08 445084146.33] @PSDEV produces [3.142…...
  • Page 591 @CANCL returns to main display • Determine the fitting equation and some of its statistics: @) S TAT @) F IT@ @£LINE '1.5+2*X' produces @@@LR@@@ produces Intercept: 1.5, Slope: 2 3 @PREDX produces 0.75 1 @PREDY produces 3. 50 @CORR produces 1.0 @@COV@@ produces 23.04...
  • Page 592 L @) S TAT @PLOT @SCATR produce scattergram of y vs. x @STATL show line for log fitting Obviously, the log-fit is not a good choice. @CANCL returns to normal display. • Select the best fitting by using: @) S TAT @£PAR @) M ODL @BESTF shows EXPFIT as the best fit for these data L@) S TAT @) F IT @£LINE produces '2.6545*EXP(0.9927*X)'...
  • Page 593: Confidence Intervals

    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 594: Estimation Of Confidence Intervals

    to estimate is its mean value, µ. We will use as an estimator the mean value of the sample, X, defined by (a rule): For the sample under consideration, the estimate of µ is the sample statistic x This single value of X, namely x = = (2.2+2.5+2.1+2.3+2.2)/5 = 2.36.
  • Page 595: Confidence Intervals For The Population Mean When The Population Variance Is Unknown

    The one-sided upper and lower 100(1-α) % confidence limits for the population mean µ are, respectively, X+z ⋅σ/√n , and X−z ⋅σ/√n . Thus, a α α ⋅σ/√n), and an lower, one-sided, confidence interval is defined as (-∞ , X+z α...
  • Page 596: Sampling Distributions Of Differences And Sums Of Statistics,

    is the probability of success, then the mean value, or expectation, of X is E[X] = p, and its variance is Var[X] = p(1-p). If an experiment involving X is repeated n times, and k successful outcomes are recorded, then an estimate of p is given by p’= k/n, while the standard error of p’...
  • Page 597: Confidence Intervals For Sums And Differences Of Mean Values,

    Confidence intervals for sums and differences of mean values If the population variances σ and σ are known, the confidence intervals for the difference and sum of the mean values of the populations, i.e., µ ±µ , are given by: σ...
  • Page 598: Determining Confidence Intervals,

    reason to believe that the two unknown population variances are different, we can use the following confidence interval ν α ν α ± ± where the estimated standard deviation for the sum or difference is ± and n, the degrees of freedom of the t variate, are calculated using the integer value closest to ν...
  • Page 599 3. Z-INT: 1 p.: Single sample confidence interval for the proportion, p, for large samples with unknown population variance. 4. Z-INT: p1− p2.: Confidence interval for the difference of two proportions, , for large samples with unknown population variances. 5. T-INT: 1 µ.: Single sample confidence interval for the population mean, µ, for small samples with unknown population variance.
  • Page 600 The result indicates that a 95% confidence interval has been calculated. The Critical z value shown in the screen above corresponds to the values ±z ⋅σ/√n , X+z ⋅σ/√n ). The values µ the confidence interval formula (X−z Min and µ Max are the lower and upper limits of this interval, i.e., µ Min = X−z ⋅σ/√n, and µ...
  • Page 601 The variable ∆µ represents µ 1 – µ2. Example 3 – A survey of public opinion indicates that in a sample of 150 people 60 favor increasing property taxes to finance some public projects. Determine the 99% confidence interval for the population proportion that would favor increasing taxes.
  • Page 602 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: Example 5 – Determine a 95% confidence interval for the mean of the population if a sample of 50 elements has a mean of 15.5 and a standard deviation of 5.
  • Page 603 The figure shows the Student’s t pdf for ν = 50 – 1 = 49 degrees of freedom. Example 6 -- Determine the 99% confidence interval for the difference in means of two populations given the sample data:x = 157.8 ,x = 160.0, = 50, n = 55.
  • Page 604: Confidence Intervals For The Variance,

    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 ..., X of independent normally-distributed variables with mean µ, variance σ , and sample mean X.
  • Page 605: Hypothesis Testing

    In Chapter 17 we use the numerical solver to solve the equation α = UTPC(γ,x). In this program, γ represents the degrees of freedom (n-1), and α represents the probability of exceeding a certain value of x (χ ), i.e., Pr[χ >...
  • Page 606: Procedure For Testing Hypotheses

    Procedure for testing hypotheses The procedure for hypothesis testing involves the following six steps: 1. Declare a null hypothesis, H . This is the hypothesis to be tested. For : µ example, H -µ = 0, i.e., we hypothesize that the mean value of population 1 and the mean value of population 2 are the same.
  • Page 607: Inferences Concerning One Mean

    ] = α Rejecting a true hypothesis, Pr[Type I error] = Pr[T∈R|H ] = β Not rejecting a false hypothesis, Pr[Type II error] = Pr[T∈A|H Now, let's consider the cases in which we make the correct decision: ] = 1 - α Not rejecting a true hypothesis, Pr[Not(Type I error)] = Pr[T∈A|H ] = 1 - β...
  • Page 608 First, we calculate the appropriate statistic for the test (t or z ) as follows: • If n < 30 and the standard deviation of the population, σ, is known, − µ use the z-statistic: σ • If n > 30, and σ is known, use z as above.
  • Page 609 deviation s = 3.5. We assume that we don't know the value of the population standard deviation, therefore, we calculate a t statistic as follows: − µ − − 7142 The corresponding P-value, for n = 25 - 1 = 24 degrees of freedom is P-value = 2⋅UTPT(24,-0.7142) = 2⋅0.7590 = 1.5169, since 1.5169 >...
  • Page 610: Inferences Concerning Two Means,

    • If using z, P-value = UTPN(0,1,z • If using t, P-value = UTPT(ν,t : µ = 22.0 ( = µ Example 2 -- Test the null hypothesis H ), against the : µ >22.5 at a level of confidence of 95% i.e., α = alternative hypothesis, H 0.05, using a sample of size n = 25 with a mean x = 22.0 and a standard deviation s = 3.5.
  • Page 611: Paired Sample Tests,

    Two-sided hypothesis : µ ≠ δ, The If the alternative hypothesis is a two-sided hypothesis, i.e., H -µ P-value for this test is calculated as • If using z, P-value = 2⋅UTPN(0,1, |z • If using t, P-value = 2⋅UTPT(ν,|t with the degrees of freedom for the t-distribution given by ν...
  • Page 612: Inferences Concerning One Proportion

    Inferences concerning one proportion Suppose that we want to test the null hypothesis, H : p = p , where p represents the probability of obtaining a successful outcome in any given repetition of a Bernoulli trial. To test the hypothesis, we perform n repetitions of the experiment, and find that k successful outcomes are recorded.
  • Page 613: Testing The Difference Between Two Proportions

    Testing the difference between two proportions Suppose that we want to test the null hypothesis, H , where the p's represents the probability of obtaining a successful outcome in any given repetition of a Bernoulli trial for two populations 1 and 2. To test the hypothesis, we perform n repetitions of the experiment from population 1,...
  • Page 614: Hypothesis Testing Using Pre-Programmed Features

    ) = α, or Φ(z ) = 1- α, Pr[Z> z ] = 1-Φ(z α α α Reject the null hypothesis, H , if z >z , and H > p , or if z < - z , and α...
  • Page 615 Try the following exercises: Example 1 – For µ = 150, σ = 10, x = 158, n = 50, for α = 0.05, test the : µ = µ : µ ≠ µ hypothesis H , against the alternative hypothesis, H Press ‚Ù——...
  • Page 616 Example 2 -- For µ = 150, x = 158, s = 10, n = 50, for α = 0.05, test the : µ = µ : µ > µ hypothesis H , against the alternative hypothesis, H . The population standard deviation, σ, is not known.
  • Page 617 : µ −µ = 0, against the alternative hypothesis, variance, test the hypothesis H : µ −µ < 0. Press ‚Ù—— @@@OK@@@ to access the hypothesis testing feature in the Press —@@@OK@@@ to select option 6. T-Test: µ1−µ2.: calculator. Enter the following data and press @@@OK@@@: Select the alternative hypothesis µ1<...
  • Page 618: Inferences Concerning One Variance

    Inferences concerning one variance : σ = σ The null hypothesis to be tested is , H , at a level of confidence (1- α)100%, or significance level α, using a sample of size n, and variance s The test statistic to be used is a chi-squared test statistic defined as −...
  • Page 619: Inferences Concerning Two Variances,

    Inferences concerning two variances : σ = σ The null hypothesis to be tested is , H , at a level of confidence (1- α)100%, or significance level α, using two samples of sizes, n and n , and variances s and s .
  • Page 620: Additional Notes On Linear Regression

    Example1 -- Consider two samples drawn from normal populations such that = 21, n = 31, s = 0.36, and s = 0.25. We test the null hypothesis, H σ = σ , at a significance level α = 0.05, against the alternative hypothesis, : σ...
  • Page 621 Suppose that we have n paired observations (x ); we predict y by means of y = a + b⋅x, where a and b are constant. Define the prediction error as, e - (a + b⋅x The method of least squares requires us to choose a, b so as to minimize the sum of squared errors (SSE) −...
  • Page 622: Additional Equations For Linear Regression

    Additional equations for linear regression The summary statistics such as Σx, Σx , etc., can be used to define the following quantities: From which it follows that the standard deviations of x and y, and the covariance of x,y are given, respectively, by , and −...
  • Page 623: Confidence Intervals And Hypothesis Testing In Linear Regression,

    Let y = actual data value, = a + b⋅x = least-square prediction of the data. Then, the prediction error is: e - (a + b⋅x An estimate of σ is the, so-called, standard error of the estimate, ∑ Confidence intervals and hypothesis testing in linear regression Here are some concepts and equations related to statistical inference for linear regression: •...
  • Page 624: Procedure For Inference Statistics For Linear Regression Using The Calculator,

    • Hypothesis testing on the intercept , Α: : Α = Α Null hypothesis, H , tested against the alternative hypothesis, H Α ≠ Α . The test statistic is t = (a-Α )/[(1/n)+x , where t follows the Student’s t distribution with ν = n – 2, degrees of freedom, and n represents the number of points in the sample.
  • Page 625 Example 1 -- For the following (x,y) data, determine the 95% confidence interval for the slope B and the intercept A 10.0 12.2 Enter the (x,y) data in columns 1 and 2 of ΣDAT, respectively. A scatterplot of the data shows a good linear trend: option in the ‚Ù...
  • Page 626 Confidence intervals for the slope (Β) and intercept (A): • First, we obtain t = 3.18244630528 (See chapter 17 for a α n-2, 0.025 program to solve for t ν • Next, we calculate the terms )⋅s /√S = 3.182…⋅(0.1826…/2.5) = 0.8602…...
  • Page 627: Multiple Linear Fitting,

    Example 3 – Test of significance for the linear regression. Test the null : Β = 0, against the alternative hypothesis, H : Β ≠ hypothesis for the slope H 0, at the level of significance α = 0.05, for the linear fitting of Example 1. The test statistic is t = (b -Β...
  • Page 628 Then, the vector of coefficients is obtained from b = (X ⋅X) ⋅X ⋅y, where y is the vector y = [y … y For example, use the following data to obtain the multiple linear fitting ⋅x ⋅x ⋅x y = b 1.20 3.10 2.00...
  • Page 629: Polynomial Fitting,

    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.23.., 9.45..]. Compare these fitted values with the original data as shown in the table below: y-fitted 1.20...
  • Page 630 If p = n-1, X = V If p < n-1, then remove columns p+2, …, n-1, n from V to form X. If p > n-1, then add columns n+1, …, p-1, p+1, to V to form matrix X. 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 …...
  • Page 631 Here is the translation of the algorithm to a program in User RPL language. (See Chapter 21 for additional information on programming): « Open program x y p Enter lists x and y, and p (levels 3,2,1) « Open subprogram 1 x SIZE Determine size of x list «...
  • Page 632 As an example, use the following data to obtain a polynomial fitting with p = 2, 3, 4, 5, 6. 2.30 179.72 3.20 562.30 4.50 1969.11 1.65 65.87 9.32 31220.89 1.18 32.81 6.24 6731.48 3.45 737.41 9.89 39248.46 1.22 33.45 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.
  • Page 633: Selecting The Best Fitting

    Selecting the best fitting As you can see from the results above, you can fit any polynomial to a set of data. The question arises, which is the best fitting for the data? To help one decide on the best fitting we can use several criteria: •...
  • Page 634 « Open program x y p Enter lists x and y, and number p « Open subprogram1 x SIZE Determine size of x list « Open subprogram 2 Place x in stack, obtain V x VANDERMONDE IF ‘p<n-1’ THEN This IF is step 3 in algorithm Place n in stack p 2 + Calculate p+1...
  • Page 635 yv − ABS SQ Calculate SST Calculate SSE/SST NEG 1 + √ Calculate r = [1–SSE/SST ] “r” Tag result as “r” SWAP Exchange stack levels 1 and 2 “SSE” Tag result as SSE » Close sub-program 4 » Close sub-program 3 »...
  • Page 636: Definitions

    Chapter 19 Numbers in Different Bases In this Chapter we present examples of calculations of number in bases other than the decimal basis. Definitions The number system used for everyday arithmetic is known as the decimal system for it uses 10 (Latin, deca) digits, namely 0-9, to write out any real number.
  • Page 637 With system flag 117 set to SOFT menus, the BASE menu shows the following: With this format, it is evident that the LOGIC, BIT, and BYTE entries within the BASE menu are themselves sub-menus. These menus are discussed later in this Chapter.
  • Page 638: 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 639: Wordsize,

    To see what happens if you select the @DEC@ setting, try the following conversions: 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 640: 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 641: The Bit Menu

    XOR (BIN) NOT (HEX) 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: RL: Rotate Left one bit, e.g., #1100b #1001b...
  • Page 642: Hexadecimal Numbers For Pixel References

    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 #1001b SLB: Shift Left one byte, e.g., #1101b #11010b SRB: Shift Right one byte, e.g., #11011b #1101b...
  • Page 643: Chapter 20 - Customizing Menus And Keyboard

    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-shift (‚) or ALPHA (~) keys.
  • Page 644: 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 645 To activate any of those functions you simply need to enter the function argument (a number), and then press the corresponding soft menu key. In ALG mode, the list to be entered as argument of function TMENU or MENU is more complicated: {{“exp”,”EXP(“},{“ln”,”LN(“},{“Gamma”,”GAMMA(“},{“!”,”!(“}} The reason for this is that, in RPN mode, the command names are both soft menu labels and commands.
  • Page 646: Menu Specification And Cst Variable

    Menu specification and CST variable From the two exercises shown above we notice that the most general menu specification list include a number of sub-lists equal to the number of items to be displayed in your custom menu. Each sub-list contains a label for the menu key followed by a function, expression, label, or other object that constitutes the effect of the menu key when pressed.
  • Page 647: 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 648: Recall Current User-Defined Key List

    ASN: Assigns an object to a key specified by XY.Z STOKEYS: Stores user-defined key list RCLKEYS: Returns current user-defined key list DELKEYS: Un-assigns one or more keys in the current user-defined key list, the arguments are either 0, to un-assign all user-defined keys, or XY.Z, to un-assign key XY.Z.
  • Page 649: Un-Assigning A User-Defined Key

    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 650: Chapter 21 - Programming In User Rpl Language

    Chapter 21 Programming in User RPL language User RPL language is the programming language most commonly used to program the calculator. The program components can be put together in the line editor by including them between program containers « » in the appropriate order.
  • Page 651: Global And Local Variables And Subprograms

    „´@) H YP @SINH SINH Calculate sinh of level 1 #~„x „º 1 x SQ Enter 1 and calculate x „´@) @ MTH@ @LIST @ADD@ Calculate (1+x then divide ~„x™ „°@) @ MEM@@ @) @ DIR@@ @PURGE PURGE Purge variable x Program in level 1 _______________________ __________...
  • Page 652 would be replaced by the value that the program uses and then completely removed from your variable menu after program execution. From the point of view of programming, therefore, a global variable is a variable that is accessible to the user after program execution. It is possible to use a local variable within the program that is only defined for that program and will not be available for use after program execution.
  • Page 653: Global Variable Scope

    « « » » → x x SINH 1 x SQ ADD / 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 654: Local Variable Scope

    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. Local Variable Scope Local variables are active only within a program or sub-program.
  • Page 655: Navigating Through Rpn Sub-Menus

    DO-UNTIL-END construct for loops WHILE: WHILE-REPEAT-END construct for loops TEST: Comparison operators, logical operators, flag testing functions TYPE: Functions for converting object types, splitting objects, etc. LIST: Functions related to list manipulation ELEM: Functions for manipulating elements of a list PROC: Functions for applying procedures to lists GROB: Functions for the manipulation of graphic objects PICT:...
  • Page 656 STACK MEM/DIR BRCH/IF BRCH/WHILE TYPE PURGE WHILE SWAP THEN REPEAT ARRY DROP ELSE LIST OVER PATH TEST CRDIR BRCH/CASE UNROT PGDIR UNIT ≠ ROLL VARS CASE ROLLD TVARS THEN < PICK ORDER > ≤ UNPICK MEM/ARITH BRCH/START ≥ PICK3 DTAG DEPTH STO+ START...
  • Page 657 LIST/ELEM GROB CHARS MODES/FLAG MODES/MISC GROB BEEP GETI BLANK REPL PUTI GXOR SIZE SIZE FS?C REPL FS?C HEAD FC?C INFO TAIL STOF SIZE HEAD RCLF LIST/PROC ANIMATE TAIL RESET INFORM DOLIST SREPL NOVAL PICT MODES/KEYS DOSUB CHOOSE MODES/FMT NSUB PICT INPUT ENDSUB PDIM...
  • Page 658: Shortcuts In The Prg Menu

    TIME ERROR DATE DOERR DBUG DATE ERRN TIME ERRM SST↓ TIME ERR0 NEXT TICKS LASTARG HALT KILL TIME/ALRM ERROR/IFERR IFERR ACKALARM THEN STOALARM ELSE RCLALARM DELALARM FINDALARM Shortcuts in the PRG menu Many of the functions listed above for the PRG menu are readily available through other means: •...
  • Page 659: Keystroke Sequence For Commonly Used Commands

    „@) @ IF@@ „@) C ASE@ ‚@) @ IF@@ ‚@) C ASE@ „@) S TART „@) @ FOR@@ ‚@) S TART ‚@) @ FOR@@ „@) @ @DO@@ „@) W HILE Notice that the insert prompt ( ) is available after the key word for each construct so you can start typing at the right location.
  • Page 660 @) S TACK „°@) S TACK @@DUP@@ „°@) S TACK @SWAP@ SWAP „°@) S TACK @DROP@ DROP @) @ MEM@@ @) @ DIR@@ „°@) @ MEM@@ @) @ DIR@@ @PURGE PURGE „°@) @ MEM@@ @) @ DIR@@ @ORDER ORDER @) @ BRCH@ @) @ IF@@ „°@) @ BRCH@ @) @ IF@@ @@@IF@@@ „°@) @ BRCH@ @) @ IF@@ @THEN@ THEN...
  • Page 661 @) @ BRCH@ @) W HILE@ „°@) @ BRCH@ @) W HILE@ @WHILE WHILE „°) @ BRCH@ @) W HILE@ @REPEA REPEAT „°) @ BRCH@ @) W HILE@ @@END@ @) T EST@ „° @) T EST@ @@@≠@@@ „° @) T EST@ L @@AND@ „°...
  • Page 662: Programs For Generating Lists Of Numbers

    @) L IST@ @) P ROC@ „°@) L IST@ @) P ROC@ @REVLI@ REVLIST „°@) L IST@ @) P ROC@ L @SORT@ SORT „°@) L IST@ @) P ROC@ L @@SEQ@@ @) M ODES @) A NGLE@ „°L@) M ODES @) A NGLE@ @@DEG@@ „°L@) M ODES @) A NGLE@ @@RAD@@ @) M ODES @) M ENU@ „°L@) M ODES @) M ENU@ @@CST@@...
  • Page 663 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: « « » » → 1 n FOR j x NEXT n LIST CRLST: «...
  • Page 664: Examples Of Sequential Programming,

    Examples of sequential programming In general, a program is any sequence of calculator instructions enclosed between the program containers “ and ». Subprograms can be included as 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 665 where C is a constant that depends on the system of units used [C = 1.0 for units of the International System (S.I.), and C = 1.486 for units of the English System (E.S.)], n is the Manning’s resistance coefficient, which depends on the type of channel lining and other factors, y is the flow depth, and S is the...
  • Page 666: Programs That Simulate A Sequence Of Stack Operations,

    You can also separate the input data with spaces in a single stack line rather than using `. Programs that simulate a sequence of stack operations In this case, the terms to be involved in the sequence of operations are assumed to be present in the stack.
  • Page 667 As you can see, y is used first, then we use b, g, and Q, in that order. Therefore, for the purpose of this calculation we need to enter the variables in the inverse order, i.e., (do not type the following): Q ` g `b `y ` For the specific values under consideration we use: 23 ` 32.2 ` 3 `2 `...
  • Page 668: Interactive Input In Programs

    Note: SQ is the function that results from the keystroke sequence „º. Save the program into a variable called hv: ³~„h~„v K 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 669 it is always possible to recall the program definition into the stack (‚@@@q@@@) Cu n y0 to see the order in which the variables must be entered, namely, → However, for the case of the program @@hv@@, its definition « »...
  • Page 670: 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 671: A Function With An Input String

    The result is a stack prompting the user for the value of a and placing the cursor right in front of the prompt :a: Enter a value for a, say 35, then press `. The result is the input string in stack level 1.
  • Page 672 @SST Result: a:2 ↓ @SST Result: empty stack, executing ↓ → @SST Result: empty stack, entering subprogram ↓ « @SST Result: ‘2*a^2+3’ ↓ @SST Result: ‘2*a^2+3’, leaving subprogram » ↓ @SST Result: ‘2*a^2+3’, leaving main program» ↓ Further pressing the @SST @ soft menu key produces no more output since we ↓...
  • Page 673: Input String For Two Or Three Input Values

    This can be used to execute at once any sub-program called from within a main program. Examples of the application of @@SST@ will be shown later. 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 NUM after the algebraic expression ‘2*a^2+3’.
  • Page 674 stack level 7 to give a title to the input string, and leave stack level 6 empty to facilitate reading the display, we have only stack levels 1 through 5 to define input variables. Input string program for two input values The input string program for two input values, say a and b, looks as follows: »...
  • Page 675 Store the new program back into variable @@@p@@@. Press @@@p@@@ to run the program. Enter values of V = 0.01_m^3 and T = 300_K in the input string, then press `. 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.
  • Page 676: 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 677 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: …...
  • Page 678 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): Now, enter different values for the three fields, say, C = 95, R = 2.5, and S =...
  • Page 679 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 } INFORM IF THEN OBJ DROP...
  • Page 680: Creating A Choose Box

    « “ CHEZY’S EQN” “C:” “Chezy’s coefficient” { “R:” “Hydraulic radius” 0 } { “S:” “Channel bed slope” 0} } { 2 1 } { 120 1 .0001} { 110 1.5 .00001 } INFORM IF THEN OBJ DROP C R S ‘C*(R*S)’ NUM “Q”...
  • Page 681 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 , which depends on the system of units used.
  • Page 682: Identifying Output In Programs

    the 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 683: 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 684 (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 685 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 686: Using A Message Box

    To erase any character while editing the program, place the cursor to the right of the character to be erased and use the backspace key ƒ. Store the program back into variable p by using „@@@p@@@. Next, run the program by pressing @@@p@@@. Enter values of V = 0.01_m^3, T = 300_K, and n = 0.8_mol, when prompted.
  • Page 687 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 function →STR available at „°@) T YPE@ @ STR.
  • Page 688 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 For the case of program @@@p@@@, the modified included in a message box.
  • Page 689 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 690 values may be a tedious process. You could have the program itself attach those units to the input and output values. We will illustrate these options by modifying yet once more the program @@@p@@@, as follows. Recall the contents of program @@@p@@@ to the stack by using ‚@@@p@@@, and modify them to look like this: Note: I’ve separated the program arbitrarily into several lines for easy reading.
  • Page 691 we generate a number with units (e.g., 0.01_m^3), but the tag is lost. 4. T ‘1_K’ * :Calculating value of T including S.I. units 5. n ‘1_mol’ * : Calculating value of n including units 6. → V T n : The values of V, T, and n, located respectively in stack levels 3, 2, and 1, are passed on to the next level of sub-programming.
  • Page 692: Relational And Logical Operators

    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.]: “ {“ :n: “ {2 0} V } « INPUT OBJ→ → V T n n DTAG →...
  • Page 693: Logical Operators

    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). The relational operators available for programming the calculator are: ____________________________________________________ Operator Meaning Example ____________________________________________________ “is equal to”...
  • Page 694 The available logical operators are: AND, OR, XOR (exclusive or), NOT, and SAME. The operators will produce results that are true or false, depending on the truth-value of the logical statements affected. The operator NOT (negation) applies to a single logical statements. All of the others apply to two logical statements.
  • Page 695: 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 696 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. Evaluate logical_statement. 2. If logical_statement is true, perform program _statements and continue program flow after the END statement.
  • Page 697 and verify that variable @@@f1@@@ is and save it under the name ‘f1’. Press indeed available in your variable menu. Verify the following results: @@@f1@@@ Result: 0 1.2 @@@f1@@@ Result: 1.44 3.5 @@@f1@@@ Result: no action 10 @@@f1@@@ Result: no action These results confirm the correct operation of the IF…THEN…END construct.
  • Page 698 → x IF ‘x<3’ THEN ‘x^2‘ ELSE ‘1-x’ END EVAL ”Done” MSGBOX « « » » and verify that variable @@@f2@@@ is and save it under the name ‘f2’. Press indeed available in your variable menu. Verify the following results: 0 @@@f2@@@ Result: 0 1.2 @@@f2@@@ Result: 1.44 3.5 @@@f2@@@ Result: -2.5...
  • Page 699 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. For example, consider the function sin( π exp( π elsewhere Here is a possible way to evaluate this function using IF… THEN … ELSE … END constructs: IF x<3 THEN ELSE...
  • Page 700: The Case Construct

    → x IF ‘x<3‘ THEN ‘x^2‘ ELSE IF ‘x<5‘ THEN ‘1-x‘ ELSE IF « « ‘x<3*π‘ THEN ‘SIN(x)‘ ELSE IF ‘x<15‘ THEN ‘EXP(x)‘ ELSE –2 END END END END EVAL » » Store the program in variable @@@f3@@@ and try the following evaluations: 1.5 @@f3@@@ Result: 2.25 (i.e., x 2.5 @@@f3@@@...
  • Page 701 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 THEN END END •...
  • Page 702: Program Loops

    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 … THEN … ELSE …...
  • Page 703 „°@) @ BRCH@ @) S TART @START 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 NEXT • ‚ @START : Starts the START…STEP construct: START STEP The START…NEXT construct...
  • Page 704 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. Thus, after DUP is executed, n is in stack level 3, and zeroes fill stack levels 1 and 2.
  • Page 705 @SST↓@ SL1 = 0., (start value of loop index) @SST↓@ SL1 = 2.(n), SL2 = 0. (end value of loop index) @SST↓@ Empty stack (START – beginning of loop) --- loop execution number 1 for k = 0 @SST↓@ SL1 = 0. (k) @SST↓@ SL1 = 0.
  • Page 706 @SST↓@ Empty stack (NEXT – end of loop) --- loop execution number 3 for k = 2 @SST↓@ SL1 = 2. (k) @SST↓@ SL1 = 4. (SQ(k) = k @SST↓@ SL1 = 1.(S), SL2 = 4. (k @SST↓@ SL1 = 5. (S + k @SST↓@ SL1 = 1., SL2 = 5.
  • Page 707 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. For increment > 0, execution occurs as long as the index is less than or equal to end_value. For increment < 0, execution occurs as long as the index is greater than or equal to end_value.
  • Page 708: The For Construct

    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 709 Using a FOR…NEXT loop: 0 → n S 0 n FOR k k SQ S + ‘S‘ STO NEXT S “S” →TAG » » « « Store this program in a variable @@S2@@. Verify the following exercises: J 3 @@@S2@@ 4 @@@S2@@ Result: S:30 Result: S:14 5 @@@S2@@...
  • Page 710: The Do Construct,

    • Check out that the program call 0.5 ` 2.5 ` 0.5 ` @GLIS2 produces the list {0.5 1. 1.5 2. 2.5}. • To see step-by-step operation use the program DBUG for a short list, for example: J1 # 1.5 # 0.5 ` Enter parameters 1 1.5 0.5 [‘] @GLIS2 ` Enter the program name in level 1...
  • Page 711: The While Construct

    Store this program in a variable @@S3@@. Verify the following exercises: J 3 @@@S3@@ 4 @@@S3@@ Result: S:30 Result: S:14 5 @@@S3@@ 8 @@@S3@@ Result: S:204 Result: S:55 10 @@@S3@@ 20 @@@S3@@ Result: S:2870 Result: S:385 30 @@@S3@@ 100 @@@S3@@ Result: S:338350 Result: S:9455 Example 3 –...
  • Page 712 loop index that gets modified before the logical_statement is checked at the beginning of the next repetition. Unlike the DO command, if the first evaluation of logical_statement is false, the loop is never executed. Example 1 – calculate the summation S using a WHILE…REPEAT…END construct The following program calculates the summation Using a WHILE…REPEAT…END loop:...
  • Page 713: Errors And Error Trapping

    J1 # 1.5 # 0.5 ` Enter parameters 1 1.5 0.5 [‘] @GLIS4 ` Enter the program name in level 1 „°LL @) @ RUN@ @@DBG@ Start the debugger. Use @SST↓@ to step into the program and see the detailed operation of each command.
  • Page 714: Errm,

    ERRM This function returns a character string representing the error message of the most recent error. For example, in Approx mode, if you try 0Y$@ERRM, you get the following string: “Infinite Result” ERR0 This function clears the last error number, so that, executing ERRN afterwards, in Approx mode, will return # 0h.
  • Page 715: User Rpl Programming In Algebraic Mode

    IF trap-clause THEN error-clause END IF trap-clause THEN error-clause ELSE normal-clause END The operation of these logical constructs is similar to that of the IF … THEN … END and of the IF … THEN … ELSE … END constructs. If an error is detected during the execution of the trap-clause, then the error-clause is executed.
  • Page 716 statement. At this point you will be ready to type the RPL program. The following figures show the RPL> command with the program before and after pressing the ` key. To store the program use the STO command as follows: „îK~p2` An evaluation of program P2 for the argument X = 5 is shown in the next screen:...
  • Page 717: Chapter 22 - Programs For Graphics Manipulation

    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 718: Description Of The Plot Menu

    To user-define a key you need to add to this list a command or program followed by a reference to the key (see details in Chapter 20). Type the list { S << 81.01 MENU >> 13.0 } in the stack and use function STOKEYS („°L@) M ODES @) @ KEYS@ @@STOK@) to user-define key C as the access to the PLOT menu.
  • Page 719 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 720 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 721 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) ‚...
  • Page 722 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: •...
  • Page 723 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 ) and ), 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 724 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 725 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 726 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 727 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 728 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 729 and slope of a data fitting model, and the type of model to be fit to the data in ΣDAT. 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 730: Generating Plots With Programs

    • AXES: when selected, axes are shown if visible within the plot area or volume. • CNCT: when selected the plot is produced so that individual points are connected. • SIMU: when selected, and if more than one graph is to be plotted in the same set of axes, plots all the graphs simultaneously.
  • Page 731: Three-Dimensional Graphics

    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 high step step These pairs of values of x, y, and z, represent the following: •...
  • Page 732 @) P PAR Show plot parameters ~„r` @INDEP Define ‘r’ as the indep. variable ~„s` @DEPND Define ‘s’ as the dependent variable 1 \# 10 @XRNG Define (-1, 10) as the x-range 1 \# 5 @YRNG L Define (-1, 5) as the y-range { (0,0) {.4 .2} “Rs”...
  • Page 733: Examples Of Program-Generated Plots

    ‘1+SIN(θ)’ ` „ @@EQ@@ Store complex funct. r = f(θ) into EQ @) P PAR Show plot parameters { θ 0 6.29} ` @INDEP Define ‘θ’ as the indep. Variable ~y` @DEPND Define ‘Y’ as the dependent variable 3 \# 3 @XRNG Define (-3,3) as the x-range 0.5 \# 2.5 @YRNG L Define (-0.5,2.5) as the y-range...
  • Page 734 « Start program Purge current PPAR and EQ {PPAR EQ} PURGE Store ‘√r’ into EQ ‘√r’ STEQ Set independent variable to ‘r’ ‘r’ INDEP Set dependent variable to ‘s’ ‘s’ DEPND Select FUNCTION as the plot type FUNCTION { (0.,0.) {.4 .2} Set axes information “Rs”...
  • Page 735: Drawing Commands For Use In Programming

    Example 3 – A polar plot. Enter the following program: « Start program Change to radians, purge vars. RAD {PPAR EQ} PURGE Store ‘f(θ)’ into EQ ‘1+SIN(θ)’ STEQ { θ 0. 6.29} INDEP Set indep. variable to ‘θ’, with range Set dependent variable to ‘Y’...
  • Page 736: Pict,

    PICT This soft key refers to a variable called PICT that stores the current contents of the graphics window. This variable name, however, cannot be placed within quotes, and can only store graphics objects. In that sense, PICT is like no other calculator variables.
  • Page 737: Arc,

    between those coordinates, turning off pixels that are on in the line path and vice versa. This command takes as input two ordered pairs (x ) (x ), or two pairs of pixel coordinates {#n } {#n }. It draws the box whose diagonals are represented by the two pairs of coordinates in the input.
  • Page 738: Pix?, Pixon, And Pixoff

    PIX?, PIXON, and PIXOFF These functions take as input the coordinates of point in user coordinates, (x,y), or in pixels {#n, #m}. • PIX? Checks if pixel at location (x,y) or {#n, #m} is on. • PIXOFF turns off pixel at location (x,y) or {#n, #m}. •...
  • Page 739 « Start program Select degrees for angular measures 0. 100. XRNG Set x range 0. 50. YRNG Set y range ERASE Erase picture (5., 2.5) (95., 47.5) BOX Draw box from (5,5) to (95,95) (50., 50.) 10. 0. 360. ARC Draw a circle center (50,50), r =10.
  • Page 740 It is suggested that you create a separate sub-directory to store the programs. You could call the sub-directory RIVER, since we are dealing with irregular open channel cross-sections, typical of rivers. To see the program XSECT in action, use the following data sets. Enter them as matrices of two columns, the first column being x and the second one y.
  • Page 741: Pixel Coordinates

    Data set 1 Data set 2 10.0 10.5 11.0 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: «...
  • Page 742: Animating Graphics

    correspond to the lower right corner of the screen {# 82h #3Fh}, which in user-coordinates is the point (x ). The coordinates of the two other corners both in pixel as well as in user-defined coordinates are shown in the figure.
  • Page 743: Animating A Collection Of Graphics

    Animating a collection of graphics The calculator provides the function ANIMATE to animate a number of graphics that have been placed in the stack. You can generate a graph in the graphics screen by using the commands in the PLOT and PICT menus. To place the generated graph in the stack, use PICT RCL.
  • Page 744 The 11 graphics generated by the program are still available in the stack. If you want to re-start the animation, simply use: 11 ANIMATE. (Function ANIMATE is available by using „°L@) G ROB L @ANIMA). Press $ to stop the animation once more. animation will be re-started.
  • Page 745: More Information On The Animate Function

    otherwise quiescent water that gets reflected from the walls of a circular tank back towards the center. Press $ to stop the animation. Example 2 - Animating the plotting of different power functions Suppose that you want to animate the plotting of the functions f(x) = x , n = 0, 1, 2, 3, 4, in the same set of axes.
  • Page 746: Graphic Objects (Grobs)

    Graphic objects (GROBs) The word GROB stands for GRaphics OBjects and is used in the calculator’s environment to represent a pixel-by-pixel description of an image that has been produced in the calculator’s screen. Therefore, when an image is converted into a GROB, it becomes a sequence of binary digits (binary digits = bits), i.e., 0’s and 1’s.
  • Page 747: The Grob Menu

    You can also convert equations into GROBs. For example, using the equation writer type in the equation ‘X^2+3’ into stack level 1, and then press 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.
  • Page 748 BLANK The function BLANK, with arguments #n and #m, creates a blank graphics object of width and height specified by the values #n and #m, respectively. This is similar to the function PDIM in the GRAPH menu. The function GOR (Graphics OR) takes as input grob (a target GROB), a set of coordinates, and grob , and produces the superposition of grob...
  • Page 749: 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. Here is the listing of the program: «...
  • Page 750 side figure shows the state of stresses when the element is rotated by an angle φ. In this case, the normal stresses are σ’ and σ’ , while the shear stresses are τ’ and τ’ , σ , τ , τ The relationship between the original state of stresses (σ...
  • Page 751 with respect to segment AB. The coordinates of point A’ will give the values (σ’ ,τ’ ), while those of B’ will give the values (σ’ ,τ’ The stress condition for which the shear stress, τ’ , is zero, indicated by segment D’E’, produces the so-called principal stresses, σ...
  • Page 752: Modular Programming

    Modular programming To develop the program that will plot Mohr’s circle given a state of stress, we will use modular programming. Basically, this approach consists in decomposing the program into a number of sub-programs that are created as separate variables in the calculator. These sub-programs are then linked by a main program, that we will call MOHRCIRCL.
  • Page 753 INDAT, MOHRC. Before re-ordering the variables, run the program once by pressing the soft-key labeled @MOHRC. Use the following: @MOHRC Launches the main program MOHRCIRCL 25˜ Enter σx = 25 75˜ Enter σy = 75 Enter τxy = 50, and finish data entry. At this point the program MOHRCIRCL starts calling the sub-programs to produce the figure.
  • Page 754: A Program To Calculate Principal Stresses,

    To find the principal normal values press š until the cursor returns to the intersection of the circle with the positive section of the σ-axis. The values , τ’ φ found at that point are = 59 , and (σ’ ) = (1.06E2,-1.40E0) = (106, - 1.40).
  • Page 755: Ordering The Variables In The Sub-Directory

    The result is: Ordering the variables in the sub-directory Running the program MOHRCIRCL for the first time produced a couple of new variables, PPAR and EQ. These are the Plot PARameter and EQuation variables 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.
  • Page 756: An Input Form For The Mohr's Circle Program

    J@MOHRC Start program PRNST 12.5˜ Enter σx = 12.5 6.25\˜ Enter σy = -6.25 Enter τxy = -5, and finish data entry. The result is: To find the values of the stresses corresponding to a rotation of 35 in the angle of the stressed particle, we use: $š...
  • Page 757 Press @@@OK@@@ to continue program execution. The result is the following figure: 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 758: Chapter 23 - Character Strings

    Chapter 23 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 759: String Concatenation

    Examples of application of these functions to strings are shown next: 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 760: The Characters List

    The operation of NUM, CHR, OBJ , and STR was presented earlier in this Chapter. We have also seen the functions SUB and REPL in relation to graphics earlier in this chapter. Functions SUB, REPL, POS, SIZE, HEAD, and TAIL have similar effects as in lists, namely: SIZE: number of a sub-string in a string (including spaces) POS: position of first occurrence of a character in a string HEAD: extracts first character in a string...
  • Page 761 say they line feed character , you will see at the left side of the bottom of the screen the keystroke sequence to get such character ( . for this case) and the numerical code corresponding to the character (10 in this case). Characters that are not defined appear as a dark square in the characters list ( ) and show ( ) at the bottom of the display, even though a numerical...
  • Page 762: Chapter 24 - Calculator Objects And Flags

    Chapter 24 Calculator objects and flags 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.
  • Page 763: Function Type

    Number Type Example ____________________________________________________________________ Extended Real Number Long Real Extended Complex Number Long Complex Linked Array Linked Array Character Object Character Code Object Code Library Data Library Data External Object External Integer 3423142 External Object External External Object External ____________________________________________________________________ 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.
  • Page 764: Calculator Flags

    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. System flags System flags can be accessed by using H @) F LAGS! Press the down arrow...
  • Page 765: User Flags

    Functions for manipulating calculator flags are available in the PRG/MODES/FLAG menu. The PRG menu is activated with „°. The following screens (with system flag 117 set to CHOOSE boxes) show the sequence of screens to get to the FLAG menu: The functions contained within the FLAG menu are the following: The operation of these functions is as follows: Set a flag...
  • Page 766: Chapter 25 - Date And Time Functions

    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 767: Browsing Alarms

    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 PURG: For deleting an alarm...
  • Page 768: 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 ALRM..:Sub-menu with alarm manipulation functions (described later)
  • Page 769: 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 770: Chapter 26 - Managing Memory

    Chapter 26 Managing memory In Chapter 2 of the User’s Guide we introduced the basic concepts and operations for creating and managing variables and directories. In this Chapter we discuss the management of the calculator’s memory in terms of partition of memory and techniques for backing up data. Memory Structure The calculator contains a total of 80 KB to be used for calculator operation and data storage (user’s memory).
  • Page 771: The Home Directory

    The HOME directory When using the calculator you may be creating variables to store intermediate and final results. Some calculator operations such as graphics or statistical operations create their own variables for storing data. These variables will be contained within the HOME directory or one of its directories. Details on the manipulation of variables and directories are presented in Chapter 2 of the User’s Guide.
  • Page 772: Backup Objects

    Backup objects Backup objects are used to copy data from your home directory into a memory port. The purpose of backing up objects in memory port is to preserve the contents of the objects for future usage. Backup objects have the following characteristics: •...
  • Page 773 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. The instructions for these operations follow. Backing up the HOME directory To back up the current HOME directory using algebraic mode, enter the command: ARCHIVE(:Port_Number: Backup_Name) Here, the only possible value for Port_Number is 0, and Backup_Name is the...
  • Page 774: Storing, Deleting, And Restoring Backup Objects

    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. Using this approach, the backup object will have the same name as the original object.
  • Page 775: Using Libraries,

    the screen. Alternatively, you can use function EVAL to run a program stored in a backup object, or function RCL to recover data from a backup object as follows: • In algebraic mode: To evaluate a back up object, enter: EVAL(argument(s), : Port_Number : Backup_Name ) To recall a backup object to the command line, enter: RCL(: Port_Number : Backup_Name)
  • Page 776: Library Numbers

    Library numbers If you use the LIB menu (‚á) and press the soft menu key corresponding to port 0, you will see library numbers listed in the soft menu key labels. Each library has a four-digit number associated with it. These numbers are assigned by the library creator, and are used for deleting a library.
  • Page 777 Page 26-8...
  • Page 778: Appendix A - Using Input Forms

    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 779 resulting screen is an input form with input fields for a number of variables (n, I%YR, PV, PMT, FV). 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).
  • Page 780 !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 781 (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 782: Appendix B - The Calculator's Keyboard

    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 783 keyboard in the space occupied by rows 2 and 3. Each key has three, four, or five functions. The main key functions are shown in the figure below. To operate this main key functions simply press the corresponding key. 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.
  • Page 784 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. The arrow keys, —˜š™, are used to move one character at a time in the direction of the key pressed (i.e., up, down, left, or right).
  • Page 785 The left-shift key „ and the right-shift key … are combined with other keys to activate menus, enter characters, or calculate functions as described elsewhere. The numerical keys (0 to 9) are used to enter the digits of the decimal number system.
  • Page 786 the other three functions is associated with the left-shift „(MTH), right- shift … ) , and ~ (P) keys. (CAT Diagrams showing the function or character resulting from combining the calculator keys with the left-shift „, right-shift …, ALPHA ~, ALPHA-left- shift ~„, and ALPHA-right-shift ~…, are presented next.
  • Page 787 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. The MTRW function activates the Matrix Writer.
  • Page 788 The e key calculates the exponential function of x. The x key calculates the square of x (this is referred to as the SQ function). The ASIN, ACOS, and ATAN functions calculate the arcsine, arccosine, and arctangent functions, respectively. The 10 function calculates the anti-logarithm of x.
  • Page 789 Right-shift … functions of the calculator’s keyboard Right-shift functions The sketch above shows the functions, characters, or menus associated with the different calculator keys when the right-shift key … is activated. The functions BEGIN, END, COPY, CUT and PASTE are used for editing purposes.
  • Page 790 The CAT function is used to activate the command catalog. The CLEAR function clears the screen. The LN function calculates the natural logarithm. function calculates the x – th root of y. The Σ function is used to enter summations (or the upper case Greek letter sigma).
  • Page 791 (A through Z). The numbers, mathematical symbols (-, +), decimal point (.), and the space (SPC) are the same as the main functions of these keys. The ~ function produces an asterisk (*) 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...
  • Page 792 Notice that the ~„ combination is used mainly to enter the lower-case letters of the English alphabet (A through Z). The numbers, mathematical symbols (-, +, ×), 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 ~„...
  • Page 793 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 794 when the ~… combination is used. The special characters generated by the ~… combination include Greek letters (α, β, ∆, δ, ε, ρ, µ, λ, σ, θ, τ, ω, and Π), other characters generated by the ~… combination are |, ‘, ^, =, <, >, /, “, \, __, ~, !, ?, <<>>, and @.
  • Page 795: Appendix C - Cas Settings

    Appendix C CAS settings CAS stands for Computer Algebraic System. This is the mathematical core of the calculator where the symbolic mathematical operations and functions are programmed. The CAS offers a number of settings can be adjusted according to the type of operation of interest. To see the optional CAS settings use the following: •...
  • Page 796 • To recover the original menu in the CALCULATOR MODES input box, press the L key. Of interest at this point is the changing of the CAS settings. This is accomplished by pressing the @@CAS@ soft menu key. The default values of the CAS setting are shown below: •...
  • Page 797 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 798 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 799 The keystrokes necessary for entering these values in Algebraic mode are the …¹2` R5` following: The same calculations can be produced in RPN mode. Stack levels 3: and 4: show the case of Exact CAS setting (i.e., the _Numeric CAS option is unselected), while stack levels 1: and 2: show the case in which the Numeric CAS option is selected.
  • Page 800 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 801 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 802 For example, having selected the Step/step option, the following screens show the step-by-step division of two polynomials, namely, (X +3X-2)/(X- 2). This is accomplished by using function 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.
  • Page 803 − − − − − − − − 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 804 When the _Rigorous CAS option is selected, the algebraic expression |X|, i.e., the absolute value, is not simplified to X. If the _Rigorous CAS option is not selected, the algebraic expression |X| is simplified to X. The CAS can solve a larger variety of problems if the rigorous mode is not set. However, the result, or the domain in which the result are applicable, might be more limited.
  • Page 805 Notice that, in this instance, soft menu keys E and F are the only one with associated commands, namely: !!CANCL CANCeL the help facility !!@@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.
  • Page 806 L produces no additional menu items). The soft menu key commands are the following: @EXIT EXIT the help facility @ECHO Copy the example command to the stack and exit @@ SEE1@@ C See the first link (if any) in the list of references @@SEE2@ See the second link (if any) of the list of references !@@SEE3@ E...
  • Page 807 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. CAS End User Term and Conditions Use of the CAS Software requires from the user an appropriate mathematical knowledge.
  • Page 808 If required by applicable law the maximum amount payable for damages by the copyright holder shall not exceed the royalty amount paid by Hewlett-Packard to the copyright holder for the CAS Software.
  • Page 809: Appendix D Additional Character Set

    Appendix D 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.
  • Page 810 i.e., ~„d~…9, and the code is 240). The display also shows three functions associated with the soft menu keys, f4, f5, and f6. These functions are: @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.
  • Page 811 Greek letters α ~‚a (alpha) β ~‚b (beta) δ ~‚d (delta) ε ~‚e (epsilon) θ ~‚t (theta) λ ~‚n (lambda) µ ~‚m (mu) ρ ~‚f (rho) σ ~‚s (sigma) τ ~‚u (tau) ω ~‚v (omega) ∆ ~‚c (upper-case delta) Π ~‚p (upper-case pi) Other characters...
  • Page 812: Appendix E - The Selection Tree In The Equation Writer

    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 813 Step A1 Step A2 Step A3 Step A4 Step A5 Step A6 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 +4)/SIN(4x-2) (Step A6, division).
  • Page 814 Step B1 Step B2 Step B3 Step B4 = Step A5 Step B5 = Step A6 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 815 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 816: Appendix F - The Applications (Apps) Menu

    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 817 I/O functions.. Selecting option 2. I/O functions.. in the APPS menu will produce the following menu list of input/output functions These applications are described next: Send to HP 49.. Send data to another calculator Get from HP 49 Receive data from another calculator Print display Send screen to printer Print..
  • Page 818: Numeric Solver

    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 & date.. Selecting option 5.Time &...
  • Page 819 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.. Selecting option 7.File manager.. in the APPS menu launches the file manager application: This operation is equivalent to the keystroke sequence „¡.The file manager is introduced in Chapter 2.
  • Page 820: Math Menu

    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 ˜. If the object in the display is an algebraic object, pressing ˜ will most likely start the Equation Writer.
  • Page 821: Cas Menu

    CAS menu.. Selecting option 11.CAS menu.. in the APPS menu produces the CAS or SYMBOLIC menu: This operation is also available by pressing the Pkey. The CAS or SYMBOLIC menu is introduced in Chapter 5 (algebraic and arithmetic operations). Other functions from the CAS menu are presented in Chapters 4 (complex numbers), 6 (equations solutions), 10 (matrix creation), 11 (matrix operation), 13 (calculus), 14 (multivariate calculus), and 15 (vector analysis).
  • Page 822: Appendix G - Useful Shortcuts

    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 823 • 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 •...
  • Page 824 • 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 825: Appendix H - The Cas Help Facility

    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 826 • 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 827: Appendix I - Command Catalog List

    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 828: Appendix J - The Maths Menu

    Appendix J The MATHS menu The MATHS menu, accessible through the command MATHS (available in the catalog N), contains the following sub-menus: 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.
  • Page 829 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 830 The POLYNOMIAL sub-menu The POLYNOMIAL sub-menu includes functions for generating and manipulating polynomials. These functions are presented in Chapter 5: The TESTS sub-menu The TESTS sub-menu includes relational operators (e.g., ==, <, etc.), logical operators (e.g., AND, OR, etc.), the IFTE function, and the ASSUME and UNASSUME commands.
  • Page 831: Appendix K - 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 832 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 833 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. The CMPLX sub-menu The CMPLX menu includes the following functions: The CMPLX menu is also available in the keyboard (‚ß).
  • Page 834 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 835 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 836: Appendix L - Line Editor Commands

    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 837 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 838 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 839 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. The Style sub-menu The Style sub-menu includes the following styles: BOL: Bold...
  • Page 840 Page L-5...
  • Page 841: Appendix M Index

    Appendix M Index ANIMATE, 22-27 Animating graphics, 22-26 ABCUV, 5-11 Animation, 22-26 ABS, 11-7 Anti-derivatives, 13-14 ABS, 3-4 Approximate CAS mode, C-4 ABS, 4-6 Approximate vs. Exact CAS mode, ACK, 25-4 ACKALL, 25-4 APPS menu, F-1 ACOS, 3-6 ARC, 22-21 ACOSH, 2-62 AREA in plots, 12-7 ADD, 12-21...
  • Page 842 BASE menu, 19-1 Calculus, 13-1 Base units, 3-21 Cancel next repeating alarm, G-3 Batteries, 1-1 Cartesian representation, 4-1 Beep, 1-24 CAS help facility, C-10 BEG, 6-32 CAS help facility listing, H-1 BEGIN, 2-26 CAS independent variable, C-2 Bessel's equation, 16-55 CAS menu.., F-6 Bessel's functions, 16-55 CAS modulus, C-3...
  • Page 843 CMD, 2-61 CONLIB, 3-29 CMDS, 2-25 Constants lib, F-2 CMPLX menus, 4-5 Continuous self-test, G-3 CNCT, 22-14 CONVERT, 3-27 CNTR, 12-50 CONVERT menu, 5-27 Coefficient of variation, 18-5 Convolution, 16-49 COL-, 10-20 Coordinate system, 1-25 COL+, 10-20 Coordinate transformation, 14-7 COL→, 10-19 COPY, 2-26 “Cold”...
  • Page 844 Dates calculations 25-4 DESOLVE, 16-7 DBUG, 21-35 DET, 11-11 DDAYS, 25-3 De-tagging, 21-33 Debugging programs, 21-22 Determinants, 11-12 11-45 DEC, 19-2 DIAG→, 10-13 Decimal comma, 1-21 Diagonal matrix, 10-12 Decimal numbers, 19-4 DIFF menu, 16-4 Decimal point, 1-20 DIFFE sub-menu, 6-31 Decomposing a vector, 9-12 Differential equation graph, 12-26 Decomposing lists, 8-2...
  • Page 845 DIV2MOD, 5-12 ENDSUB, 8-11 DIV2MOD, 5-15 Energy units, 3-19 Divergence, 15-4 Engineering format, 1-20 DIVIS, 5-10 ENGL, 3-29 DIVMOD, 5-12 Entering vectors, 9-2 DIVMOD, 5-15 EPS, 2-35 DO construct, 21-61 EPSX0, 5-23 DOERR, 21-64 EQ, 6-28 DOLIST, 8-12 Equation Writer (EQW), 2-10 DOMAIN, 13-9 Equation writer properties, 1-28 DOSUBS, 8-11...
  • Page 846 EVAL, 2-5 Finite arithmetic ring, 5-14 Exact CAS mode, C-4 Finite population, 18-3 EXEC, L-2 Fitting data, 18-10 EXP, 3-6 Fixed format, 1-18 EXP2POW, 5-29 Flags, 24-1 EXPAND, 5-5 FLOOR, 3-14 EXPANDMOD, 5-12 FOR construct, 21-59 EXPLN, 5-8 Force units, 3-19 EXPLN, 5-29 FOURIER, 16-27 EXPM, 3-9...
  • Page 847 Graphs slope fields, 12-34 Graphs Fast 3D plots, 12-35 Graphs wireframe plots, 12-34 GAMMA, 3-15 Graphs Ps-Contour plots, 12-39 Gamma distribution, 17-6 Graphs Y-Slice plots, 12-41 GAUSS, 11-53 Graphs Gridmap plots, 12-42 Gaussian elimination, 11-28 Graphs Pr-Surface plots, 12-43 Gauss-Jordan elimination, 11-28 Graphs Zooming, 12-49 11-37 11-39 Graphs SYMBOLIC menu, 12-51...
  • Page 848 Higher-order derivatives, 13-13 IF...THEN..END, 21-47 Higher-order partial derivatives, IFERR sub-menu, 21-65 14-3 IFTE, 3-35 HILBERT, 10-14 ILAP, 16-11 Histograms, 12-30 Illumination units, 3-20 HMS-, 25-3 IM, 4-6 HMS+, 25-3 IMAGE, 11-54 HMS-->, 25-3 Imaginary part, 4-1 HORNER, 5-11, 5-20 Implicit derivatives, 13-7 H-VIEW, 12-20 Improper integrals, 13-21 Hyperbolic functions graphs, 12-...
  • Page 849 Interactive drawing, 12-43 Keyboard alternate key functions Interactive input programming, 21-19 Interactive plots with PLOT menu, Keyboard left-shift functions B-5 22-15 Keyboard right-shift functions B-8 Interactive self-test, G-3 Keyboard ALPHA characters B-9 INTVX, 13-14 Keyboard ALPHA-left-shift INV, 4-4 characters B-10 INV, L-4 Keyboard ALPHA-right-shift Inverse cdf’s, 17-14...
  • Page 850 LEGENDRE, 5-11, 5-22 Logical operators, 21-43 Legendre's equation, 16-54 Lower-triangular matrix, 11-49 Length units, 3-18 LQ, 11-51 LGCD, 5-10 LQ decomposition, 11-51 lim, 13-2 LSQ, 11-23 Limits, 13-1 LU, 11-49 LIN, 5-5 LU decomposition, 11-49 LINE, 12-46 LVARI, 7-12 Line editor commands, L-1 Line editor properties, 1-26 Linear algebra, 11-1 Maclaurin series, 13-21...
  • Page 851 MATHS/INTEGER menu, J-2 MES, 7-10 MATHS/MODULAR menu, J-2 Message box programming, MATHS/POLYNOMIAL menu, J-3 21-37 MATHS/TESTS menu, J-3 Method of least squares, 18-50 Matrices, 10-1 MIN, 3-13 Matrix, 10-1 Minimum, 13-12 Matrix augmented, 11-30 Minimum, 14-5 Matrix Jordan-circle decomposition MINIT, 7-13 11-54 MINR, 3-16 Matrix "division", 11-26...
  • Page 852 NEG, 4-6 Objects, 2-1 Nested IF...THEN..ELSE..END, objects, 24-1 21-49 OCT, 19-2 NEW, 2-33 Octal numbers, 3-2 NEXt eQuation, 12-6 ODEs Laplace transform NEXTPRIME, 5-11 applications, 16-17 Non-CAS commands, C-13 ODEs Fourier series, 16-46 Non-linear differential equations, ODEs Graphical solution, 16-60 16-4 ODEs Numerical solution, 16-60 Non-verbose CAS mode, C-7...
  • Page 853 PCAR, 11-44 Polar coordinates double integrals, PCOEF, 5-11, 5-22 14-9 PDIM, 22-20 Polar plot, 12-19 Percentiles, 18-14, Polar representation, 4-1 PERIOD, 2-35 16-35 POLY sub-menu, 6-30 PERM, 17-2 Polynomial equations, 6-6 Permutation matrix, 11-34 Polynomial fitting, 18-56 Permutations, 17-1 Polynomials, 5-18 PEVAL, 5-23 Population, 18-3 PGDIR, 2-43...
  • Page 854 Program branching, 21-46 PVIEW, 22-22 Program loops, 21-53 PX-->C, 19-7 Program-generated plots, 22-17 Programming, 21-1 Programming sequential 21-19 QR, 11-51 Programming interactive input, 21-19 QR decomposition, 11-51 Programming input string prompt, QUADF, 11-52 21-21 Quadratic form diagonal Programming debugging, 21-22 representation, 11-53 Programming choose box, 21-31 QUIT, 3-30...
  • Page 855 Real CAS mode, C-6 ROOT sub-menu, 6-27 Real numbers, C-6 ROW-, 10-24 Real numbers vs. Integer numbers, Row norm, 11-8 Row vectors, 9-19 Real objects, 2-1 ROW+, 10-24 Real part, 4-1 ROW→, 10-23 REALASSUME, 2-35 RPN mode, 1-13 RECT, 4-3 RR, 19-6 RECV, 2-34, RRB, 19-7...
  • Page 856 Series, 13-23 SOLVE menu, 6-27 Series Maclaurin, 13-23 SOLVE menu (menu 74), G-3 Series Taylor, 13-23 SOLVE/DIFF menu, 16-69 SERIES, 13-23 SOLVEVX, 6-4 Series Fourier, 16-27 SOLVR menu, 6-28 Setting time and date, 25-2 SORT, 2-34 SHADE in plots, 12-6 Special characters, G-2 Shortcuts, G-1 Speed units, 3-19...
  • Page 857: String Concatenation,

    Stiff ODEs numerical solution, 16-69 system flags, 24-3 Strings, 23-1 System level operation, G-3 STO, 2-46 System of equations, 11-16 STOALARM, 25-4 System tests, G-3 STOKEYS, 20-6 STREAM, 8-12 String concatenation, 23-2 Table, 12-17, 12-26 Student t distribution, 17-11 TABVAL, 12-52, 13-9 STURM, 5-11 TABVAR, 12-52, 13-11 STURMAB, 5-11...
  • Page 858 Time units, 3-19 Times calculations 25-4 TINC, 3-32 UBASE, 3-21 TITLE, 7-15 UFACT, 3-27 TLINE, 12-46 UNASSIGN, K-1 TLINE, 22-20 UNASUMME, J-3 TMENU, 20-1 UNDE, L-4 TOOL menu, 1-6 UNDO, 2-61 TOOL menu: CASCMD, 1-7 UNIT, 3-29 TOOL menu: CLEAR, 1-7 Unit prefixes, 3-24 TOOL menu: EDIT, 1-6 Units, 3-17...
  • Page 859 Vector elements, 9-7 XPON, 3-14 Vector fields, 15-1 XQ, K-5 Vector fields curl, 15-5 XRNG, 22-6 Vector fields divergence 15-4 XROOT, 3-5 VECTOR menu, 9-10 XSEND, 2-34 Vector potential, 15-6 XVOL, 22-10 Vectors, 9-1 XXRNG, 22-10 Verbose CAS mode, C-6 XYZ, 3-1 Verbose vs.
  • Page 860 %, 3-12 END, L-1 %CH, 3-12 GROB, 22-31 %T, 3-12 HMS, 25-3 Σ, 2-28 LCD, 22-32 ΣDAT, 18-5, LIST, 9-23 ∆LIST, 8-9 ROW, 10-22 ΣLIST, 8-9 SKIP, L-1 ΠLIST, 8-9 STK, 3-30 ΣPAR, 22-13 STR, 23-1 ARRY, 9-21 TAG, 21-33 ARRY, 9-6 TAG, 23-1 BEG, L-1...
  • Page 861: Limited Warranty

    Limited Warranty hp 48gII graphing calculator; Warranty period: 12 months HP warrants to you, the end-user customer, that HP hardware, accessories and supplies will be free from defects in materials and workmanship after the date of purchase, for the period specified above.
  • Page 862: Service

    7. TO THE EXTENT ALLOWED BY LOCAL LAW, THE REMEDIES IN THIS WARRANTY STATEMENT YOUR SOLE EXCLUSIVE REMEDIES. EXCEPT AS INDICATED ABOVE, IN NO EVENT WILL HP OR ITS SUPPLIERS BE LIABLE FOR LOSS OF DATA OR FOR DIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL (INCLUDING LOST PROFIT OR DATA), OR OTHER DAMAGE, WHETHER BASED IN CONTRACT, TORT, OR OTHERWISE.
  • Page 863 +41-22-8278780 (French) +39-02-75419782 (Italian) Turkey +420-5-41422523 +44-207-4580161 Czech Republic +420-5-41422523 South Africa +27-11-2376200 Luxembourg +32-2-7126219 Other European countries +420-5-41422523 Asia Pacific Country : Telephone numbers Australia +61-3-9841-5211 Singapore +61-3-9841-5211 L.America Country : Telephone numbers Argentina 0-810-555-5520 Brazil Sao Paulo 3747-7799; ROTC 0-800-157751 Mexico Mx City 5258-9922;...
  • Page 864: Regulatory Information

    This section contains information that shows how the hp 48gII graphing calculator complies with regulations in certain regions. Any modifications to the calculator not expressly approved by Hewlett-Packard could void the authority to operate the 48gII in these regions. This calculator generates, uses, and can radiate radio frequency energy and may interfere with radio and television reception.

This manual is also suitable for:

48gii

Table of Contents