hp40g+.
title.fm Page ii Friday, February 17, 2006 9:48 AM Notice REGISTER YOUR PRODUCT AT: www.register.hp.com THIS MANUAL AND ANY EXAMPLES CONTAINED HEREIN ARE PROVIDED "AS IS" AND ARE SUBJECT TO CHANGE WITHOUT NOTICE. HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MANUAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. HEWLETT-PACKARD CO.
hp40g+.book Page iii Friday, December 9, 2005 1:03 AM Contents Preface Manual conventions .............................................................. P-1 Notice ................................................................................. P-2 1 Getting started On/off, cancel operations......................................................1-1 The display ..........................................................................1-2 The keyboard ......................................................
hp40g+.book Page iv Friday, December 9, 2005 1:03 AM Function aplet interactive analysis........................................... 3-9 Plotting a piecewise-defined function ................................ 3-12 4 Parametric aplet About the Parametric aplet .................................................... 4-1 Getting started with the Parametric aplet............................. 4-1 5 Polar aplet Getting started with the Polar aplet .........................................
hp40g+.book Page v Friday, December 9, 2005 1:03 AM About the Inference aplet .....................................................11-1 Getting started with the Inference aplet .............................11-1 Importing sample statistics from the Statistics aplet ..............11-4 Hypothesis tests ..................................................................11-8 One-Sample Z-Test..........................................................11-8 Two-Sample Z-Test ......................................
hp40g+.book Page vi Friday, December 9, 2005 1:03 AM Symbolic calculations........................................................ 13-20 Finding derivatives ....................................................... 13-21 Program constants and physical constants ........................... 13-24 Program constants........................................................ 13-25 Physical constants ........................................................ 13-25 14 Computer Algebra System (CAS) What is a CAS? ...
hp40g+.book Page vii Friday, December 9, 2005 1:03 AM Accessing CAS functions....................................................15-12 Equation Writer variables .................................................15-16 Predefined CAS variables .............................................15-16 The keyboard in the Equation Writer ..............................15-17 16 Step-by-Step Examples Introduction .......................................................................
hp40g+.book Page viii Friday, December 9, 2005 1:03 AM Aplet naming convention .............................................. 21-10 Example ..................................................................... 21-10 Programming commands ................................................... 21-13 Aplet commands .......................................................... 21-14 Branch commands ....................................................... 21-17 Drawing commands ......................................
hp40g+.book Page ix Friday, December 9, 2005 1:03 AM Solve aplet variables....................................................... R-11 Statistics aplet variables .................................................. R-12 MATH menu categories ....................................................... R-13 Math functions ............................................................... R-13 Program constants .......................................................... R-15 Physical Constants .......................
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM Preface The HP 40gs is a feature-rich graphing calculator. It is also a powerful mathematics learning tool, with a built-in computer algebra system (CAS). The HP 40gs is designed so that you can use it to explore mathematical functions and their properties. You can get more information on the HP 40gs from Hewlett-Packard’s Calculators web site. You can download customized aplets from the web site and load them onto your calculator.
Preface.fm Page 2 Friday, February 17, 2006 9:47 AM Notice This manual and any examples contained herein are provided as-is and are subject to change without notice.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 1 Getting started On/off, cancel operations To turn on Press To cancel When the calculator is on, the current operation. To turn off Press to turn on the calculator. OFF key cancels the to turn the calculator off. To save power, the calculator turns itself off after several minutes of inactivity. All stored and displayed information is saved. If you see the ((•)) annunciator or the Low Bat message, then the calculator needs fresh batteries.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM The display To adjust the contrast Simultaneously press decrease) the contrast. To clear the display • Press CANCEL to clear the edit line. • Press CLEAR to clear the edit line and the display history. and (or ) to increase (or Parts of the display Title History Edit line Menu key labels Menu key or soft key labels. The labels for the menu keys’ current meanings. is the label for the first menu key in this picture.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Annunciators. Annunciators are symbols that appear above the title bar and give you important status information. Annunciator Description Shift in effect for next keystroke. To cancel, press again. α ((•)) Alpha in effect for next keystroke. To cancel, press again. Low battery power. Busy. Data is being transferred.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM Menu keys • On the calculator keyboard, the top row of keys are called menu keys. Their meanings depend on the context—that’s why they are blank. The menu keys are sometimes called “soft keys”. • The bottom line of the display shows the labels for the menu keys’ current meanings. Aplet control keys The aplet control keys are: Key Meaning Displays the Symbolic view for the current aplet. See “Symbolic view” on page 1-16.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Entry/Edit keys The entry and edit keys are: Key Meaning Cancels the current operation if the calculator is on by pressing . Pressing , then OFF turns the calculator off. (CANCEL) Accesses the function printed in blue above a key. Returns to the HOME view, for performing calculations. Accesses the alphabetical characters printed in orange below a key. Hold down to enter a string of characters. Enters an input or executes an operation.
hp40g+.book Page 6 Friday, December 9, 2005 Key 1:03 AM Meaning (Continued) CHARS Displays a menu of all available characters. To type one, use the arrow keys to highlight it, and press . To select multiple characters, select each and press , then press . Shifted keystrokes There are two shift keys that you use to access the operations and characters printed above the keys: and . Key Description Press the key to access the operations printed in blue above the keys.
chapter-1.fm Page 7 HELPWITH Friday, December 16, 2005 2:20 PM The HP 40gs built-in help is available in HOME only. It provides syntax help for built-in math functions. Access the HELPWITH command by pressing SYNTAX and then the math key for which you require syntax help. Example Press SYNTAX Note: Remove the left parenthesis from built-in functions such as sine, cosine, and tangent before invoking the HELPWITH command. Note: In the CAS system, pressing the will show the CAS help menu.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM • Pressing displays the list of Program Constants. You can use these in programs that you develop. • Pressing displays a menu of physical constants from the fields of chemistry, physics, and quantum mechanics. You can use these constants in calculations. (pSee “Physical constants” on page 13-25 for more information.) • Pressing takes you to the beginning of the MATH menu.
hp40g+.book Page 9 Friday, December 9, 2005 To search a menu • Press 1:03 AM or to scroll through the list. If you press or , you’ll go all the way to the end or the beginning of the list. Highlight the item you want to select, then press • ). If there are two columns, the left column shows general categories and the right column shows specific contents within a category. Highlight a general category in the left column, then highlight an item in the right column.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM Mode settings You use the Modes input form to set the modes for HOME. HINT Although the numeric setting in Modes affects only HOME, the angle setting controls HOME and the current aplet. The angle setting selected in Modes is the angle setting used in both HOME and current aplet. To further configure an aplet, you use the SETUP keys ( and ). Press form.
hp40g+.book Page 11 Friday, December 9, 2005 Setting 1:03 AM Options (Continued) Engineering. Displays result with an exponent that is a multiple of 3, and the specified number of significant digits beyond the first one. Example: 123.456E7 becomes 1.23E9 in Engineering 2 format. Fraction. Displays results as fractions based on the specified number of decimal places. Examples: 123.456789 becomes 123 in Fraction 2 format, and .333 becomes 1/3 and 0.142857 becomes 1/7. See “Using fractions” on page 1-25.
chapter-1.fm Page 12 Friday, December 9, 2005 1:26 AM The cursor (highlight) is in the first field, Angle Measure. 2. Press to display a list of choices. 3. Press to select Degrees, and press . The angle measure changes to degrees. 4. Press HOME. HINT to return to Whenever an input form has a list of choices for a field, you can press to cycle through them instead of using . Aplets (E-lessons) Aplets are the application environments where you explore different classes of mathematical operations.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM symbolic views of the aplets in the following table. See “Aplet view configuration” on page 1-18 for further information. Aplet name Use this aplet to explore: Function Real-valued, rectangular functions y in 2 terms of x. Example: y = 2x + 3x + 5 . Inference Confidence intervals and Hypothesis tests based on the Normal and Students-t distributions. Parametric Parametric relations x and y in terms of t. Example: x = cos(t) and y = sin(t).
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM charge and transferred to the HP 40gs using the provided Connectivity Kit. Quad Explorer aplet HINT The Quad Explorer aplet is used to investigate the 2 behaviour of y = a ( x + h ) + v as the values of a, h and v change, both by manipulating the equation and seeing the change in the graph, and by manipulating the graph and seeing the change in the equation.
hp40g+.book Page 15 Friday, December 9, 2005 Trig Explorer aplet 1:03 AM The Trig Explorer aplet is used to investigate the behaviour of the graph of y = a sin ( bx + c ) + d as the values of a, b, c and d change, both by manipulating the equation and seeing the change in the graph, or by manipulating the graph and seeing the change in the equation. Press , select Trig Explorer, and then press to display the screen shown right. In this mode, the graph controls the equation.
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM Aplet library Aplets are stored in the Aplet library. To open an aplet Press to display the Aplet library menu. Select the aplet and press or . From within an aplet, you can return to HOME any time by pressing . Aplet views When you have configured an aplet to define the relation or data that you want to explore, you can display it in different views.
hp40g+.book Page 17 Friday, December 9, 2005 Numeric view Press 1:03 AM to display the aplet’s Numeric view. In this view, the functions that you have defined are displayed in tabular format. See “About the numeric view” on page 2-16 for further information. Plot-Table view The VIEWS menu contains the Plot-Table view. Select Plot-Table Splits the screen into the plot and the data table. See “Other views for scaling and splitting the graph” on page 2-13 for futher information.
hp40g+.book Page 18 Friday, December 9, 2005 Note view Press 1:03 AM NOTE to display the aplet’s note view. This note is transferred with the aplet if it is sent to another calculator or to a PC. A note view contains text to supplement an aplet. See “Notes and sketches” on page 20-1 for further information. Sketch view Press SKETCH to display the aplet’s sketch view. Displays pictures to supplement an aplet. See “Notes and sketches” on page 20-1 for further information.
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM To change views Each view is a separate environment. To change a view, select a different view by pressing , , keys or select a view from the VIEWS menu. To change to HOME, press . You do not explicitly close the current view, you just enter another one—like passing from one room into another in a house. Data that you enter is automatically saved as you enter it.
hp40g+.book Page 20 Friday, December 9, 2005 Example 1:03 AM 2 23 – 14 8Calculate --------------------------ln ( 45 ) : –3 23 14 8 3 45 Long results If the result is too long to fit on the display line, or if you want to see an expression in textbook format, press to highlight it and then press . Negative numbers Type to start a negative number or to insert a negative sign. To raise a negative number to a power, enclose it in parentheses. For example, (–5)2 = 25, whereas –52 = –25.
hp40g+.book Page 21 Friday, December 9, 2005 1:03 AM However, for clarity, it is better to include the multiplication sign where you expect multiplication in an expression. It is clearest to enter AB as A*B. HINT Parentheses Implied multiplication will not always work as expected. For example, entering A(B+4) will not give A*(B+4). Instead an error message is displayed: “Invalid User Function”.
hp40g+.book Page 22 Friday, December 9, 2005 Algebraic precedence order of evaluation 1:03 AM Functions within an expression are evaluated in the following order of precedence. Functions with the same precedence are evaluated in order from left to right. 1. Expressions within parentheses. Nested parentheses are evaluated from inner to outer. 2. Prefix functions, such as SIN and LOG. 3. Postfix functions, such as ! 4. Power function, ^, NTHROOT. 5. Negation, multiplication, and division. 6.
hp40g+.book Page 23 Friday, December 9, 2005 1:03 AM When you highlight a previous input or result (by pressing ), the and menu labels appear. To copy a previous line Highlight the line (press ) and press . The number (or expression) is copied into the edit line. To reuse the last result Press ANS (last answer) to put the last result from the HOME display into an expression. ANS is a variable that is updated each time you press . To repeat a previous line To repeat the very last line, just press .
hp40g+.book Page 24 Friday, December 9, 2005 HINT 1:03 AM When you retrieve a number from ANS, you obtain the result to its full precision. When you retrieve a number from the HOME’s display history, you obtain exactly what was displayed. Pressing evaluates (or re-evaluates) the last input, ANS copies the last result (as ANS) whereas pressing into the edit line. Storing a value in a variable You can save an answer in a variable and use the variable in later calculations.
hp40g+.book Page 25 Friday, December 9, 2005 Accessing the display history 1:03 AM Pressing enables the highlight bar in the display history. While the highlight bar is active, the following menu and keyboard keys are very useful: Key Function , Scrolls through the display history. Copies the highlighted expression to the position of the cursor in the edit line. Displays the current expression in standard mathematical form.
hp40g+.book Page 26 Friday, December 9, 2005 1:03 AM 2. Select Number Format, press to display the options, and highlight Fraction or Mixed Fraction. 3. Press to select the Number Format option, then move to the precision value field. 4. Enter the precision value that you want to use, and press to set the precision. Press to HOME. to return See “Setting fraction precision” below for more information.
hp40g+.book Page 27 Friday, December 9, 2005 Fraction calculations 1:03 AM • Precision set to 1: • Precision set to 2: • Precision set to 3: • Precision set to 4 When entering fractions: • You use the key to separate the numerator part and the denominator part of the fraction. • To enter a mixed fraction, for example, 11/2, you enter it in the format (1+1/2). For example, to perform the following calculation: 3(23/4 + 57/8) 1.
hp40g+.book Page 28 Friday, December 9, 2005 1:03 AM 2. Enter the calculation. 3 2 4 3 5 7 8 Note: Ensure you are in the HOME view. 3. Evaluate the calculation. Note that if you had selected Mixed Fraction instead of Fraction as the Number format, the answer would have been expressed as 25+7/8. Converting decimals to fractions To convert a decimal value to a fraction: 1. Set the number format mode to Fraction or Mixed Fraction. 2.
hp40g+.book Page 29 Friday, December 9, 2005 1:03 AM In this example, the fraction precision is set to 6. Complex numbers Complex results The HP 40gs can return a complex number as a result for some math functions. A complex number appears as an ordered pair (x, y), where x is the real part and y is the imaginary part. For example, entering – 1 returns (0,1).
hp40g+.book Page 30 Friday, December 9, 2005 1:03 AM Catalogs and editors The HP 40gs has several catalogs and editors. You use them to create and manipulate objects. They access features and stored values (numbers or text or other items) that are independent of aplets. • A catalog lists items, which you can delete or transmit, for example an aplet. • An editor lets you create or modify items and numbers, for example a note or a matrix. Catalog/Editor Contents Aplet library ( ) Aplets.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 2 Aplets and their views Aplet views This section examines the options and functionality of the three main views for the Function, Polar, Parametric, and Sequence aplets: Symbolic, Plot, and Numeric views. About the Symbolic view The Symbolic view is the defining view for the Function, Parametric, Polar, and Sequence aplets. The other views are derived from the symbolic expression.
hp40g+.book 2-2 Page 2 Friday, December 9, 2005 1:03 AM – For a Function definition, enter an expression to define F(X). The only independent variable in the expression is X. – For a Parametric definition, enter a pair of expressions to define X(T) and Y(T). The only independent variable in the expressions is T. – For a Polar definition, enter an expression to define R(θ). The only independent variable in the expression is θ.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Evaluating expressions In aplets In the Symbolic view, a variable is a symbol only, and does not represent one specific value. To evaluate a function in Symbolic view, press . If a function calls another function, then resolves all references to other functions in terms of their independent variable. 1. Choose the Function aplet. Select Function 2. Enter the expressions in the Function aplet’s Symbolic view. A B F1 F2 3. Highlight F3(X). 4.
hp40g+.book Page 4 Friday, December 9, 2005 In HOME 1:03 AM You can also evaluate any expression in HOME by entering it into the edit line and pressing . For example, define F4 as below. In HOME, type F4(9)and press . This evaluates the expression, substituting 9 in place of X into F4. SYMB view keys The following table details the menu keys that you use to work with the Symbolic view. Key Meaning Copies the highlighted expression to the edit line for editing. Press when done.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Key Meaning (Continued) Displays the menu for entering math operations. CHARS Displays special characters. To enter one, place the cursor on it and press . To remain in the CHARS menu and enter another special character, press . Deletes the highlighted expression or the current character in the edit line. CLEAR Deletes all expressions in the list or clears the edit line.
hp40g+.book Page 6 Plot view settings Friday, December 9, 2005 1:03 AM The plot view settings are: Field Meaning XRNG, YRNG Specifies the minimum and maximum horizontal (X) and vertical (Y) values for the plotting window. RES For function plots: Resolution; “Faster” plots in alternate pixel columns; “Detail” plots in every pixel column. TRNG Parametric aplet: Specifies the tvalues (T) for the graph. θRNG Polar aplet: Specifies the angle (θ) value range for the graph.
hp40g+.book Page 7 Friday, December 9, 2005 Reset plot settings 1:03 AM Field Meaning (Continued) CONNECT Connect the plotted points. (The Sequence aplet always connects them.) LABELS Label the axes with XRNG and YRNG values. AXES Draw the axes. GRID Draw grid points using XTICK and YTICK spacing. To reset the default values for all plot settings, press CLEAR in the Plot Setup view. To reset the default value for a field, highlight the field, and press .
hp40g+.book Page 8 Friday, December 9, 2005 Key 1:03 AM Meaning (Continued) Turns menu-key labels on and off. When the labels are off, pressing turns them back on. • • • Pressing once displays the full row of labels. Pressing a second time removes the row of labels to display only the graph. Pressing a third time displays the coordinate mode. Displays the ZOOM menu list. Turns trace mode on/off. A white box appears over the on . Opens an input form for you to enter an X (or T or N or θ) value.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM To jump directly to a value To jump straight to a value rather than using the Trace function, use the menu key. Press , then enter a value. Press to jump to the value. To turn trace on/off If the menu labels are not displayed, press first. • • • . Zoom within a graph Turn off trace mode by pressing . Turn on trace mode by pressing . To turn the coordinate display off, press One of the menu key options is .
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM Option Meaning (Continued) Y-Zoom In Divides vertical scale only, using Y-factor. Y-Zoom Out Multiplies vertical scale only, using Y-factor. Square Changes the vertical scale to match the horizontal scale. (Use this after doing a Box Zoom, X-Zoom, or Y-Zoom.) Set Factors... Sets the X-Zoom and Y-Zoom factors for zooming in or zooming out. Includes option to recenter the plot before zooming.
hp40g+.book Page 11 Friday, December 9, 2005 ZOOM examples 1:03 AM Option Meaning (Continued) Un-zoom Returns the display to the previous zoom, or if there has been only one zoom, un-zoom displays the graph with the original plot settings. The following screens show the effects of zooming options on a plot of 3 sin x . Plot of 3 sin x Zoom In: In Un-zoom: Un-zoom Note: Press to move to the bottom of the Zoom list. Zoom Out: Out Now un-zoom. X-Zoom In: X-Zoom In Now un-zoom.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM Y-Zoom In: Y-Zoom In Now un-zoom. Y-Zoom Out: Y-Zoom Out Zoom Square: Square To box zoom The Box Zoom option lets you draw a box around the area you want to zoom in on by selecting the endpoints of one diagonal of the zoom rectangle. 1. If necessary, press labels. 2. Press to turn on the menu-key and select Box... 3. Position the cursor on one corner of the rectangle. Press . 4. Use the cursor keys ( , etc.) to drag to the opposite corner. 5.
hp40g+.book Page 13 Friday, December 9, 2005 To set zoom factors 1:03 AM 1. In the Plot view, press 2. Press . . 3. Select Set Factors... and press . 4. Enter the zoom factors. There is one zoom factor for the horizontal scale (XZOOM) and one for the vertical scale (YZOOM). Zooming out multiplies the scale by the factor, so that a greater scale distance appears on the screen. Zooming in divides the scale by the factor, so that a shorter scale distance appears on the screen.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM Option Meaning (Continued) Auto Scale Rescales the vertical axis so that the display shows a representative piece of the plot, for the supplied x axis settings. (For Sequence and Statistics aplets, autoscaling rescales both axes.) The autoscale process uses the first selected function only to determine the best scale to use. Split the screen Decimal Rescales both axes so each pixel = 0.1 unit. Resets default values for XRNG (–6.5 to 6.
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM – moves the leftmost cursor to the screen’s left edge and moves the rightmost cursor to the screen’s right edge. – The plot. menu key copies the right plot to the left 3. To un-split the screen, press over the whole screen. . The left side takes The Plot-Table view gives you two simultaneous views of the plot. 1. Press . Select Plot-Table and press . The screen displays the plot on the left side and a table of numbers on the right side. 2.
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM About the numeric view After entering and selecting (check marking) the expression or expressions that you want to explore in the Symbolic view, press to view a table of data values for the independent variable (X, T, θ, or N) and dependent variables. Setting up the table (Numeric view setup) Press NUM to define any of the table settings. Use the Numeric Setup input form to configure the table. 1. Highlight the field to edit.
hp40g+.book Page 17 Friday, December 9, 2005 Reset numeric settings 1:03 AM Field Meaning (Continued) NUMTYPE Type of numeric table: Automatic or Build Your Own. To build your own table, you must type each independent value into the table yourself. NUMZOOM Allows you to zoom in or out on a selected value of the independent variable. To reset the default values for all table settings, press CLEAR.
hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM Zoom within a table Zooming redraws the table of numbers in greater or lesser detail. ZOOM options The following table lists the zoom options: Option Meaning In Decreases the intervals for the independent variable so a narrower range is shown. Uses the NUMZOOM factor in Numeric Setup. Out Increases the intervals for the independent variable so that a wider range is shown. Uses the NUMZOOM factor in Numeric Setup.
hp40g+.book Page 19 Friday, December 9, 2005 Automatic recalculation 1:03 AM You can enter any new value in the X column. When you press , the values for the dependent variables are recalculated, and the entire table is regenerated with the same interval between X values. Building your own table of numbers The default NUMTYPE is “Automatic”, which fills the table with data for regular intervals of the independent (X, T, θ, or N) variable.
hp40g+.book Page 20 Friday, December 9, 2005 1:03 AM “Build Your Own” menu keys Key Meaning Puts the highlighted independent value (X, T, θ, or N) into the edit line. Pressing replaces this variable with its current value. Inserts a zero value at the position of the highlight. Replace a zero by typing the number you want and pressing . Sorts the independent variable values into ascending or descending order. Press and select the ascending or descending option from the menu, and press .
hp40g+.book Page 21 Friday, December 9, 2005 1:03 AM Select Function 9 9 2. Reset the graph setup to the default settings. SETUP-PLOT CLEAR 3. Plot the two functions and hide the menu so that you can see all the circle. 4. Reset the numeric setup to the default settings. SETUP-NUM CLEAR 5. Display the functions in numeric form.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 3 Function aplet About the Function aplet The Function aplet enables you to explore up to 10 real-valued, rectangular functions y in terms of x. For example y = 2x + 3 . Once you have defined a function you can: • create graphs to find roots, intercepts, slope, signed area, and extrema • create tables to evaluate functions at particular values. This chapter demonstrates the basic tools of the Function aplet by stepping you through an example.
hp40g+.book Page 2 Friday, December 9, 2005 Define the expressions 1:03 AM 2. There are 10 function definition fields on the Function aplet’s Symbolic view screen. They are labeled F1(X) to F0(X). Highlight the function definition field you want to use, and enter an expression. (You can press to delete an existing line, or CLEAR to clear all lines.) 1 3 2 Set up the plot You can change the scales of the x and y axes, graph resolution, and the spacing of the axis ticks. 3. Display plot settings.
hp40g+.book Page 3 Friday, December 9, 2005 Change the scale 1:03 AM 6. You can change the scale to see more or less of your graphs. In this example, choose Auto Scale. (See “VIEWS menu options” on page 2-13 for a description of Auto Scale). Select Auto Scale Trace a graph 7. Trace the linear function. 6 times Note: By default, the tracer is active. 8. Jump from the linear function to the quadratic function.
hp40g+.book Page 4 Friday, December 9, 2005 Analyse graph with FCN functions 1:03 AM 9. Display the Plot view menu. From the Plot view menu, you can use the functions on the FCN menu to find roots, intersections, slopes, and areas for a function defined in the Function aplet (and any Function-based aplets). The FCN functions act on the currently selected graph. See “FCN functions” on page 3-10 for further information. To find a root of the quadratic function 10.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM 12.Choose the linear function whose intersection with the quadratic function you wish to find. The coordinates of the intersection point are displayed at the bottom of the screen. Note: If there is more than one intersection (as in our example), the coordinates of the intersection point closest to the current cursor position are displayed. To find the slope of the quadratic function 13.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM 16.Press to accept using F2(x) = (x + 3) 2 – 2 as the other boundary for the integral. 17. Choose the end value for x. 1 The cursor jumps to x = –1 on the linear function. 18.Display the numerical value of the integral. Note: See “Shading area” on page 3-11 for another method of calculating area. To find the extremum of the quadratic 19. Move the cursor to the quadratic equation and find the extremum of the quadratic.
hp40g+.book Page 7 Friday, December 9, 2005 HINT 1:03 AM The Root and Extremum functions return one value only even if the function has more than one root or extremum. The function finds the value closest to the position of the cursor. You need to re-locate the cursor to find other roots or extrema that may exist. Display the numeric view 20.Display the numeric view. Set up the table 21.Display the numeric setup.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM To navigate around a table 24.Move to X = –5.9. To go directly to a value 25. Move directly to X = 10. To access the zoom options 26. Zoom in on X = 10 by a factor of 4. Note: NUMZOOM has a setting of 4. 6 times 10 In To change font size 27. Display table numbers in large font. To display the symbolic definition of a column 28.Display the symbolic definition for the F1 column.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM Function aplet interactive analysis From the Plot view ( ), you can use the functions on the FCN menu to find roots, intersections, slopes, and areas for a function defined in the Function aplet (and any Function-based aplets). See “FCN functions” on page 310. The FCN operations act on the currently selected graph.
hp40g+.book Page 10 FCN functions 3-10 Friday, December 9, 2005 1:03 AM The FCN functions are: Function Description Root Select Root to find the root of the current function nearest the cursor. If no root is found, but only an extremum, then the result is labeled EXTR: instead of ROOT:. (The root-finder is also used in the Solve aplet. See also “Interpreting results” on page 7-6.) The cursor is moved to the root value on the x-axis and the resulting x-value is saved in a variable named ROOT.
hp40g+.book Page 11 Friday, December 9, 2005 Shading area 1:03 AM Function Description (Continued) Intersection Select Intersection to find the intersection of two graphs nearest the cursor. (You need to have at least two selected expressions in Symbolic view.) Displays the coordinate values and moves the cursor to the intersection. (Uses Solve function.) The resulting xvalue is saved in a variable named ISECT. You can shade a selected area between functions.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM Plotting a piecewise-defined function Suppose you wanted to plot the following piecewisedefined function. ⎧ x + 2 ;x ≤ – 1 ⎪ f( x ) = ⎨ x2 ;– 1 < x ≤ 1 ⎪ 4 – x ;x ≥ 1 ⎩ 1. Open the Function aplet. Select Function 2. Highlight the line you want to use, and enter the expression. (You can press line, or CLEAR to delete an existing to clear all lines.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 4 Parametric aplet About the Parametric aplet The Parametric aplet allows you to explore parametric equations. These are equations in which both x and y are defined as functions of t. They take the forms x = f ( t ) and y = g ( t ) . Getting started with the Parametric aplet The following example uses the parametric equations x ( t ) = 3 sin t y ( t ) = 3 cos t Note: This example will produce a circle.
hp40g+.book Page 2 Friday, December 9, 2005 Set angle measure 1:03 AM 3. Set the angle measure to degrees. MODES Select Degrees Set up the plot 4. Display the graphing options. PLOT The Plot Setup input form has two fields not included in the Function aplet, TRNG and TSTEP. TRNG specifies the range of t values. TSTEP specifies the step value between t values. 5. Set the TRNG and TSTEP so that t steps from 0° to 360° in 5° steps. 360 5 Plot the expression 6. Plot the expression. 7.
hp40g+.book Page 3 Friday, December 9, 2005 Overlay plot 1:03 AM 8. Plot a triangle graph over the existing circle graph. PLOT 120 Select Overlay Plot A triangle is displayed rather than a circle (without changing the equation) because the changed value of TSTEP ensures that points being plotted are 120° apart instead of nearly continuous. You are able to explore the graph using trace, zoom, split screen, and scaling functionality available in the Function aplet.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 5 Polar aplet Getting started with the Polar aplet Open the Polar aplet 1. Open the Polar aplet. Select Polar Like the Function aplet, the Polar aplet opens in the Symbolic view. Define the expression 2 2. Define the polar equation r = 2π cos ( θ ⁄ 2 ) cos ( θ ) . π 2 2 Specify plot settings 3. Specify the plot settings. In this example, we will use the default settings, except for the θRNG fields.
hp40g+.book Page 2 Explore the graph Friday, December 9, 2005 1:03 AM 5. Display the Plot view menu key labels. The Plot view options available are the same as those found in the Function aplet. See “Exploring the graph” on page 2-7 for further information. Display the numbers 6. Display the table of values for θ and R1. The Numeric view options available are the same as those found in the Function aplet. See “Exploring the table of numbers” on page 2-17 for further information.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 6 Sequence aplet About the Sequence aplet The Sequence aplet allows you to explore sequences. You can define a sequence named, for example, U1: • in terms of n • in terms of U1(n–1) • in terms of U1(n–2) • in terms of another sequence, for example, U2(n) • in any combination of the above. The Sequence aplet allows you to create two types of graphs: – A Stairsteps graph plots n on the horizontal axis and Un on the vertical axis.
hp40g+.book Page 2 Friday, December 9, 2005 Open the Sequence aplet 1:03 AM 1. Open the Sequence aplet. Select Sequence The Sequence aplet starts in the Symbolic view. Define the expression 2. Define the Fibonacci sequence, in which each term (after the first two) is the sum of the preceding two terms: U 1 = 1 , U 2 = 1 , U n = U n – 1 + U n – 2 for n > 3 . In the Symbolic view of the Sequence aplet, highlight the U1(1) field and begin defining your sequence.
hp40g+.book Page 3 Friday, December 9, 2005 Plot the sequence 1:03 AM 4. Plot the Fibonacci sequence. 5. In Plot Setup, set the SEQPLOT option to Cobweb. SETUP-PLOT Select Cobweb Display the table Sequence aplet 6. Display the table of values for this example.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 7 Solve aplet About the Solve aplet The Solve aplet solves an equation or an expression for its unknown variable. You define an equation or expression in the symbolic view, then supply values for all the variables except one in the numeric view. Solve works only with real numbers. Note the differences between an equation and an expression: • An equation contains an equals sign.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Getting started with the Solve aplet Suppose you want to find the acceleration needed to increase the speed of a car from 16.67 m/sec (60 kph) to 27.78 m/sec (100 kph) in a distance of 100 m. The equation to solve is: 2 2 V = U + 2AD Open the Solve aplet 1. Open the Solve aplet. Select Solve The Solve aplet starts in the symbolic view. Define the equation 2. Define the equation. V U 2 A D Note: You can use the entry of equations.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM 4. Enter the values for the known variables. 27 78 16 67 100 HINT Solve the unknown variable If the Decimal Mark setting in the Modes input form ( MODES) is set to Comma, use instead of . 5. Solve for the unknown variable (A). Therefore, the acceleration needed to increase the speed of a car from 16.67 m/sec (60 kph) to 27.78 m/sec (100 kph) in a distance of 100 m is approximately 2.47 m/s2.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM 6. Plot the equation for variable A. Select Auto Scale 7. Trace along the graph representing the left side of the equation until the cursor nears the intersection. 20 times Note the value of A displayed near the bottom left corner of the screen. The Plot view provides a convenient way to find an approximation to a solution instead of using the Numeric view Solve option. See “Plotting to find guesses” on page 7-7 for more information.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Key Meaning (Continued) Clears highlighted variable to zero or deletes current character in edit line, if edit line is active. CLEAR Resets all variable values to zero or clears the edit line, if cursor is in edit line. Use an initial guess You can usually obtain a faster and more accurate solution if you supply an estimated value for the unknown variable before pressing . Solve starts looking for a solution at the initial guess.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Interpreting results After Solve has returned a solution, press in the Numeric view for more information. You will see one of the following three messages. Press to clear the message. Message Condition Zero The Solve aplet found a point where both sides of the equation were equal, or where the expression was zero (a root), within the calculator's 12-digit accuracy.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM If Solve could not find a solution, you will see one of the following two messages. HINT The Root-Finder at work Message Condition Bad Guess(es) The initial guess lies outside the domain of the equation. Therefore, the solution was not a real number or it caused an error. Constant? The value of the equation is the same at every point sampled. It is important to check the information relating to the solve process.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM where X is distance, V0 is initial velocity, T is time, and A is acceleration. This is actually two equations, Y = X and Y = V0 T + (AT 2) / 2. Since this equation is quadratic for T, there can be both a positive and a negative solution. However, we are concerned only with positive solutions, since only positive distance makes sense. 1. Select the Solve aplet and enter the equation. Select Solve X V T A T 2 2.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM 5. Move the cursor near the positive (right-side) intersection. This cursor value will be an initial guess for T. Press until the cursor is at the intersection. The two points of intersection show that there are two solutions for this equation. However, only positive values for X make sense, so we want to find the solution for the intersection on the right side of the y-axis. 6. Return to the Numeric view.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM Using variables in equations You can use any of the real variable names, A to Z and θ. Do not use variable names defined for other types, such as M1 (a matrix variable). Home variables All home variables (other than those for aplet settings, like Xmin and Ytick) are global, which means they are shared throughout the different aplets of the calculator.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 8 Linear Solver aplet About the Linear Solver aplet The Linear Solver aplet allows you to solve a set of linear equations. The set can contain two or three linear equations. In a two-equation set, each equation must be in the form ax + by = k . In a three-equation set, each equation must be in the form ax + by + cz = k .
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM example in the previous step). To solve a threeequation set, press . Now the input form displays three equations. If the three-equation input form is displayed and you want to solve a two-equation set, press . In this example, we are going to solve the following equation set: 6x + 9y + 6z = 5 7x + 10y + 8z = 10 6x + 4y = 6 Hence we need the three-equation input form. Define and solve the equations 3.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM As you enter each of the remaining known values, the solution changes. The example at the right shows the final solution once all the co-efficients and constants are entered for the set of equations we set out to solve.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 9 Triangle Solve aplet About the Triangle Solver aplet The Triangle Solver aplet allows you to determine the length of a side of a triangle, or the angle at the vertex of a triangle, from information you supply about the other lengths and/or other angles. You need to specify at least three of the six possible values—the lengths of the three sides and the size of the three angles—before the solver can calculate the other values.
hp40g+.book Page 2 Friday, December 9, 2005 Open the Triangle Solver aplet 1:03 AM 1. Open the Triangle Solver aplet. Select Triangle Solver The Triangle Solver aplet opens. Note: if you have already used the Triangle Solver, the entries and results from the previous use will still be displayed. To start the Triangle Solver afresh, clear the previous entries and results by pressing CLEAR. Choose the triangle type 2.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM lengths as B and C, we would need to specify the angle as α. The illustration on the display will help you determine where to enter the known values. Note: if you need to change the angle neasure mode, press MODES, change the mode, and then press to return to the aplet. 4. Press . The solver calculates the values of the unknown variables and displays. As the illustration at the right shows, the length of the unknown side in our example is 3.2296.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM Not enough data If you are using the general input form, you need to specify at least three values for the Triangle Solver to be able to calculate the remaining attributes of the triangle. If you specify less than three, Not enough data appears on the screen. If you are using the simplified input form (for a rightangled triangle), you must specify at least two values. In addition, you cannot specify only angles and no lengths.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 10 Statistics aplet About the Statistics aplet The Statistics aplet can store up to ten data sets at one time. It can perform one-variable or two-variable statistical analysis of one or more sets of data. The Statistics aplet starts with the Numeric view which is used to enter data. The Symbolic view is used to specify which columns contain data and which column contains frequencies.
hp40g+.book Page 2 Friday, December 9, 2005 Open the Statistics aplet 1:03 AM 1. Open the Statistics aplet and clear existing data by pressing . Select Statistics The Statistics aplet starts in the Numerical view. 1VAR/2VAR menu key label At any time the Statistics aplet is configured for only one of two types of statistical explorations: onevariable ( ) or two-variable ( ). The 5th menu key label in the Numeric view toggles between these two options and shows the current option. 2. Select .
hp40g+.book Page 3 Friday, December 9, 2005 Choose fit and data columns 1:03 AM 4. Select a fit in the Symbolic setup view. SETUP-SYMB Select Linear You can create up to five explorations of two-variable data, named S1 to S5. In this example, we will create just one: S1. 5. Specify the columns that hold the data you want to analyze. You could have entered your data into columns other than C1 and C2. Explore statistics 6. Find the mean advertising time (MEANX) and the mean sales (MEANY).
hp40g+.book Page 4 Friday, December 9, 2005 Setup plot 1:03 AM 8. Change the plotting range to ensure all the data points are plotted (and select a different point mark, if you wish). SETUP-PLOT 7 100 4000 Plot the graph 9. Plot the graph. Draw the regression curve 10.Draw the regression curve (a curve to fit the data points). This draws the regression line for the best linear fit. Display the equation for best linear fit 11.Return to the Symbolic view. 12.
hp40g+.book Page 5 Friday, December 9, 2005 Predict values 1:03 AM 13.To find the predicted sales figure if advertising were to go up to 6 minutes: S (to highlight Stat-Two) (to highlight PREDY) 6 14.Return to the Plot view. 15.Jump to the indicated point on the regression line. 6 Observe the predicted y-value in the left bottom corner of the screen.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Entering and editing statistical data The Numeric view ( ) is used to enter data into the Statistics aplet. Each column represents a variable named C0 to C9. After entering the data, you must define the data set in the Symbolic view ( ). HINT A data column must have at least four data points to provide valid two-variable statistics, or two data points for one-variable statistics.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM Key Meaning (Continued) Deletes the currently highlighted value. CLEAR cursor key Example Clears the current column or all columns of data. Pregss CLEAR to display a menu list, then select the current column or all columns option, and press . Moves to the first or last row, or first or last column. You are measuring the height of students in a classroom to find the mean height.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM 3. Find the mean of the sample. Ensure the / menu key label reads . Press to see the statistics calculated from the sample data in C1. Note that the title of the column of statistics is H1. There are 5 data set definitions available for one-variable statistics: H1–H5. If data is entered in C1, H1 is automatically set to use C1 for data, and the frequency of each data point is set to 1.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM Key Meaning (Continued) Displays the current variable expression in standard mathematical form. Press when done. Evaluates the variables in the highlighted column (C1, etc.) expression. Displays the menu for entering variable names or contents of variables. Displays the menu for entering math operations. Deletes the highlighted variable or the current character in the edit line.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM 5. Move the highlight bar into the right column of the H1 definition and replace the frequency value of 1 with the name C2. 2 6. Return to the numeric view. 7. Enter the frequency data shown in the above table. 5 3 8 2 1 8. Display the computed statistics. The mean height is approximately 167.63cm. 9. Setup a histogram plot for the data. SETUP-PLOT Enter set up information appropriate to your data. 10.Plot a histogram of the data.
hp40g+.book Page 11 Friday, December 9, 2005 1:03 AM Edit a data set In the Numeric view of the Statistics aplet, highlight the data value to change. Type a new value and press , or press to copy the value to the edit line for modification. Press after modifying the value on the edit line. Delete data • To delete a single data item, highlight it and press . The values below the deleted cell will scroll up one row. • To delete a column of data, highlight an entry in that column and press name.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM Defining a regression model The Symbolic view includes an expression (Fit1 through Fit5) that defines the regression model, or “fit”, to use for the regression analysis of each two-variable data set. There are three ways to select a regression model: • Accept the default option to fit the data to a straight line. • Select one of the available fit options in Symbolic Setup view. • Enter your own mathematical expression in Symbolic view.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM Fit model Meaning (Continued) Quadratic Fits to a quadratic curve, y = ax2+bx+c. Needs at least three points. Cubic Fits to a cubic curve, y = ax3+bx2+cx+d. Needs at least four points. Logistic Fits to a logistic curve, L -, y = ------------------------( – bx ) 1 + ae where L is the saturation value for growth. You can store a positive real value in L, or—if L=0—let L be computed automatically.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM Computed statistics One-variable Statistic Definition NΣ Number of data points. TOTΣ Sum of data values (with their frequencies). MEANΣ Mean value of data set. PVARΣ Population variance of data set. SVARΣ Sample variance of data set. PSDEV Population standard deviation of data set. SSDEV Sample standard deviation of data set. MINΣ Minimum data value in data set. Q1 First quartile: median of values to left of median.
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM Two-variable Plotting Statistic Definition MEANX Mean of x- (independent) values. ΣX Sum of x-values. ΣX2 Sum of x2-values. MEANY Mean of y- (dependent) values. ΣY Sum of y-values. ΣY2 Sum of y2-values. ΣXY Sum of each xy. SCOV Sample covariance of independent and dependent data columns.
hp40g+.book Page 16 To plot statistical data Friday, December 9, 2005 1:03 AM 1. In Symbolic view ( sets you want to plot. ), select ( ) the data 2. For one-variable data ( ), select the plot type in SETUP-PLOT). Highlight STATPLOT, Plot Setup ( press , select either Histogram or BoxWhisker, and press . 3. For any plot, but especially for a histogram, adjust the plotting scale and range in the Plot Setup view.
hp40g+.book Page 17 Friday, December 9, 2005 Scatter Plot 1:03 AM Two-variable statistics. The numbers below the plot indicate that the cursor is at the first data point for S2, at (1, 6). Press to move to the next data point and display information about it. To connect the data points as they are plotted, checkmark CONNECT in the second page of the Plot Setup. This is not a regression curve. Fitting a curve to 2VAR data In the Plot view, press .
hp40g+.book Page 18 Friday, December 9, 2005 Relative Error 1:03 AM The relative error is a measure of the error between predicted values and actual values based on the specified Fit. A smaller number means a better fit. The relative error is stored in a variable named RELERR. The relative error provides a measure of fit accuracy for all fits, and it does depend on the Fit model you have chosen.
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM For instance, the data set (1,1), (3,9), (4,16), (2,4) would be plotted and traced in the order (1,1), (2,4), (3,9), (4,16). Trouble-shooting a plot If you have problems plotting, check that you have the following: • The correct view). • The correct fit (regression model), if the data set is two-variable. • Only the data sets to compute or plot are checkmarked (Symbolic view). • The correct plotting range.
hp40g+.book Page 20 Friday, December 9, 2005 1:03 AM Key Meaning (Continued) Displays ZOOM menu. Turns trace mode on/off. The white box appears next to the option when Trace mode is active. Turns fit mode on or off. Turning on draws a curve to fit the data points according to the current regression model. (2var statistics only) Enables you to specify a value on the line of best fit to jump to or a data point number to jump to. Displays the equation of the regression curve.
hp40g+.book Page 21 Friday, December 9, 2005 • 1:03 AM Enter PREDY(x-value) to find the predicted value of the dependent variable given a hypothetical independent variable. You can type PREDX and PREDY into the edit line, or you can copy these function names from the MATH menu under the Stat-Two category. HINT Statistics aplet In cases where more than one fit curve is displayed, the PREDY function uses the most recently calculated curve.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 11 Inference aplet About the Inference aplet The Inference capabilities include calculation of confidence intervals and hypothesis tests based on the Normal Z-distribution or Student’s t-distribution.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Inference aplet’s SYMB view keys The table below summarizes the options available in Symbolic view.
hp40g+.book Page 3 Friday, December 9, 2005 Select the inferential method 1:03 AM 2. Select the Hypothesis Test inferential method. Select HYPOTH TEST 3. Define the type of test. Z–Test: 1 μ 4. Select an alternative hypothesis. μ< μ0 Enter data 5. Enter the sample statistics and population parameters. setup-NUM The table below lists the fields in this view for our current Z-Test: 1 μ example.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM By default, each field already contains a value. These values constitute the example database and are explained in the feature of this aplet. Display on-line help 6. To display the on-line help, press 7. To close the on-line help, press . Display test results in numeric format 8. Display the test results in numeric format.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM A calculator produces the following 6 random numbers: 0.529, 0.295, 0.952, 0.259, 0.925, and 0.592 Open the Statistics aplet 1. Open the Statistics aplet and reset the current settings. Select Statistics The Statistics aplet opens in the Numeric view. Enter data 2. In the C1 column, enter the random numbers produced by the calculator.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Open Inference aplet 6. Open the Inference aplet and clear current settings. Select inference method and type 7. Select an inference method. Select Inference Select CONF INTERVAL 8. Select a distribution statistic type. Select T-Int: 1 μ Set up the interval calculation 9. Set up the interval calculation. Note: The default values are derived from sample data from the on-line help example.
hp40g+.book Page 7 Friday, December 9, 2005 Import the data 1:03 AM 10.Import the data from the Statistics aplet. Note: The data from C1 is displayed by default. Note: Press to see the statistics before importing them into the Numeric Setup view. Also, if there is more than one aplet based on the Statistics aplet, you are prompted to choose one. 11.Specify a 90% confidence interval in the C: field. to move to the C: field 0.9 Display Numeric view 12.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM Hypothesis tests You use hypothesis tests to test the validity of hypotheses that relate to the statistical parameters of one or two populations. The tests are based on statistics of samples of the populations. The HP 40gs hypothesis tests use the Normal Z-distribution or Student’s t-distribution to calculate probabilities.
hp40g+.book Page 9 Friday, December 9, 2005 Results 1:03 AM The results are: Result Description Test Z Z-test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary values of Z associated with the α level that you supplied. Critical x Boundary values of x required by the α value that you supplied.
hp40g+.book Page 10 Results Friday, December 9, 2005 1:03 AM Field name Definition σ2 Population 2 standard deviation. α Significance level. The results are: Result Description Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary value of Z associated with the α level that you supplied.
hp40g+.book Page 11 Inputs Results Friday, December 9, 2005 1:03 AM The inputs are: Field name Definition x Number of successes in the sample. n Sample size. π0 Population proportion of successes. α Significance level. The results are: Result Description Test P Proportion of successes in the sample. Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary value of Z associated with the level you supplied.
hp40g+.book Page 12 Inputs Results Friday, December 9, 2005 1:03 AM The inputs are: Field name Definition X1 Sample 1 mean. X2 Sample 2 mean. n1 Sample 1 size. n2 Sample 2 size. α Significance level. The results are: Result Description Test π1–π2 Difference between the proportions of successes in the two samples. Test Z Z-Test statistic. Prob Probability associated with the Z-Test statistic. Critical Z Boundary values of Z associated with the α level that you supplied.
hp40g+.book Page 13 Inputs Results Inference aplet Friday, December 9, 2005 1:03 AM The inputs are: Field name Definition x Sample mean. Sx Sample standard deviation. n Sample size. μ0 Hypothetical population mean. α Significance level. The results are: Result Description Test T T-Test statistic. Prob Probability associated with the T-Test statistic. Critical T Boundary value of T associated with the α level that you supplied.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM Two-Sample T-Test Menu name T-Test: μ1 – μ2 The Two-sample T-Test is used when the population standard deviation is not known. On the basis of statistics from two samples, each sample from a different population, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis. The null hypothesis is that the two populations means are equal H 0: μ1 = μ2.
hp40g+.book Page 15 Results Friday, December 9, 2005 1:03 AM The results are: Result Description Test T T-Test statistic. Prob Probability associated with the T-Test statistic. Critical T Boundary values of T associated with the α level that you supplied. Confidence intervals The confidence interval calculations that the HP 40gs can perform are based on the Normal Z-distribution or Student’s t-distribution.
hp40g+.book Page 16 Results Friday, December 9, 2005 1:03 AM The results are: Result Description Critical Z Critical value for Z. μ min Lower bound for μ. μ max Upper bound for μ. Two-Sample Z-Interval Menu name Z-INT: μ1– μ2 This option uses the Normal Z-distribution to calculate a confidence interval for the difference between the means of two populations, μ1– μ2, when the population standard deviations, σ1 and σ2, are known.
hp40g+.book Page 17 Friday, December 9, 2005 1:03 AM One-Proportion Z-Interval Menu name Z-INT: 1 π This option uses the Normal Z-distribution to calculate a confidence interval for the proportion of successes in a population for the case in which a sample of size, n, has a number of successes, x. Inputs Results The inputs are: Field name Definition x Sample success count. n Sample size. C Confidence level. The results are: Result Description Critical Z Critical value for Z.
hp40g+.book Page 18 Results Friday, December 9, 2005 1:03 AM Field name Definition (Continued) n1 Sample 1 size. n2 Sample 2 size. C Confidence level. The results are: Result Description Critical Z Critical value for Z. Δ π Min Lower bound for the difference between the proportions of successes. Δ π Max Upper bound for the difference between the proportions of successes.
hp40g+.book Page 19 Results Friday, December 9, 2005 1:03 AM The results are: Result Description Critical T Critical value for T. μ Min Lower bound for μ. μ Max Upper bound for μ. Two-Sample T-Interval Menu name T-INT: μ1 – μ2 This option uses the Student’s t-distribution to calculate a confidence interval for the difference between the means of two populations, μ1 – μ2, when the population standard deviations, s1and s2, are unknown.
hp40g+.book Results 11-20 Page 20 Friday, December 9, 2005 1:03 AM The results are: Result Description Critical T Critical value for T. Δ μ Min Lower bound for μ1 – μ2. Δ μ Max Upper bound for μ1 – μ2.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 12 Using the Finance Solver The Finance Solver, or Finance aplet, is available by using the APLET key in your calculator. Use the up and down arrow keys to select the Finance aplet. Your screen should look as follows: Press the key or the soft menu key to activate the aplet. The resulting screen shows the different elements involved in the solution of financial problems with your HP 40gs calculator.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM combined amount earns interest at a certain rate. Financial calculations involving compound interest include savings accounts, mortgages, pension funds, leases, and annuities. Time Value of Money (TVM) calculations, as the name implies, make use of the notion that a dollar today will be worth more than a dollar sometime in the future.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM flow diagram shows lease payments at the beginning of each period. PV Capitalized value of lease } 1 PMT 2 PMT 4 3 PMT PMT 5 PMT FV The following cash flow diagram shows deposits into an account at the end of each period. FV 1 2 PMT 4 3 PMT PMT 5 PMT PMT PV As these cash-flow diagrams imply, there are five TVM variables: N The total number of compounding periods or payments.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM PMT The periodic payment amount. The payments are the same amount each period and the TVM calculation assumes that no payments are skipped. Payments can occur at the beginning or the end of each compounding period -- an option you control by setting the Payment mode to Beg or End. FV The future value of the transaction: the amount of the final cash flow or the compounded value of the series of previous cash flows.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Example 1 - Loan calculations Suppose you finance the purchase of a car with a 5-year loan at 5.5% annual interest, compounded monthly. The purchase price of the car is $19,500, and the down payment is $3,000. What are the required monthly payments? What is the largest loan you can afford if your maximum monthly payment is $300? Assume that the payments start at the end of the first period. Solution.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Example 2 - Mortgage with balloon payment Suppose you have taken out a 30-year, $150,000 house mortgage at 6.5% annual interest. You expect to sell the house in 10 years, repaying the loan in a balloon payment. Find the size of the balloon payment, the value of the mortgage after 10 years of payment. Solution. The following cash flow diagram illustrates the case of the mortgage with balloon payment: PV = $150,000 1 l%YR = 6.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM Calculating Amortizations Amortization calculations, which also use the TVM variables, determine the amounts applied towards principal and interest in a payment or series of payments. To calculate amortizations: 1. Start the Finance Solver as indicated at the beginning of this section. 2. Set the following TVM variables: a Number of payments per year (P/YR) b Payment at beginning or end of periods 3.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM 3. Press the soft menu key to amortize the new batch of payments. Repeat steps 1 through 3 as often as needed. Example 4 - Amortization for home mortgage For the results of Example 3, show the amortization of the next 10 years of the mortgage loan. First, press the soft menu key. Then, keeping 120 in the PAYMENTS field, press the soft menu key to produce the results shown below. To amortize a series of future payments starting at payment p: 1.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 13 Using mathematical functions Math functions The HP 40gs contains many math functions. The functions are grouped in categories. For example, the Matrix category contains functions for manipulating matrices. The Probability category (shown as Prob. on the MATH menu) contains functions for working with probability.
hp40g+.book Page 2 Friday, December 9, 2005 To select a function 1:03 AM 1. Press to display the MATH menu. The categories appear in alphabetical order. 2. Press or to scroll through the categories. To jump directly to a category, press the first letter of the category’s name. Note: You do not need to press first. 3. The list of functions (on the right) applies to the currently highlighted category (on the left). Use and to switch between the category list and the function list. 4.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Functions common to keyboard and menus These functions are common to the keyboard and MATH menu. For a description, see “p” on page 13-8. π ARG For a description, see “ARG” on page 13-7. For a description, see “ ∂ ” on page 11-7. AND For a description, see “AND” on page 13-19. ! For a description, see “COMB(5,2) returns 10. That is, there are ten different ways that five things can be combined two at a time.!” on page 13-12.
hp40g+.book , Page 4 , , Friday, December 9, 2005 1:03 AM Add, Subtract, Multiply, Divide. Also accepts complex numbers, lists and matrices. value1+ value2, etc. ex Natural exponential. Also accepts complex numbers. e^value Example e^5 returns 148.413159103 Natural logarithm. Also accepts complex numbers. LN(value) Example LN(1) returns 0 10x Exponential (antilogarithm). Also accepts complex numbers. 10^value Example 10^3 returns 1000 Common logarithm. Also accepts complex numbers.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Example ASIN(1) returns 90 (Degrees mode). ACOS Arc cosine: cos–1x. Output range is from 0° to 180°, 0 to π, or 0 to 200 grads. Inputs and outputs depend on the current angle format. Also accepts complex numbers. Output will be complex for values outside the normal COS domain of – 1 ≤ x ≤ 1 . ACOS(value) Example ACOS(1) returns 0 (Degrees mode). ATAN Arc tangent: tan–1x. Output range is from –90° to 90°, 2π/2 to π/2, or –100 to 100 grads.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Example 2^8 returns 256 ABS Absolute value. For a complex number, this is 2 2 x +y . ABS(value) ABS((x,y)) Example ABS(–1) returns 1 ABS((1,2)) returns 2.2360679775 n Takes the nth root of x. root NTHROOT value Example 3 NTHROOT 8 returns 2 Calculus functions The symbols for differentiation and integration are available directly form the keyboard— and S respectively—as well as from the MATH menu.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM Example ∫ (0,s1,2*X+3,X) finds the indefinite result 3*s1+2*(s1^2/2) See “To find the indefinite integral using formal variables” on page 13-23 for more information on finding indefinite integrals. TAYLOR Calculates the nth order Taylor polynomial of expression at the point where the given variable = 0.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM Example IM((3,4)) returns 4 RE Real part x, of a complex number, (x, y). RE((x, y)) Example RE((3,4)) returns 3 Constants The constants available from the MATH FUNCTIONS menu are mathematical constants. These are described in this section. The HP 40gs has two other menus of constants: program constants and physical constants. These are described in “Program constants and physical constants” on page 13-24. e Natural logarithm base.
hp40g+.book Page 9 Friday, December 9, 2005 →C 1:03 AM Convert from Fahrenheit to Celcius. Example →C(212) returns 100 →F Convert from Celcius to Fahrenheit. Example →F(0) returns 32 →CM Convert from inches to centimeters. →IN Convert from centimeters to inches. →L Convert from US gallons to liters. →LGAL Convert from liters to US gallons. →KG Convert from pounds to kilograms. →LBS Convert from kilograms to pounds. →KM Convert from miles to kilometers.
hp40g+.book Page 10 Friday, December 9, 2005 COSH 1:03 AM Hyperbolic cosine COSH(value) SINH Hyperbolic sine. SINH(value) TANH Hyperbolic tangent. TANH(value) ALOG Antilogarithm (exponential). This is more accurate than 10^x due to limitations of the power function. ALOG(value) EXP x Natural exponential. This is more accurate than e due to limitations of the power function. EXP(value) EXPM1 x Exponent minus 1 : e – 1 . This is more accurate than EXP when x is close to zero.
hp40g+.book Page 11 Friday, December 9, 2005 RECURSE 1:03 AM Provides a method of defining a sequence without using the Symbolic view of the Sequence aplet. If used with | (“where”), RECURSE will step through the evaluation. RECURSE(sequencename, termn, term1, term2) Example RECURSE(U,U(N-1)*N,1,2) U1(N) Stores a factorial-calculating function named U1. When you enter U1(5), for example, the function calculates 5! (120). Σ Summation.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM Example For x4+2x3–25x2–26x+120: POLYEVAL([1,2,-25,-26,120],8) returns 3432. POLYFORM Polynomial form. Creates a polynomial in variable1 from expression. POLYFORM(expression, variable1) Example POLYFORM((X+1)^2+1,X) returns X^2+2*X+2. POLYROOT Polynomial roots. Returns the roots for the nth-order polynomial with the specified n+1 coefficients.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM Factorial of a positive integer. For non-integers, ! = Γ(x + 1). This calculates the gamma function. value! PERM Number of permutations (with regard to order) of n things taken r at a time: n!/(r!(n-r)! PERM (n, r) Example PERM(5,2) returns 20. That is, there are 20 different permutations of five things taken two at a time. RANDOM Random number (between zero and 1). Produced by a pseudo-random number sequence.
hp40g+.book Page 14 UTPT Friday, December 9, 2005 1:03 AM Upper-Tail Student’s t-Probability given degrees of freedom, evaluated at value. Returns the probability that the Student's t- random variable is greater than value. UTPT(degrees, value) Real-number functions Some real-number functions can also take complex arguments. CEILING Smallest integer greater than or equal to value. CEILING(value) Examples CEILING(3.2) returns 4 CEILING(-3.2) returns -3 DEG→RAD Degrees to radians.
hp40g+.book Page 15 Friday, December 9, 2005 HMS→ 1:03 AM Hours-minutes-seconds to decimal. Converts a number or expression in H.MMSSs format (time or angle that can include fractions of a second) to x.x format (number of hours or degrees with a decimal fraction). HMS→(H.MMSSs) Example HMS→(8.30) returns 8.5 →HMS Decimal to hours-minutes-seconds. Converts a number or expression in x.x format (number of hours or degrees with a decimal fraction) to H.
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM Example 9 MOD 4 returns 1 % x percent of y; that is, x/100*y. %(x, y) Example %(20,50) returns 10 %CHANGE Percent change from x to y, that is, 100(y–x)/x. %CHANGE(x, y) Example %CHANGE(20,50) returns 150 %TOTAL Percent total : (100)y/x. What percentage of x, is y. %TOTAL(x, y) Example %TOTAL(20,50) returns 250 RAD→DEG Radians to degrees. Converts value from radians to degrees.
hp40g+.book Page 17 Friday, December 9, 2005 1:03 AM Examples SIGN (–2) returns –1 SIGN((3,4)) returns (.6,.8) TRUNCATE Truncates value to decimal places. Accepts complex numbers. TRUNCATE(value, places) Example TRUNCATE(2.3678,2) returns 2.36 XPON Exponent of value. XPON(value) Example XPON(123.4) returns 2 Two-variable statistics These are functions for use with two-variable statistics. See “Two-variable” on page 10-15.
hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM Examples ISOLATE(2*X+8,X) returns -4 ISOLATE(A+B*X/C,X) returns -(A*C/B) LINEAR? Tests whether expression is linear for the specified variable. Returns 0 (false) or 1 (true). LINEAR?(expression, variable) Example LINEAR?((X^2-1)/(X+1),X) returns 0 QUAD Solves quadratic expression=0 for variable and returns a new expression, where variable=newexpression.
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM Test functions The test functions are logical operators that always return either a 1 (true) or a 0 (false). < Less than. Returns 1 if true, 0 if false. value1 Greater than. Returns 1 if true, 0 if false.
hp40g+.book Page 20 XOR Friday, December 9, 2005 1:03 AM Exclusive OR. Returns 1 if either value1 or value2—but not both of them—is non-zero, otherwise returns 0. value1 XOR value2 Trigonometry functions The trigonometry functions can also take complex numbers as arguments. For SIN, COS, TAN, ASIN, ACOS, and ATAN, see the Keyboard category. ACOT Arc cotangent. ACOT(value) ACSC Arc cosecant. ACSC(value) ASEC Arc secant. ASEC(value) COT Cotangent: cosx/sinx.
hp40g+.book Page 21 Friday, December 9, 2005 1:03 AM names. The HP 40gs has six formal names available for use in symbolic calculations. These are S1 to S5. When you perform a calculation that contains a formal name, the HP 40gs does not carry out any substitutions. You can mix formal names and real variables. Evaluating (A+B+S1)2 will evaluate A+B, but not S1.
hp40g+.book Page 22 Friday, December 9, 2005 1:03 AM differentiation function substitutes the value that X holds, and returns a numeric result. For example, consider the function: 2 dx ( sin ( x ) + 2 cos ( x ) ) 1. Enter the differentiation function onto the command line, substituting S1 in place of X. S1 S1 2 S1 2. Evaluate the function. 3. Show the result.
hp40g+.book Page 23 Friday, December 9, 2005 1:03 AM F1 3. Select F2(X) and evaluate it. 4. Press to display the result. Note: Use the arrow keys to view the entire function. | You could also just define 2 F1 ( x ) = dx ( sin ( x ) + 2 cos ( x ) ) . To find the indefinite integral using formal variables For example, to find the indefinite integral of ∫ 3x 2 – 5 dx use: ∫ (0 , S 1, 3 X 2 − 5, X ) 1. Enter the function. 0 S1 X 3 5 X 2. Show the result format. 3.
hp40g+.book Page 24 Friday, December 9, 2005 1:03 AM 4. Copy the result and evaluate. Thus, substituting X for S1, it can be seen that: 3 x- ⎞ ⎛ ---⎜ 3 ⎟ 2 ⎟ ∫ 3x – 5 dx = – 5x + 3 ⎜⎜ --------------∂ ( X )⎟ ⎝ ∂X ⎠ This result is derived from substituting X=S1 and X=0 into the original expression found in step 1. However, substituting X=0 will not always evaluate to zero and may result in an unwanted constant.
hp40g+.book Page 25 Friday, December 9, 2005 1:03 AM Program constants The program constants are numbers that have been assigned to various calculator settings to enable you to test for or specify such a setting in a program.
hp40g+.book Page 26 Friday, December 9, 2005 1:03 AM 3. Use the arrow keys to navigate through the options. 4. To see the symbol and value of a selected constant, press . (Click to close the information window that appears.) The following example shows the information available about the speed of light (one of the physics constants). 5. To use the selected constant in a calculation, press . The constant appears at the position of the cursor on the edit line.
hp40g+.book Page 27 Friday, December 9, 2005 1:03 AM 3. Select light s...from the Physics menu. 4. Press . The menu closes and the value of the selected constant is copied to the edit line. 5. Complete the equation as you would normally and press Using mathematical functions to get the result.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 14 Computer Algebra System (CAS) What is a CAS? A computer algebra system (hereafter CAS) enables you to perform symbolic calculations. With a CAS you manipulate mathematical equations and expressions in symbolic form, rather than manipulating approximations of the numerical quantities represented by those symbols. In other words, a CAS works in exact mode, giving you infinite precision.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM using vectors and matrices. (Vectors and matrices cannot be entered using the Equation Writer). To open the Equation Writer, press the softkey on the menu bar of the HOME screen. The illustration at the right shows an expression being written in the Equation Writer. The soft keys on the menu bar provide access to CAS functions and commands. To leave the Equation Writer, press to return to the HOME screen.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM 3. Press and to select just the 20 in the 20 term. 4. Press the menu key and choose FACTOR. Then press . Note that the FACTOR function is added to the selected term. 5. Press to factor the selected term. 6. Press to select the entire second term, and then press to simplify it. 7. Press to select the 45 in the first term. 8. As you did earlier, press the menu key and choose FACTOR. Then press and to factor the selected term. 9.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM 10.Press three times to select the entire expression and then press to simplify it to the form required. CAS variables When you use the symbolic calculation functions, you are working with symbolic variables (variables that do not contain a permanent value). In the HOME screen, a variable of this kind must have a name like S1…S5, s1…s5, n1…n5, but not X, which is assigned to a real value. (By default, X is assigned to 0).
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM CAS modes The modes that determine how CAS operates can be set on CAS MODES screen. To display CAS MODES screen, press: ·To navigate through the options in CAS MODES screen, press the arrow keys. To select or deselect a mode, navigate to the appropriate field and press until the correct setting is displayed (indicated by a check mark in the field).
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM calculated as closed-form algebraic expressions, whenever possible. [Default: unselected.] Num. Factor mode When the NUM FACTOR setting is selected, approximate 5 roots are used when factoring. For example, x + 5x + 1 is irreducible over the integers but has approximate roots over the reals. With NUM FACTOR set, the approximate roots are returned. [Default: unselected.] Complex vs.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM Using CAS functions in HOME You can use many computer algebra functions directly in the HOME screen, as long as you take certain precautions. CAS functions that take matrices as an argument work only from HOME. CAS functions can be accessed by pressing when MATH menu is displayed. You can also directly type a function name when you are in alpha mode.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM Symbolic matrices are stored as a list of lists and therefore must be stored in L0, L1…L9 (whereas numeric matrices are stored in M0, M1,…M9). CAS linear algebra instructions accept lists of lists as input. For example, if you type in HOME: XQ({{S2 + 1, 1}, { 2 , 1}}) L1 then you have: TRAN(L1) = {{S2 + 1, 2 }, {1, 1}} Some numeric linear algebra commands do not directly work on a list of lists, but will do so after a conversion by AXL.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM HELP and press appears. . The menu of help topics Each help topic includes the required syntax, along with real sample values. You can copy the syntax, with the sample values, to the HOME screen or to the Equation Writer, by pressing . TIP If you highlight a CAS command and then press 2, help about the highlighted command is displayed. You can display the online help in French rather than English.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM For example, suppose you have stored the expression x2 in G, and have defined the function F(x) as x2. Suppose now you want to calculate INTVX(X2). You could: • enter INTVX(X2) directly, or • enter INTVX(G), or • enter INTVX(F(X)). Note that you can apply the command directly to an expression or to a variable that holds an expression (the first two cases above).
hp40g+.book Page 11 Friday, December 9, 2005 1:03 AM Typing: DEF(U(N) = 2N+1) produces the result: U(N) = 2N+1 Typing: U(3) then returns: 7 Example Calculate the first six Fermat numbers F1...F6 and determine whether they are prime. So, you want to calculate: 2 k F ( k ) = 2 + 1 for k = 1...6 Typing the formula: 2 2 2 +1 gives a result of 17. You can then invoke the ISPRIME?() command, which is found in the MATH key’s Integer menu. The response is 1, which means TRUE.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM which gives 4294967297 You can factor F(5) with FACTOR, which you’ll find in the ALGB menu on the menu bar. Typing: FACTOR(F(5)) gives: 641·6700417 Typing: F(6) gives: 18446744073709551617 Using FACTOR to factor it, then yields: 274177·67280421310721 EXPAND Distributivity EXPAND expands and simplifies an expression. Example Typing: 2 2 XPAND ( ( X + 2 ⋅ X + 1 ) ⋅ ( X – 2 ⋅ X + 1 ) gives: 4 x +1 FACTOR Factorization FACTOR factors an expression.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM In real mode, the result is: 2 2 (x + 2 ⋅ x + 1) ⋅ (x – 2 ⋅ x + 1) In complex mode (using CFG), the result is: 1----⋅ ( 2x + ( 1 + i ) ⋅ 2 ) ⋅ ( 2x – ( 1 + i ) ⋅ 2 ) ⋅ ( 2x + ( 1 – i ) ⋅ 2 ) 16 ⋅ ( 2x – ( 1 – i ) ⋅ 2 ) PARTFRAC Partial fraction expansion PARTFRAC has a rational fraction as an argument. PARTFRAC returns the partial fraction decomposition of this rational fraction.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM Example 2 Typing: SUBST(QUOTE(CONJ(Z)),Z=1+i) gives: CONJ(1+i) STORE Store an object in a variable STORE stores an object in a variable. STORE is found in the ALGB menu or the Equation Writer menu bar. Example Type: STORE(X2-4,ABC) or type: X2-4 then select it and call STORE, then type ABC, then press ENTER to confirm the definition of the variable ABC.
hp40g+.book Page 15 SUBST Friday, December 9, 2005 1:03 AM Substitute a value for a variable SUBST has two parameters: an expression dependent on a parameter, and an equality (parameter=substitute value). SUBST substitutes the specified value for the variable in the expression. Typing: SUBST(A2+1,A=2) gives: 2 2 +1 TEXPAND Develop in terms of sine and cosine TEXPAND has a trigonometric expression or transcendental function as an argument.
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM DIFF menu DERIV Derivative and partial derivative DERIV has two arguments: an expression (or a function) and a variable. DERIV returns the derivative of the expression (or the function) with respect to the variable given as the second parameter (used for calculating partial derivatives).
hp40g+.book Page 17 Friday, December 9, 2005 1:03 AM DERVX(F) Or, if you have defined F(X) using DEF, that is, if you have typed: X + 1-⎞ ⎞ - + LN ⎛ X -----------DEF(F(X) = -------------2 ⎝ X – 1⎠ ⎠ X –1 then type: DERVX(F(X)) Simplify the result to get: 2 3⋅x –1 – -------------------------------4 2 x –2⋅x +1 DIVPC Division in increasing order by exponent DIVPC has three arguments: two polynomials A(X) and B(X) (where B(0) ≠0), and a whole number n.
hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM and with period T (T being equal to the contents of the variable PERIOD). If f(x) is a discrete series, then: +∞ f( x) = ∑ cN e 2 iNxπ --------------T N = –∞ Example Determine the Fourier coefficients of a periodic function f with period 2π and defined over interval [0, 2π] by f(x)=x2.
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM IBP returns the AND of u ( x ) ⋅ v ( x ) and of – v ( x ) ⋅ u' ( x ) that is, the terms that are calculated when performing a partial integration. It remains then to calculate the integral of the second term of the AND, then add it to the first term of the AND to obtain a primitive of u ( x ) ⋅ v' ( x ) .
hp40g+.book Page 20 Friday, December 9, 2005 1:03 AM Example Given: x x+1 f ( x ) = ------------+ LN ⎛⎝ ------------⎞⎠ 2 x–1 x –1 calculate a primitive of f.
hp40g+.
hp40g+.book Page 22 Friday, December 9, 2005 1:03 AM QUOTE(expression), to avoid rewriting the expression in normal form (i.e., not to have a rational simplification of the arguments) during the execution of the LIMIT command.
hp40g+.
hp40g+.book Page 24 Friday, December 9, 2005 1:03 AM PREVAL is used for calculating an integral defined from a primitive: it evaluates this primitive between the two limits of the integral. Typing: PREVAL(X2+X,2,3) gives: 6 RISCH Primitive and defined integral RISCH has two parameters: an expression and the name of a variable. RISCH returns a primitive of the first parameter with respect to the variable specified in the second parameter.
hp40g+.book Page 25 Friday, December 9, 2005 1:03 AM Typing: π 2 SERIES ⎛ COS ( 2 ⋅ X ) , X = ---, 4⎞ ⎝ 6 ⎠ gives: 5 h 1 2 8 3 3 8 4 〈--- – 3h + 2h + ---------- h – --- h + 0 ⎛ -----⎞ |h = X – π ---〉 ⎝ 4⎠ 4 3 3 6 • Example — Expansion in the vicinity of x=+∞ or x=–∞ Example 1 Give a 5th-order expansion of arctan(x) in the vicinity of 1 x=+∞, taking as infinitely small h = --- .
hp40g+.book Page 26 Friday, December 9, 2005 1:03 AM You must be in Rigorous (not Sloppy) mode to apply SERIES with unidirectional expansion. (See “CAS modes” on page 14-5 for instructions on setting and changing modes. Example 1 2 3 x + x in the vicinity of Give a 3rd-order expansion of x = 0+. Typing: SERIES ( X 2 3 + X , X = 0, 3.
hp40g+.book Page 27 Friday, December 9, 2005 1:03 AM 5 1- 4 –-----1- 3 1--- 2 ----⋅h + ⋅ h + ⋅ h + h + 0( h ) (h = x ) 8 2 16 TABVAR Variation table TABVAR has as a parameter an expression with a rational derivative. TABVAR returns the variation table for the expression in terms of the current variable.
hp40g+.
hp40g+.book Page 29 Friday, December 9, 2005 1:03 AM Typing: DISTRIB((X+1)·(X+2)·(X+3)) gives: x ⋅ (x + 2) ⋅ (x + 3) + 1 ⋅ (x + 2) ⋅ (x + 3) EPSX0 Disregard small values EPSX0 has as a parameter an expression in X, and returns the same expression with the values less than EPS replaced by zeroes. Typing: EPSX0(0.001 + X) gives, if EPS=0.01: 0+x or, if EPS=0.0001: .001 + x EXPLN Transform a trigonometric expression into complex exponentials EXPLN takes as an argument a trigonometric expression.
hp40g+.book Page 30 Friday, December 9, 2005 1:03 AM Typing: EXP2POW(EXP(N · LN(X))) gives: x FDISTRIB n Distributivity FDISTRIB has an expression as argument. FDISTRIB enables you to apply the distributivity of multiplication with respect to addition all at once.
hp40g+.book Page 31 Friday, December 9, 2005 1:03 AM 1--1 1 ⋅ exp ( – ( 2 ⋅ i ⋅ x ) ) + --- + --- ⋅ exp ( 2 ⋅ i ⋅ x ) 4 2 4 Example 3 Typing: LIN(SIN(X)) gives: i i – --- ⋅ exp i ⋅ x + --- ⋅ exp ( – ( i ⋅ x ) ) 2 2 LNCOLLECT Regroup the logarithms LNCOLLECT has as an argument an expression containing logarithms. LNCOLLECT regroups the terms in the logarithms. It is therefore preferable to use an expression that has already been factored (using FACTOR).
hp40g+.book Page 32 Friday, December 9, 2005 1:03 AM Typing: SINCOS(EXP(i·X)) gives after turning on complex mode, if necessary: cos(x) + i · sin(x) SIMPLIFY Simplify SIMPLIFY simplifies an expression automatically. Typing: SIN ( 3 ⋅ X ) + SIN ( 7 ⋅ X ) SIMPLIFY ⎛ ---------------------------------- ⎞ ⎝ ⎠ SIN ( 5 ⋅ X ) gives, after simplification: 4 · cos(x)2 − 2 XNUM Evaluation of reals XNUM has an expression as a parameter.
hp40g+.book Page 33 Friday, December 9, 2005 1:03 AM Typing: XQ(1.414213562) gives: √2 SOLV menu The SOLV menu contains functions that enable you to solve equations, linear systems, and differential equations. DESOLVE Solve differential equations DESOLVE enables you to solve differential equations. (For linear differential equations having constant coefficients, it is better to use LDEC.) DESOLVE has two arguments: 1.
hp40g+.book Page 34 Friday, December 9, 2005 1:03 AM To produce the solutions for y(0) = 1, type: SUBST ( Y ( X ) = X--+ cC1 cC0 ⋅ COS ( X ) + ---2---⋅------ ⋅ SIN ( X ), cC0 = 1 ) 2 which gives: 2 ⋅ cos ( x ) + ( x + 2 ⋅ cC1 ) ⋅ sin ( x ) y ( x ) = ---------------------------------------------------------------------------------2 Example 2 Solve: y” + y = cos(x) y(0) = 1 y’(0) = 1 It is possible to solve for the constants from the outset.
hp40g+.book Page 35 LDEC Friday, December 9, 2005 1:03 AM Linear differential equations having constant coefficients LDEC enables you to directly solve linear differential equations having constant coefficients. The parameters are the second member and the characteristic equation.
hp40g+.book Page 36 Friday, December 9, 2005 1:03 AM L1=2L1+L2 1 1 3 0 –2 –2 ENTER Reduction Result 2 0 4 0 –2 –2 then press ENTER. The following is then written to the Equation Writer: (x = −2) AND (y = −1) Example 2 Type: (2·X+Y+Z=1)AND(X+Y+2·Z=1)AND(X+2·Y+Z=4) Then, invoke LINSOLVE and type the unknowns: X AND Y AND Z and press the ENTER key. The following result is produced if you are in Step-by-step mode (CFG, etc.
hp40g+.book Page 37 Friday, December 9, 2005 1:03 AM then press ENTER. The following is then written to the Equation Writer: ⎛ x = – 1---⎞ AND ⎛ y = 5---⎞ AND ⎛ z = – 1---⎞ ⎝ ⎝ ⎝ 2⎠ 2⎠ 2⎠ SOLVE Solve equations SOLVE has as two parameters: (1) either an equality between two expressions, or a single expression (in which case = 0 is implied), and (2) the name of a variable. SOLVE solves the equation in R in real mode and in C in complex mode (ignoring REALASSUME).
hp40g+.book Page 38 SOLVEVX Friday, December 9, 2005 1:03 AM Solve equations SOLVEVX has as a parameter either: (1) an equality between two expressions in the variable contained in VX, or (2) a single such expression (in which case = 0 is implied). SOLVEVX solves the equation.
hp40g+.book Page 39 Friday, December 9, 2005 1:03 AM Typing: ACOS2S(ACOS(X) + ASIN(X)) gives, when simplified: π --2 ASIN2C Transform the arcsin into arccos ASIN2C has as a trigonometric expression as an argument. ASIN2C transforms the expression by replacing arcsin(x) π with ----- − arccos(x). 2 Typing: ASIN2C(ACOS(X) + ASIN(X)) gives, when simplified: π ----2 ASIN2T Transform the arccos into arctan ASIN2T has a trigonometric expression as an argument.
hp40g+.book Page 40 Friday, December 9, 2005 1:03 AM Typing: ATAN2S(ATAN(X)) gives: ⎛ x ⎞ asin ⎜ ------------------⎟ ⎝ x 2 + 1⎠ HALFTAN Transform in terms of tan(x/2) HALFTAN has a trigonometric expression as an argument. HALFTAN transforms sin(x), cos(x) and tan(x) in the expression, rewriting them in terms of tan(x/2).
hp40g+.book Page 41 Friday, December 9, 2005 1:03 AM TAN2CS2 transforms this expression by replacing tan(x) 1 – cos ( 2 ⋅ x ) with -------------------------------- . sin ( 2 ⋅ x ) Typing: TAN2CS2(TAN(X)) gives: 1-------------------------------– cos ( 2 ⋅ x ) sin ( 2 ⋅ x ) TAN2SC Replace tan(x) with sin(x)/cos(x) TAN2SC has a trigonometric expression as an argument. TAN2SC transforms this expression by replacing tan(x) sin ( x ) with ---------------- .
hp40g+.book Page 42 Friday, December 9, 2005 1:03 AM TCOLLECT linearizes this expression in terms of sin(n x) and cos(n x), then (in Real mode) reconstructs the sine and cosine of the same angle. Typing: TCOLLECT(SIN(X) + COS(X)) gives: π 2 ⋅ cos ⎛⎝ x – ---⎞⎠ 4 TEXPAND Develop transcendental expressions TEXPAND has as an argument a transcendental expression (that is, an expression with trigonometric, exponential or logarithmic functions).
hp40g+.book Page 43 Friday, December 9, 2005 1:03 AM gives: 4·cos(x)3–3·cos(x) TLIN Linearize a trigonometric expression TLIN has as an argument a trigonometric expression. TLIN linearizes this expression in terms of sin(n x) and cos(n x).
hp40g+.book Page 44 Friday, December 9, 2005 1:03 AM Typing: TRIG(SIN(X)2 + COS(X)2 + 1) gives: 2 TRIGCOS Simplify using the cosines TRIGCOS has as an argument a trigonometric expression. TRIGCOS simplifies this expression, using the identity sin(x)2+cos(x)2 = 1 to rewrite it in terms of cosines. Typing: TRIGCOS(SIN(X)4 + COS(X)2 + 1) gives: 4 2 cos ( x ) – cos ( x ) + 2 TRIGSIN Simplify using the sines TRIGSIN has as an argument a trigonometric expression.
hp40g+.book Page 45 Friday, December 9, 2005 1:03 AM CAS Functions on the MATH menu When you are in the Equation Writer and press , a menu of additional CAS functions available to you is displayed. Many of the functions in this menu match the functions available from the soft-key menus in the Equation Writer; but there are other functions that are only available from this menu. This section describes CAS functions that are available when you press in the Equation Writer (grouped by main menu name).
hp40g+.book Page 46 Friday, December 9, 2005 1:03 AM returns: Y = X –1 + 2 Pressing simplifies this to: Y=X+1 IM See “IM” on page 13-7. – Specifies the negation of the argument. RE See “RE” on page 13-8. SIGN Determines the quotient of the argument divided by its modulus. Example 7 + 4i Typing SIGN(7 + 4i) or SIGN(7,4) yields -------------- . 65 Constant menu e, i, π See “Constants” on page 13-8. ∞ Enters the sign for infinity.
hp40g+.book Page 47 DIVIS Friday, December 9, 2005 1:03 AM Gives the divisors of an integer. Example Typing: DIVIS(12) gives: 12 OR 6 OR 3 OR 4 OR 2 OR 1 Note: DIVIS(0) returns 0 OR 1. EULER Returns the Euler index of a whole number. The Euler index of n is the number of whole numbers less than n that are prime with n. Example Typing: EULER(21) gives: 12 Explanation: {2,4,5,7,8,10,11,13,15,16,17,19} is the set of whole numbers less than 21 and prime with 21.
hp40g+.book Page 48 Friday, December 9, 2005 1:03 AM In step-by-step mode, there are a number of intermediate results: 18 mod 15 = 3 15 mod 3 = 0 Result: 3 Pressing or Equation Writer. then causes 3 to be written to the Note that the last non-zero remainder in the sequence of remainders shown in the intermediate steps is the GCD. IDIV2 Returns the quotient and the remainder of the Euclidean division between two integers.
hp40g+.book Page 49 Friday, December 9, 2005 1:03 AM [48,1,0] [30,0,1]*–1 [18,1,–1]*–1 [12,–1,2]*–1 [6,2,–3]*–2 Result: [6,2,–3] Pressing or then causes 2 AND –3 = 6 to be written to the Equation Writer. The intermediate steps shown are the combination of lines. For example, to get line L(n + 2), take L(n) – q*L(n + 1) where q is the Euclidean quotient of the integers at the beginning of the vector, these integers being the sequence of remainders).
hp40g+.book Page 50 Friday, December 9, 2005 1:03 AM IREMAINDER works with integers and with Gaussian integers. This is what distinguishes it from MOD. Example 2 Typing: IREMAINDER(2 + 3·i, 1 + i) gives: i ISPRIME? Returns a value indicating whether an integer is a prime number. ISPRIME?(n) returns 1 (TRUE) if n is a prime or pseudo-prime, and 0 (FALSE) if n is not prime. Definition: For numbers less than 1014, pseudo-prime and prime mean the same thing.
hp40g+.book Page 51 Friday, December 9, 2005 NEXTPRIME 1:03 AM NEXTPRIME(n) returns the smallest prime or pseudo-prime greater than n. Example Typing: NEXTPRIME(75) gives: 79 PREVPRIME PREVPRIME(n) returns the greatest prime or pseudo-prime less than n. Example Typing: PREVPRIME(75) gives: 73 Modular menu All the examples of this section assume that p =13; that is, you have entered MODSTO(13) or STORE(13,MODULO), or have specified 13 for Modulo in CAS MODES screen (as explained on page 15-16).
hp40g+.book Page 52 DIVMOD Friday, December 9, 2005 1:03 AM Division in Z/pZ or Z/pZ[X]. Example 1 In Z/pZ, the arguments are two integers: A and B. When B has an inverse in Z/pZ, the result is A/B simplified as Z/pZ. Typing: DIVMOD(5, 3) gives: 6 Example 2 In Z/pZ[X], the arguments are two polynomials: A[X] and B[X]. The result is a rational fraction A[X]/B[X] simplified as Z/pZ[X].
hp40g+.book Page 53 Friday, December 9, 2005 FACTORMOD 1:03 AM Factors a polynomial in Z/pZ[X], providing that p ≤ 97, p is prime and the order of the multiple factors is less than the modulo. Example Typing: FACTORMOD(–(3X3 – 5X2 + 5X – 4)) gives: 2 – ( ( 3x – 5 ) ⋅ ( x + 6 ) ) GCDMOD Calculates the GCD of the two polynomials in Z/pZ[X]. Example Typing: GCDMOD(2X2 + 5, 5X2 + 2X – 3) gives: – ( 6x – 1 ) INVMOD Calculates the inverse of an integer in Z/pZ.
hp40g+.book Page 54 MULTMOD Friday, December 9, 2005 1:03 AM Performs a multiplication in Z/pZ or in Z/pZ[X]. Example 1 Typing: MULTMOD(11, 8) gives: –3 Example 2 Typing: MULTMOD(11X + 5, 8X + 6) gives: 2 – ( 3x – 2x – 4 ) POWMOD Calculates A to the power of N in Z/pZ[X], and A(X) to the power of N in Z/pZ[X]. Example 1 If p = 13, typing: POWMOD(11, 195) gives: 5 In effect: 1112 = 1 mod 13, so 11195 = 1116×12+3 = 5 mod 13.
hp40g+.book Page 55 SUBTMOD Friday, December 9, 2005 1:03 AM Performs a subtraction in Z/pZ or Z/pZ[X]. Example 1 Typing: SUBTMOD(29, 8) gives: –5 Example 2 Typing: SUBTMOD(11X + 5, 8X + 6) gives: 3x – 1 Polynomial menu EGCD Returns Bézout’s Identity, the Extended Greatest Common Divisor (EGCD). EGCD(A(X), B(X)) returns U(X) AND V(X) = D(X), with D, U, V such that D(X) = U(X)·A(X) + V(X)·B(X).
hp40g+.book FACTOR Page 56 Friday, December 9, 2005 1:03 AM Factors a polynomial. Example 1 Typing: FACTOR(X2 – 2) gives: (x + 2) ⋅ (x – 2) Example 2 Typing: FACTOR(X2 + 2·X + 1) gives: (x + 1) GCD 2 Returns the GCD (Greatest Common Divisor) of two polynomials. Example Typing: GCD(X2 + 2·X + 1, X2 – 1) gives: x+1 HERMITE Returns the Hermite polynomial of degree n (where n is a whole number).
hp40g+.book Page 57 LCM Friday, December 9, 2005 1:03 AM Returns the LCM (Least Common Multiple) of two polynomials. Example Typing: LCM(X2 + 2·X + 1, X2 – 1) gives: 2 ( x + 2x + 1 ) ⋅ ( x – 1 ) LEGENDRE Returns the polynomial Ln, a non-null solution of the differential equation: 2 ( x – 1 ) ⋅ y″ – 2 ⋅ x ⋅ y′ – n ( n + 1 ) ⋅ y = 0 where n is a whole number.
hp40g+.book Page 58 PROPFRAC Friday, December 9, 2005 1:03 AM PROPFRAC rewrites a rational fraction so as to bring out its whole number part. PROPFRAC(A(X)/ B(X)) writes the rational fraction A(X)/ B(X) in the form: R(X) Q ( X ) + -----------B(X) where R”(X) = 0, or 0 ≤ deg (R(X) < deg (B(X). Example Typing: ( 5X + 3 ) ⋅ ( X – 1 ) ROPFRAC ⎛⎝ -------------------------------------------⎞⎠ X+2 gives: 21 5x – 12 + -----------x+2 PTAYL PTAYL rewrites a polynomial P(X) in order of its powers of X – a.
hp40g+.book Page 59 Friday, December 9, 2005 1:03 AM Note that in step-by-step mode, synthetic division is shown, with each polynomial represented as the list of its coefficients in descending order of power. REMAINDER Returns the remainder from the division of the two polynomials, A(X) and B(X), divided in decreasing order by exponent.
hp40g+.book Page 60 Friday, December 9, 2005 1:03 AM Example 1 Typing: TCHEBYCHEFF(4) gives: 4 2 8x – 8x + 1 Example 2 Typing: TCHEBYCHEFF(–4) gives: 3 8x – 4x Real menu CEILING See “CEILING” on page 13-14. FLOOR See “FLOOR” on page 13-14. FRAC See “FRAC” on page 13-14. INT See “INT” on page 13-15. MAX See “MAX” on page 13-15. MIN See “MIN” on page 13-15. Rewrite menu All the functions on this menu are also available on the menu in the Equation Writer.
hp40g+.book Page 61 Friday, December 9, 2005 1:03 AM Tests menu ASSUME Use this function to make a hypothesis about a specified argument or variable. Example Typing: ASSUME(X>Y) sets an assumption that X is greater than Y. In fact, the calculator works only with large not strict relations, and thus ASSUME(X>Y) will actually set the assumption that X ≥ Y. (A message will indicate this when you enter an ASSUME function.) Note that X ≥ Y will be stored in the REALASSUME variable.
hp40g+.book Page 62 Friday, December 9, 2005 1:03 AM CAS Functions on the CMDS menu When you are in the Equation Writer and press , a menu of the full set of CAS functions available to you is displayed. Many of the functions in this menu match the functions available from the soft-key menus in the Equation Writer; but there are other functions that are only available from this menu. This section describes the additional CAS functions that are available when you press in the Equation Writer.
hp40g+.book Page 63 Friday, December 9, 2005 1:03 AM Example Find the solutions P(X) of: P(X) = X (mod X2 + 1) P(X) = X – 1 (mod X2 – 1) Typing: CHINREM((X) AND (X2 + 1), (X – 1) AND (X2 – 1)) gives: 2 4 x –1 x – 2x + 1 – -------------------------- AND -------------2 2 That is: 2 4 x – 2x + 1 x –1 P [ X ] = – -------------------------- ⎛ mod – --------------⎞ ⎝ 2 2 ⎠ CYCLOTOMIC Returns the cyclotomic polynomial of order n. This is a polynomial having the nth primitive roots of unity as zeros.
hp40g+.book Page 64 Friday, December 9, 2005 1:03 AM Example 1 Typing: EXP2HYP(EXP(A)) gives: sinh(a) + cosh(a) Example 2 Typing: EXP2HYP(EXP(–A) + EXP(A)) gives: 2 · cosh(a) GAMMA Returns the values of the Γ function at a given point.
hp40g+.book Page 65 Friday, December 9, 2005 1:03 AM Example Typing: IABCUV(48, 30, 18) gives: 6 AND –9 IBERNOULLI Returns the nth Bernoulli’s number B(n) where: t ------------- = t e –1 +∞ B(n) t ∑ ----------n! n n=0 Example Typing: IBERNOULLI(6) gives: 1---------42 ICHINREM Chinese Remainders: ICHINREM(A AND P,B AND Q) returns C AND R, where A, B, P and Q are whole numbers. The numbers X = C + k · R where k is an integer are such that X = A mod P and X = B mod Q.
hp40g+.book Page 66 Friday, December 9, 2005 1:03 AM ILAP is the inverse Laplace transform of a given expression. Again, the expression is the value of a function of the variable stored in VX.
hp40g+.book Page 67 Friday, December 9, 2005 1:03 AM Typing: 1 - + ( X – 6 ) ⋅ a + b⎞ ⎛ --------------------------⎜ X 2 – 6X + 9 ⎟ -⎟ ILAP ⎜ -----------------------------------------------------------------2 ⎜ ⎟ X – 6X + 9 ⎠ ⎝ gives: 3 ⎛ x----- – ( 3a – b ) ⋅ x + a⎞ ⋅ e 3 x ⎝6 ⎠ LAP See ILAP above. PA2B2 Decomposes a prime integer p congruent to 1 modulo 4, as follows: p = a2 + b2. The calculator gives the result as a + b · i.
hp40g+.book Page 68 Friday, December 9, 2005 1:03 AM gives: 5 1 2 – --- + --- ⋅ π 4 6 Psi Returns the value of the Digamma function at a. The Digamma function is defined as the derivative of ln(Γ(x)), so we have PSI(a,0) = Psi(a). Example Typing: Psi(3) and pressing gives: .922784335098 REORDER Reorders the input expression following the order of variables given in the second argument.
hp40g+.book Page 69 Friday, December 9, 2005 1:03 AM Example Typing: SIGMA(X · X!, X) gives: X! because (X + 1)! – X! = X · X!. SIGMAVX Returns the discrete antiderivative of the input function, that is a function, G, that satisfies the relation: G(x + 1) – G(x) = f(x). SIGMAVX has as its argument a function f of the current variable VX.
hp40g+.book TSIMP Page 70 Friday, December 9, 2005 1:03 AM Simplifies a given expression by rewriting it as a function of complex exponentials, and then reducing the number of variables (enabling complex mode in the process). Example Typing: SIN ( 3X ) + SIN ( 7X ) TSIMP ⎛⎝ ---------------------------------------------------⎞⎠ SIN ( 5X ) gives: 4 EXP ( i ⋅ x ) + 1------------------------------------2 EXP ( i ⋅ x ) VER Returns the version number of your CAS. Example Typing: VER might give: 4.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 15 Equation Writer Using CAS in the Equation Writer The Equation Writer enables you to type expressions that you want to simplify, factor, differentiate, integrate, and so on, and then work them through as if on paper. The key on the HOME screen menu bar opens the Equation Writer, and the key closes it.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Cursor mode Enables you to go into cursor mode, for quicker selection of expressions and subexpressions (see page 15-10). Edit expr. Enables you to edit the highlighted expression on the edit line, just as you do in the HOME screen (see page 15-11). Change font Enables you to choose to type using large or small characters (see page 15-10). Cut Copies the selection to the clipboard and erases the selection from Equation Writer.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM REWRI menu The menu contains functions that enable you to rewrite an expression in another form. SOLV menu The menu contains functions that enable you to solve equations, linear systems, and differential equations. TRIG menu The menu contains functions that enable you to transform trigonometric expressions. NOTE You can get online help about any CAS function by pressing 2 and selecting that function (as explained in “Online Help” on page 14-8).
hp40g+.book Page 4 Friday, December 9, 2005 • 1:03 AM The fourth symbol, S, in the above example, indicates that you are in step-by-step mode. If you were not in step-by-step mode, this symbol would be D (which stands for Direct). The first line of an Equation Writer menu only indicates some of the mode settings. To see more settings, highlight the first line and press . The configuration menu appears. The header of the configuration menu has additional symbols.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Entering expressions and subexpressions You type expressions in the Equation Writer is much the same way as you type them in the HOME screen, using the keys to directly enter numbers, letters and operators, and menus to select various functions and commands. When you type an expression in the Equation Writer, the operator that you are typing always carries over to the adjacent or selected expression.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM this case, you have to press expression. to select elements in the The following illustration shows how an expression can be viewed as a tree in the Equation Writer.
hp40g+.book Page 7 Friday, December 9, 2005 • More Examples 1:03 AM Press again and again to progressively select more of the top-most branch, and then lower branches (5x, 5x + 3, and then the entire numerator and finally the entire expression). Example1 If you enter: 2 + X × 3– X and press the entire expression is selected.
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM (– X) apply to it. As a result, the entered expression is interpreted, and displayed, as (2 + X)(3 – X). Select the entire expression by pressing and evaluate it by pressing . The result is: –(X2–X–6) Example2 To enter X2–3X+1, press: 2 –3 +1 If, instead, you had to enter –x2–3X+1, you would need to press: (–) 2 –3 +1 Note that you press twice to ensure that the exponent applies to –X and not just to X.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM Select the fifth branch by pressing . At this point, the desired expression is in the Equation Writer, as shown at the right. Suppose that you want to select the second and third 1 1 1 branches, that is: --- + --- . First press . This selects --- , 3 4 3 the second term. Now press . This key combination enables you to select two contiguous branches, the one already selected and the one to the right of it.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM Pressing produces the result of the partial calculation. Summing up Pressing enables you to select the current element and its neighbour to the right. enables you to exchange the selected element with its neighbour to the left. The selected element remains selected after you move it. Cursor mode In cursor mode you can select a large expression quickly.
hp40g+.book Page 11 Friday, December 9, 2005 1:03 AM How to modify an expression If you’re typing an expression, the key enables you to erase what you’ve typed. If you’re selecting, you can: • Cancel the selection without deleting the expression by pressing . The cursor moves to the end of the deselected portion. • Replace the selection with an expression, just by typing the desired expression.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM Accessing CAS functions While you are in the Equation Writer, you can access all CAS functions, and you can access them in various ways. General principle: When you have written an expression in the Equation Writer, all you have to do is press to evaluate whatever you have selected (or the entire expression, if nothing is selected). How to type Σ and Press ∫ to enter Σ and to enter ∫.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM select the entire expression and press obtain: 4--5 However, if you type: ∞ ∑ K=1 , you 1 ------------------------K ⋅ (K + 1) select the entire expression and press , you obtain 1. How to enter infix functions An infix function is one that is typed between its arguments. For example, AND, |and MOD are infix functions.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM First option: function first, then arguments In the Equation Writer, press , select FACTOR and then press or . FACTOR() is displayed in the Equation Writer, with the cursor between the parentheses (as shown at the right). Enter your expression, using the rules of selection described earlier. 2 4 The entire expression is now selected. Press the result. then produce With a blank Equation Writer screen, press , select SUBST and then press or .
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM Press to obtain the an intermediate result (42 – 4) and again to evaluate the intermediate result. The final answer is 12. Second option: arguments first, then function Enter your expression, using the rules of selection described earlier. 2 4 The entire expression is now selected. Now press and select FACTOR. Notice that the FACTOR is applied to whatever was selected (which is automatically placed in parentheses). Press to evaluate the expression.
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM Press to obtain an intermediate result, (4– 2)(4 + 2), and again to evaluate the intermediate result. The final answer, as before, is 12. Note If you call a CAS function while you’re writing an expression, whatever is currently selected is copied to the function’s first or main argument. If nothing is selected, the cursor is placed at the appropriate location for completing the arguments.
hp40g+.book Page 17 Friday, December 9, 2005 1:03 AM • MODULO contains the value of p for performing symbolic calculations in Z/pZ or in Z/pZ[X]. You can change the value of p either with the MODSTO command on the MODULAR menu, (by typing, for example, MODSTO(n) to give p a value of n), or from CAS MODES screen (see page 14-5). • PERIOD must contain the period of a function before you can find its Fourier coefficients. • PRIMIT contains the primitive of the last integrated function.
hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM Diff&Int ( ), Rewrite ( ( ) and Trig ( ). ), Solve • The Complex menu, providing functions specific to manipulating with complex numbers. • The Constant menu, containing e, i,∞ and π. • The Hyperb. menu, containing hyperbolic functions. • The Integer menu, containing functions that enable you to perform integer arithmetic.
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM Press to clear the value of the highlighted variable. Press to change the name of the highlighted variable. Press to define a new variable (which you do by specifying an object and a name for the object. SYMB key Pressing the key in the Equation Writer gives you access to CAS history. As in the HOME screen history, the calculations are written on the left and the results are written on the right.
hp40g+.book Page 20 Friday, December 9, 2005 NOTE 1:03 AM This operation supposes that the current variable is also the variable of the function or curve you want to graph. When the expression is copied, it is evaluated, and the current variable (contained in VX) is changed to X, T, or θ, depending on the type of plot you chose. If the function depends on a parameter, it is preferable to give the parameter a value before pressing .
hp40g+.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 16 Step-by-Step Examples Introduction This chapter illustrates the power of CAS, and the Equation Writer, by working though a number of examples. Some of these examples are variations on questions from senior math examination papers. The examples are given in order of increasing difficulty. Example 1 3--–1 2 ----------1--+1 2 calculate the result of A in the form of an irreducible fraction, showing each step of the calculation.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Press to simplify the numerator. Press to select the entire fraction. Press to simplify the selected fraction, giving the result shown at the right. Example 2 Given that C = 2 45 + 3 12 – 20 – 6 3 write C in the form d 5 , where d is a whole number. Solution: In the Equation Writer, enter C by typing: 2 45 3 12 20 6 3 Press to select – 6 3 . Press to select – 20 and select 20. to Now press , select FACTOR and press .
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Press to factor 2 20 into 2 ⋅ 5 . Press to select 2 2 ⋅ 5 and simplify it. Press to to select – 2 5 and to exchange 3 12 with –2 5 . Press to select 2 45 and to select 45. Press , select FACTOR and press . Press to factor 2 45 into 3 ⋅ 5 . Press to select 2 3 ⋅ 5 and to simplify the selection. Press to select 2 ⋅ 3 5 , and to select 2⋅3 5–2 5.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM Press to evaluate the selection. It remains to transform 3 12 and combine it with – 6 3 . Follow the same procedure as undertaken a number of times above. You will find that 3 12 is equal to 6 3 , and so the final two terms cancel each other out. Hence the result is C = 4 5 Example 3 2 Given the expression D = ( 3x – 1 ) – 81 : • expand and reduce D • factor D • solve the equation ( 3x – 10 ) ⋅ ( 3x + 8 ) = 0 and • evaluate D for x = 5.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Press to select the entire equation, then press to reduce it to 2 9x – 6x – 80 . Press , select FACTOR, press and then . The result is as shown at the right. Now press , select SOLVEVX, press and press . The result is shown at the right. Press to display CAS history, select D or a version of it, and press .
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM 17x + 20y = 90 10x + 25y = 90 Press , select LINSOLVE and press Enter 17 Y 90 X X 25 . 20 10 90 Y X Y If you are working in step by step mode, pressing produces the result at the right. Press again to produce the next step in the solution: Press again to produce the reduction result: Pressing again produces the final result: 14 If you select ------ , and press 5 you get X = 2 and Y = 2.8.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM 1. Find the exact length of AB in centimetres. 2. Determine the equation of the line AB. First method Type: STORE((-1,3),A) and press . Accept the change to Complex mode, if necessary. Note that pressing returns the coordinates in complex form: –1+3i. Now type: STORE((-3,-1),B) and press . The coordinates this time are represented as –3+–1·i. The vector AB has coordinates B – A. Type: (B - A) Press 2 5. .
hp40g+.book Page 8 Friday, December 9, 2005 1:03 AM Press again to simplify the result to Y = 2X+5. Second method Type: (-3,-1 )-(-1,3) The answer is –(2+4i). With the answer still selected, apply the ABS command by pressing . Pressing gives 2 5 , the same answer as with method 1 above. You can also determi1ne the equation of the line AB by typing: DROITE(( -1,3), (-3,-1)) Pressing Y = –(2X+5).
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM 4. Show that for every integer n > 0, bn × cn = a2n. 5. Deduce the prime factor decomposition of a6. 6. Show that GCD(bn,cn) = GCD(cn,2). Deduce that bn and cn are prime together. Solution: Begin by entering the three definitions. Type: DEF(A(N) = 4 · 10N–1) DEF(B(N) = 2 · 10N–1) DEF(C(N) = 2 · 10N+1) Here are the keystrokes for entering the first definition: First select the DEF command by pressing . Now press N 10 1 A Finally press .
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM Show that the whole numbers k such that: n 10 ≤ k < 10 n+1 have ( n + 1 ) digits in decimal notation. We have: n n n 10 < 3 ⋅ 10 < a n < 4 ⋅ 10 < 10 n n 10 < b n < 2 ⋅ 10 < 10 n n n n+1 n+1 10 < 2 ⋅ 10 < c n < 3 ⋅ 10 < 10 n+1 so a n ,b n ,c n have ( n + 1 ) digits in decimal notation. n Moreover, d n = 10 – 1 is divisible by 9, since its decimal notation can only end in 9.
hp40g+.book Page 11 Friday, December 9, 2005 1:03 AM Now consider the product of two of the definitions entered above: B(N) × C(N): B N C N . Press , to select EXP2POW and press . Press to evaluate the expression, yielding the result of B(N) × C(N). Consider now the decomposition of A(6) into its prime factors. Press , to select FACTOR and press . Now press A 6. Finally, press to get the result. The factors are listed, separated by a medial period.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM GCD ( c n ,b n ) = GCD ( cn ,2 ) = GCD ( b n ,2 ) = 1 Part 2 Given the equation: b3 ⋅ x + c3 ⋅ y = 1 [1] where the integers x and y are unknown and b3 and c3 are defined as in part 1 above: 1. Show that [1] has at least one solution. 2. Apply Euclid’s algorithm to b3 and c3 and find a solution to [1]. 3. Find all solutions of [1]. Solution: Equation [1] must have at least one solution, as it is actually a form of Bézout’s Identity.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM so, b 3 = 999 × ( c 3 – b 3 ) + 1 , or b 3 × 1000 + c 3 × ( – 999 ) = 1 The calculator is not needed for finding the general solution to equation [1]. We started with b 3 ⋅ x + c 3 ⋅ y = 1 and have established that b 3 × 1000 + c 3 × ( – 999 ) = 1 .
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM the circle C, M will move on a curve Γ. In this exercise we will study and plot Γ. 1. Let t ∉ [– π,π] and m be the point on C of affix z = e i⋅t . Find the coordinates of M in terms of t. 2. Compare x(–t) with x(t) and y(–t) with y(t). 3. Compute x′(t) and find the variations of x over [0, π]. 4. Repeat step 3 for y. 5. Show the variations of x and y in the same table. 6.
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM Selecting the entire expression and pressing gives the result at the right: Now linearize the result by applying the LIN command (which can be found on the menu). The result, after accepting the switch to complex mode, is shown at the right: Now store the result in variable M. Note that STORE is on the menu. To calculate the real part of the expression, apply the RE command (available on the COMPLEX submenu of the MATH menu).
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM DEF command to it. Press definition. to complete the To calculate the real part of the expression, apply the IM command (available on the COMPLEX submenu of the MATH menu) to the stored variable M. Press to get the result at the right: Finally, define the result as Y(t) in the same way that you defined X(t): by firstly adding Y(t) = to the expression (as shown at the right) and then applying the DEF command.
hp40g+.book Page 17 Friday, December 9, 2005 1:03 AM Then press to produce the result at the right: In other words, y ( –t ) = –y ( t ) . If M 1 (x ( t ),y ( t )) is part of Γ , then M x (x ( – t ),y ( – t )) is also part of Γ . Since M 1 and M 2 are symmetrical with respect to the xaxis, we can deduce that the x-axis is an axis of symmetry for Γ . Part 3 Calculate x′ ( t ) by typing: DERVX X t. Press to highlight the expression.
hp40g+.book Part 4 Page 18 Friday, December 9, 2005 1:03 AM To calculate y′ ( t ) , begin by typing: DERVX(Y(t)). Pressing returns: Press again to simplify the result: Select FACTOR and press . You can now define the function y′ ( t ) (in the same way that you defined x′ ( t ) ). Part 5 To show the variations of x ( t ) and y ( t ) , we will trace x ( t ) and y ( t ) on the same graph. The independent variable must be t which it should be as a result of the previous calculations.
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM Now press the graphs. Part 6 to see π 2⋅π To find the values of x ( t ) and y ( t ) for t = 0, ---, ----------, π 3 3 return to CAS, type each function in turn and press . (You may need to press twice for further simplification).
hp40g+.book Page 20 Friday, December 9, 2005 1:03 AM The example at the right shows the case for t = 0. Select the entire expression and press to get the answer: 0 The example at the right shows the case for t = π/3. Selecting the entire expression and pressing displays the message shown at the right. Accept YES and press . Press again to get the result: ∞ The next example is for t = 2π/3. Selecting the entire expression and pressing displays the result: 0 The final example is for the case where t = π.
hp40g+.book Page 21 Friday, December 9, 2005 1:03 AM t 0 x' ( t ) 0 – 0 + x( t) – -----12 ↓ – -----34 ↑ y( t) 0 ↓ y' ( t ) 0 – m 0 – ---------34 –1 ∞ π 2 π----3 π --3 ↓ – 3 1 --4 – 3 3 ------------4 0 0 + 0 ↑ 3 --2 ↑ 0 + 2 ∞ Now we will graph Γ, which is a parametric curve. In the Equation Writer, type X(t) + i × Y(t). Select the entire expression and press . Now press , select Parametric and press . Select X1,Y1 as the destination and press .
hp40g+.book Page 22 Friday, December 9, 2005 1:03 AM Exercise 8 For this exercise, make sure that the calculator is in exact real mode with X as the current variable. Part 1 For an integer, n, define the following: --x- 2 2x + 3 n u n = ∫ --------------- e dx 0 x+2 Define g over [0,2] where: 2x + 3 g ( x ) = --------------x+2 1. Find the variations of g over [0,2]. Show that for every real x in [0,2]: 3--7 ≤ g ( x ) ≤ --2 4 2.
hp40g+.book Page 23 Friday, December 9, 2005 1:03 AM Solution 1 Start by defining G(X): DEF G X =2 X 3 X 2 Now press : Press and to select the numerator and denominator, and then press . This leaves G(X) displayed: Finally, apply the TABVAR function: TABVAR and press a number of times until the variation table appears (shown above). The first line of the variation table gives the sign of g′ ( x ) according to x, and the second line the variations of g (x).
hp40g+.book Page 24 Friday, December 9, 2005 1:03 AM Now press and scroll down the screen to: 1 → ------------------2(x + 2) Now press to obtain the table of variations. If you are not in step-by -step mode, you can also get the calculation of the derivative by typing: DERVX(G(X)) which produces the preceding result. To prove the stated inequality, first calculate g(0) by 3 typing G(0) and pressing . The answer is: --- . 2 Now calculate g(2) by typing G(2) and pressing 7 The answer is --- . 4 .
hp40g+.book Page 25 Friday, December 9, 2005 1:03 AM We can now see that: 2 2 ----7⎛ n ⎞ 3--- ⎛ n ⎞ ⎜ ne – n⎟ ≤ u n ≤ --- ⎜ ne – n⎟ 4⎝ 2⎝ ⎠ ⎠ To justify the preceding calculation, we must assume that --xn --xn n ⋅ e is a primitive of e . If you are not sure, you can use the INTVX function as illustrated at the right: Note that the INTVX command is on the menu.
hp40g+.book Page 26 Friday, December 9, 2005 1:03 AM NOTE: The variable VX is now set to N. Reset it to X by pressing (to display CAS MODES screen) and change the INDEP VAR setting.
hp40g+.book Page 27 Friday, December 9, 2005 1:03 AM Solution 1 Start by defining the 1 following: g ( x ) = 2 – -----------x+2 Now type PROPFRAC(G(X)). Note that PROPFRAC can be found on the POLYNOMIAL submenu of the MATH menu. Pressing yields the result shown at the right. Solution 2 Enter the integral: I = 2 ∫0 g ( x ) dx .
hp40g+.book Page 28 Friday, December 9, 2005 1:03 AM Solution 3 The calculator is not needed here. Simply stating that x --- e n increases for x ∈ [0,2] is sufficient to yield the inequality: --xn 1≤e ≤e 2 --n Solution 4 Since g ( x ) is positive over [0, 2], through multiplication we get: --xn g ( x ) ≤ g ( x )e ≤ g ( x )e 2 --n and then, integrating: 2 --n I ≤ un ≤ e I 2 Solution 5 --n First find the limit of e when n → + ∞ .
hp40g+.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 17 Variables and memory management Introduction The HP 40gs has approximately 200K of user memory. The calculator uses this memory to store variables, perform computations, and store history. A variable is an object that you create in memory to hold data. The HP 40gs has two types of variables, home variables and aplet variables. • Home variables are available in all aplets.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Storing and recalling variables You can store numbers or expressions from a previous input or result into variables. Numeric Precision A number stored in a variable is always stored as a 12digit mantissa with a 3-digit exponent. Numeric precision in the display, however, depends on the display mode (Standard, Fixed, Scientific, Engineering, or Fraction). A displayed number has only the precision that is displayed.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM 5. Enter a name for the variable. A 6. Press the result. to store The results of a calculation can also be stored directly to a variable. For example: 2 5 3 B To recall a value To recall a variable’s value, type the name of the variable and press . A To use variables in calculations You can use variables in calculations.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM The VARS menu You use the VARS menu to access all variables in the calculator. The VARS menu is organised by category. For each variable category in the left column, there is a list of variables in the right column. You select a variable category and then select a variable in the category. 1. Open the VARS menu. 2. Use the arrow keys or press the alpha key of the first letter in the category to select a variable category.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM 5. Choose whether to place the variable name or the variable value on the command line. – Press to indicate that you want the variable’s contents to appear on the command line. – Press to indicate that you want the variable’s name to appear on the command line. 6. Press to place the value or name on the command line. The selected object appears on the command line.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM 4. Enter data for L2. 55 90 5. Press 48 77 86 to access HOME. 6. Open the variable menu and select L1. 7. Copy it to the command line. Note: Because the option is highlighted, the variable’s name, rather than its contents, is copied to the command line. 8. Insert the + operator and select the L2 variable from the List variables. 9. Store the answer in the List catalog L3 variable.
hp40g+.book Page 7 Friday, December 9, 2005 Home variables 1:03 AM It is not possible to store data of one type in a variable of another type. For example, you use the Matrix catalog to create matrices. You can create up to ten matrices, and you can store these in variables M0 to M9. You cannot store matrices in variables other than M0 to M9. Category Complex Available names Z0 to Z9 For example, (1,2) Z0 or 2+3i Z1.
hp40g+.book Page 8 Friday, December 9, 2005 Aplet variables To access an aplet variable 1:03 AM Most aplet variables store values that are unique to a particular aplet. These include symbolic expressions and equations (see below), settings for the Plot and Numeric views, and the results of some calculations such as roots and intersections. See the Reference Information chapter for more information about aplet variables. Category Available names Function F0 to F9 (Symbolic view).
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM Memory Manager You can use the Memory Manager to determine the amount of available memory on the calculator. You can also use Memory Manager to organize memory. For example, if the available memory is low, you can use the Memory Manager to determine which aplets or variables consume large amounts of memory. You can make deletions to free up memory. Example 1. Start the Memory Manager. A list of variable categories is displayed.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 18 Matrices Introduction You can perform matrix calculations in HOME and in programs. The matrix and each row of a matrix appear in brackets, and the elements and rows are separated by commas. For example, the following matrix: 1 2 3 4 5 6 is displayed in the history as: [[1,2,3],[4,5,6]] (If the Decimal Mark mode is set to Comma, then separate each element and each row with a period.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Creating and storing matrices You can create, edit, delete, send, and receive matrices in the Matrix catalog. To open the Matrix catalog, press MATRIX. You can also create and store matrices—named or unnamed—-in HOME. For example, the command: POLYROOT([1,0,–1,0])XM1 stores the root of the complex vector of length 3 into the M1 variable.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM 2. Highlight the matrix variable name you want to use and press . 3. Select the type of matrix to create. – For a vector (one-dimensional array), select Real vector or Complex vector. Certain operations (+, –, CROSS) do not recognize a one-dimensional matrix as a vector, so this selection is important. – For a matrix (two-dimensional array), select Real matrix or Complex matrix. 4.
hp40g+.book Page 4 Friday, December 9, 2005 To transmit a matrix 1:03 AM You can send matrices between calculators just as you can send aplets, programs, lists, and notes. 1. Connect the calculators using an appropriate cable. 2. Open the Matrix catalogs on both calculators. 3. Highlight the matrix to send. 4. Press and choose the method of sending. 5. Press on the receiving calculator and choose the method of receiving.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Key Meaning (Continued) Moves to the first row, last row, first column, or last column respectively. To display a matrix • • In the Matrix catalog ( matrix name and press MATRIX), highlight the . In HOME, enter the name of the matrix variable and press . To display one element In HOME, enter matrixname(row,column). For example, if M2 is [[3,4],[5,6]], then M2(1,2) returns 4. To create a matrix in HOME 1. Enter the matrix in the edit line.
hp40g+.book Page 6 To store one element Friday, December 9, 2005 1:03 AM In HOME, enter, value matrixname(row,column). For example, to change the element in the first row and second column of M5 to 728, then display the resulting matrix: 728 M5 1 2 M5 . An attempt to store an element to a row or column beyond the size of the matrix results in an error message. Matrix arithmetic You can use the arithmetic functions (+, –, ×, / and powers) with matrix arguments.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM M1 To multiply and divide by a scalar M2 For division by a scalar, enter the matrix first, then the operator, then the scalar. For multiplication, the order of the operands does not matter. The matrix and the scalar can be real or complex.
hp40g+.book Page 8 Friday, December 9, 2005 To divide by a square matrix 1:03 AM For division of a matrix or a vector by a square matrix, the number of rows of the dividend (or the number of elements, if it is a vector) must equal the number of rows in the divisor. This operation is not a mathematical division: it is a leftmultiplication by the inverse of the divisor. M1/M2 is equivalent to M2–1 * M1.
hp40g+.book Page 9 Friday, December 9, 2005 1:03 AM 3. Return to the Matrix Catalog. MATRIX In this example, the vector you created is listed as M1. 4. Create a new matrix. Select Real matrix 5. Enter the equation coefficients. 2 3 4 1 1 1 4 1 2 In this example, the matrix you created is listed as M2. 6. Return to HOME and enter the calculation to left-multiply the constants vector by the inverse of the coefficients matrix.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM Matrix functions and commands About functions About commands • Functions can be used in any aplet or in HOME. They are listed in the MATH menu under the Matrix category. They can be used in mathematical expressions—primarily in HOME—as well as in programs. • Functions always produce and display a result. They do not change any stored variables, such as a matrix variable.
hp40g+.book Page 11 COND Friday, December 9, 2005 1:03 AM Condition Number. Finds the 1-norm (column norm) of a square matrix. COND(matrix) CROSS Cross Product of vector1 with vector2. CROSS(vector1, vector2) DET Determinant of a square matrix. DET(matrix) DOT Dot Product of two arrays, matrix1 matrix2. DOT(matrix1, matrix2) EIGENVAL Displays the eigenvalues in vector form for matrix. EIGENVAL(matrix) EIGENVV Eigenvectors and Eigenvalues for a square matrix. Displays a list of two arrays.
hp40g+.book Page 12 LU Friday, December 9, 2005 1:03 AM LU Decomposition. Factors a square matrix into three matrices: {[[lowertriangular]],[[uppertriangular]],[[permutation]]} The uppertriangular has ones on its diagonal. LU(matrix) MAKEMAT Make Matrix. Creates a matrix of dimension rows × columns, using expression to calculate each element.
hp40g+.book Page 13 Friday, December 9, 2005 SPECNORM 1:03 AM Spectral Norm of matrix. SPECNORM(matrix) SPECRAD Spectral Radius of a square matrix. SPECRAD(matrix) SVD Singular Value Decomposition. Factors an m × n matrix into two matrices and a vector: {[[m × m square orthogonal]],[[n × n square orthogonal]], [real]}. SVD(matrix) SVL Singular Values. Returns a vector containing the singular values of matrix. SVL(matrix) TRACE Finds the trace of a square matrix.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM column 2) is swapped with element 2,1; element 2,3 is swapped with element 3,2; and so on. For example, TRN([[1,2],[3,4]]) creates the matrix [[1,3],[2,4]]. Reduced-Row Echelon Form The following set of equations x – 2y + 3z = 14 2x + y – z = – 3 4x – 2y + 2z = 14 can be written as the augmented matrix 1 – 2 3 14 2 1 –1 –3 4 – 2 2 14 which can then stored as a 3 × 4 real matrix in any matrix variable. M1 is used in this example.
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM The final row of zeros in the reduced-row echelon form of the augmented matrix indicates an inconsistent system with infinite solutions.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 19 Lists You can do list operations in HOME and in programs. A list consists of comma-separated real or complex numbers, expressions, or matrices, all enclosed in braces. A list may, for example, contain a sequence of real numbers such as {1,2,3}. (If the Decimal Mark mode is set to Comma, then the separators are periods.) Lists represent a convenient way to group related objects. There are ten list variables available, named L0 to L9.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM 3. Enter the values you want in the list, pressing after each one. Values can be real or complex numbers (or an expression). If you enter a calculation, it is evaluated and the result is inserted in the list. 4. When done, press or press List catalog keys LIST to see the List catalog, to return to HOME. The list catalog keys are: Key Meaning Opens the highlighted list for editing. Transmits the highlighted list to another HP 40gs or a PC.
hp40g+.book Page 3 Friday, December 9, 2005 List edit keys 1:03 AM When you press to create or change a list, the following keys are available to you: Key Meaning Copies the highlighted list item into the edit line. Inserts a new value before the highlighted item. Deletes the highlighted item from the list. CLEAR or Create a list in HOME Clears all elements from the list. Moves to the end or the beginning of the list. 1. Enter the list on the edit line.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM Displaying and editing lists To display a list • In the List catalog, highlight the list name and press . • In HOME, enter the name of the list and press . To display one element In HOME, enter listname(element#). For example, if L2 is {3,4,5,6}, then L2(2) returns 4. To edit a list 1. Open the List catalog. LIST. 2. Press or to highlight the name of the list you want to edit (L1, etc.) and press to display the list contents. 3.
hp40g+.book Page 5 Friday, December 9, 2005 To insert an element in a list 1:03 AM 1. Open the List catalog. LIST. 2. Press or to highlight the name of the list you want to edit (L1, etc.) and press to display the list contents. New elements are inserted above the highlighted position. In this example, an element, with the value of 9, is inserted between the first and second elements in the list. 3. Press to the insertion position, then press , and press 9. 4. Press To store one element Lists .
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Deleting lists To delete a list In the List catalog, highlight the list name and press . You are prompted to confirm that you want to delete the contents of the highlighted list variable. Press to delete the contents. To delete all lists In the List catalog, press CLEAR. Transmitting lists You can send lists to calculators or PCs just as you can aplets, programs, matrices, and notes. 1. Connect the calculators using an appropriate cable). 2.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM variable name (such as L1) or the actual list. For example, REVERSE({1,2,3}). • If Decimal Mark in Modes is set to Comma, use periods to separate arguments. For example, CONCAT(L1.L2). Common operators like +, –, ×, and / can take lists as arguments. If there are two arguments and both are lists, then the lists must have the same length, since the calculation pairs the elements.
hp40g+.book Page 8 MAKELIST Friday, December 9, 2005 1:03 AM Calculates a sequence of elements for a new list. Evaluates expression with variable from begin to end values, taken at increment steps. MAKELIST(expression,variable,begin,end, increment) The MAKELIST function generates a series by automatically producing a list from the repeated evaluation of an expression. Example In HOME, generate a series of squares from 23 to 27.
hp40g+.book Page 9 SIZE Friday, December 9, 2005 1:03 AM Calculates the number of elements in a list. SIZE(list) Also works with matrices. ΣLIST Calculates the sum of all elements in list. ΣLIST(list) Example ΣLIST({2,3,4}) returns 9. SORT Sorts elements in ascending order. SORT(list) Finding statistical values for list elements To find values such as the mean, median, maximum, and minimum values of the elements in a list, use the Statistics aplet.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM 3. Start the Statistics aplet, and select 1-variable mode (press , if necessary, to display ). Select Statistics Note: Your list values are now in column 1 (C1). 4. In the Symbolic view, define H1 (for example) as C1 (sample) and 1 (frequency). 5. Go to the Numeric view to display calculated statistics. See “One-variable” on page 10-14 for the meaning of each computed statistic.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 20 Notes and sketches Introduction The HP 40gs has text and picture editors for entering notes and sketches. • Each aplet has its own independent Note view and Sketch view. Notes and sketches that you create in these views are associated with the aplet. When you save the aplet, or send it to another calculator, the notes and sketches are saved or sent as well. • The Notepad is a collection of notes independent of all aplets.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM Note edit keys Key Meaning Space key for text entry. Displays next page of a multi-page note. Alpha-lock for letter entry. Lower-case alpha-lock for letter entry. Backspaces cursor and deletes character. Deletes current character. Starts a new line. CLEAR Erases the entire note. Menu for entering variable names, and contents of variables. Menu for entering math operations, and constants. 20-2 CMDS Menu for entering program commands.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Aplet sketch view You can attach pictures to an aplet in its Sketch view ( SKETCH). Your work is automatically saved with the aplet. Press any other view key or to exit the Sketch view Sketch keys Key Meaning Stores the specified portion of the current sketch to a graphics variable (G1 through G0). Adds a new, blank page to the current sketch set. Displays next sketch in the sketch set. Animates if held down. Opens the edit line to type a text label.
hp40g+.book Page 4 To draw a box Friday, December 9, 2005 1:03 AM 1. In Sketch view, press and move the cursor to where you want any corner of the box to be. 2. Press . 3. Move the cursor to mark the opposite corner for the box. You can adjust the size of the box by moving the cursor. 4. Press To draw a circle to finish the box. 1. In Sketch view, press and move the cursor to where you want the center of the circle to be. 2. Press . This turns on circle drawing. 3.
hp40g+.book Page 5 Friday, December 9, 2005 To label parts of a sketch 1:03 AM 1. Press and type the text on the edit line. To lock the Alpha shift on, press (for uppercase) or (for lowercase). To make the label a smaller character size, turn off before pressing .( is a toggle between small and large font size). The smaller character size cannot display lowercase letters. 2. Press . 3. Position the label where you want it by pressing the , 4. Press , , keys. again to affix the label. 5.
hp40g+.book Page 6 Friday, December 9, 2005 To import a graphics variable 1:03 AM You can copy the contents of a graphics variable into the Sketch view of an aplet. 1. Open the Sketch view of the aplet ( The graphic will be copied here. 2. Press , . 3. Highlight Graphic, then press name of the variable (G1, etc.). 4. Press variable. SKETCH). and highlight the to recall the contents of the graphics 5. Move the box to where you would like to copy the graphic, then press .
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM 4. Write your note. See “Note edit keys” on page 20-2 for more information on the entry and editing of notes. 5. When you are finished, press or an aplet key to exit Notepad. Your work is automatically saved. Notepad Catalog keys Key Meaning Opens the selected note for editing. Begins a new note, and asks for a name. Transmits the selected note to another HP 40gs or PC. Receives a note being transmitted from another HP 40gs or PC.
hp40g+.book Page 8 Friday, December 9, 2005 To import a note 1:03 AM You can import a note from the Notepad into an aplet’s Note view, and vice versa. Suppose you want to copy a note named “Assignments” from the Notepad into the Function Note view: 1. In the Function aplet, display the Note view ( NOTE). 2. Press , highlight Notepad in the left column, then highlight the name “Assignments” in the right column. 3. Press to copy the contents of “Assignments” to the Function Note view.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 21 Programming Introduction This chapter describes how to program using the HP 40gs. In this chapter you’ll learn about: HINT The Contents of a Program • using the Program catalog to create and edit programs • programming commands • storing and retrieving variables in programs • programming variables. More information on programming, including examples and special tools, can be found at HP’s calculators web site: http://www.hp.
hp40g+.book Page 2 Friday, December 9, 2005 Example 1:03 AM RUN GETVALUE: RUN CALCULATE: RUN "SHOW ANSWER": This program is separated into three main tasks, each an individual program. Within each program, the task can be simple—or it can be divided further into other programs that perform smaller tasks. Program catalog The Program catalog is where you create, edit, delete, send, receive, or run programs.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Program catalog keys The program catalog keys are: Key Meaning Opens the highlighted program for editing. Prompts for a new program name, then opens an empty program. Transmits the highlighted program to another HP 40gs or to a disk drive. Receives the highlighted program from another HP 40gs or from a disk drive. Runs the highlighted program. or Moves to the beginning or end of the Program catalog. Deletes the highlighted program.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM Creating and editing programs Create a new program 1. Press 2. Press PROGRM to open the Program catalog. . The HP 40gs prompts you for a name. A program name can contain special characters, such as a space. However, if you use special characters and then run the program by typing it in HOME, you must enclose the program name in double quotes (" "). Don't use the " symbol within your program name. 3. Type your program name, then press .
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM 2. On the left, use or to highlight a command category, then press to access the commands in the category. Select the command that you want. 3. Press editor. Edit a program to paste the command into the program 1. Press PROGRM to open the Program catalog. 2. Use the arrow keys to highlight the program you want to edit, and press . The HP 40gs opens the Program Editor. The name of your program appears in the title bar of the display.
hp40g+.book Page 6 Editing keys Friday, December 9, 2005 1:03 AM The editing keys are: Key Meaning Inserts the editing point. character at the Inserts space into text. Displays previous page of the program. Displays next page of the program. Moves up or down one line. Moves right or left one character. Alpha-lock for letter entry. Press A...Z to lock lower case. Backspaces cursor and deletes character. Deletes current character. Starts a new line. CLEAR Erases the entire program.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM Using programs Run a program From HOME, type RUN program_name. or From the Program catalog, highlight the program you want to run and press Regardless of where you start the program, all programs run in HOME. What you see will differ slightly depending on where you started the program. If you start the program from HOME, the HP 40gs displays the contents of Ans (Home variable containing the last result), when the program has finished.
hp40g+.book Page 8 Friday, December 9, 2005 Copy a program 1:03 AM You can use the following procedure if you want to make a copy of your work before editing—or if you want to use one program as a template for another. 1. Press 2. Press PROGRM to open the Program catalog. . 3. Type a new file name, then choose . The Program Editor opens with a new program. 4. Press to open the variables menu. 5. Press to quickly scroll to Program. 6. Press copy. , then highlight the program you want to 7.
hp40g+.book Page 9 Friday, December 9, 2005 Delete a program 1:03 AM To delete a program: 1. Press PROGRM to open the Program catalog. 2. Highlight a program to delete, then press Delete all programs You can delete all programs at once. 1. In the Program catalog, press 2. Press Delete the contents of a program . CLEAR. . You can clear the contents of a program without deleting the program name. 1. Press PROGRM to open the Program catalog. 2. Highlight a program, then press 3.
hp40g+.book Page 10 Friday, December 9, 2005 1:03 AM 4. Develop a program that uses the SETVIEWS command to modify the aplet’s VIEWS menu. The menu options provide links to associated programs. You can specify any other programs that you want transferred with the aplet. See “SETVIEWS” on page 21-14 for information on the command. 5. Ensure that the customized aplet is selected, then run the menu configuration program to configure the aplet’s VIEWS menu. 6.
hp40g+.book Page 11 Friday, December 9, 2005 Save the aplet 1:03 AM 1. Open the Function aplet and save it as “EXPERIMENT”. The new aplet appears in the Aplet library. Select Function EXPERIMENT 2. Create a program called EXP.ME1 with contents as shown. This program configures the plot ranges, then runs a program that allows you to set the angle format. 3. Create a program called EXP.ME2 with contents as shown.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM 6. Open the Program catalog and create a program named “EXP.SV”. Include the following code in the program. Each entry line after the command SETVIEWS is a trio that consists of a VIEWS menu text line (a space indicates none), a program name, and a number that defines the view to go to after the program has run its course. All programs listed here will transfer with an aplet when the aplet is transferred.
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM ’’’’;’’EXP.ANG’’;0; The program EXP.ANG is a small routine that is called by other programs that the aplet uses. This entry specifies that the program EXP.ANG is transferred when the aplet is transferred, but the space in the first quotes ensures that no entry appears on the menu. ’’Start’’;’’EXP.S’’;7: This specifies the Start menu option. The program that is associated with this entry, EXP.S, runs automatically when you start the aplet.
hp40g+.book Page 14 Friday, December 9, 2005 1:03 AM Aplet commands CHECK Checks (selects) the corresponding function in the current aplet. For example, Check 3 would check F3 if the current aplet is Function. Then a checkmark would appear next to F3 in Symbolic view, F3 would be plotted in Plot view, and evaluated in Numeric view. CHECK n: SELECT Selects the named aplet and makes it the current aplet. Note: Quotes are needed if the name contains spaces or other special characters.
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM options use, or the program that defines the aplet’s VIEWS menu. • You can include a “Start” option in the VIEWS menu to specify a program that you want to run automatically when the aplet starts. This program typically sets up the aplet’s initial configuration. The START option on the menu is also useful for resetting the aplet.
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM ProgramName ProgramName is the name of the program that runs when the corresponding menu entry is selected. All programs that are identified in the aplet’s SETVIEWS command are transferred when the aplet is transmitted. ViewNumber ViewNumber is the number of a view to start after the program finishes running.
hp40g+.
hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM Example 1X A : IF A==1 THEN MSGBOX " A EQUALS 1" : END: IF... THEN... ELSE... END Executes the true-clause sequence of commands if the testclause is true, or the false-clause sequence of commands if the test-clause is false. IF test-clause THEN true-clause ELSE false-clause END Example 1X A : IF A==1 THEN MSGBOX "A EQUALS 1" : ELSE MSGBOX "A IS NOT EQUAL TO 1" : A+1XA : END: CASE...
hp40g+.book Page 19 Friday, December 9, 2005 1:03 AM IFERR...THEN...ELSE...END allows a program to intercept error conditions that otherwise would cause the program to abort. Its syntax is: IFERR trap-clause THEN clause_1 ELSE clause_2 END : Example IFERR 60/X X Y: THEN MSGBOX "Error: X is zero.": ELSE MSGBOX "Value is "Y: END: RUN Runs the named program. If your program name contains special characters, such as a space, then you must enclose the file name in double quotes (" ").
hp40g+.book Page 20 Friday, December 9, 2005 1:03 AM Example ARC 0;0;2;0;2π: FREEZE: Draws a circle centered at (0,0) of radius 2. The FREEZE command causes the circle to remain displayed on the screen until you press a key. BOX Draws a box with diagonally opposite corners (x1,y1) and (x2,y2). BOX x1;y1;x2;y2: Example BOX -1;-1;1;1: FREEZE: Draws a box, lower corner at (–1,–1), upper corner at (1,1) ERASE Clears the display ERASE: FREEZE Halts the program, freezing the current display.
hp40g+.book Page 21 Friday, December 9, 2005 1:03 AM Example TLINE 0;0;3;3: Erases previously drawn 45 degree line from (0,0) to (3,3), or draws that line if it doesn’t already exist. Graphic commands The graphic commands use the graphics variables G0 through G9—or the Page variable from Sketch—as graphicname arguments. The position argument takes the form (x,y). Position coordinates depend on the current aplet’s scale, which is specified by Xmin, Xmax, Ymin, and Ymax.
hp40g+.book Page 22 GROBXOR Friday, December 9, 2005 1:03 AM Using the logical XOR, superimposes graphicname2 onto graphicname1. The upper left corner of graphicname2 is placed at position. GROBXOR graphicname1;(position);graphicname2: MAKEGROB Creates graphic with given width, height, and hexadecimal data, and stores it in graphicname. MAKEGROB graphicname;width;height;hexdata: PLOT→ Stores the Plot view display as a graphic in graphicname.
hp40g+.book Page 23 Friday, December 9, 2005 1:03 AM Loop commands Loop hp allow a program to execute a routine repeatedly. The HP 40gs has three loop structures. The example programs below illustrate each of these structures incrementing the variable A from 1 to 12. DO…UNTIL …END Do ... Until ... End is a loop command that executes the loop-clause repeatedly until test-clause returns a true (nonzero) result.
hp40g+.book Page 24 Friday, December 9, 2005 1:03 AM Matrix commands The matrix commands take variables M0–M9 as arguments. ADDCOL Add Column. Inserts values into a column before column_number in the specified matrix. You enter the values as a vector. The values must be separated by commas and the number of values must be the same as the number of rows in the matrix name. ADDCOL name;[value1,...,valuen];column_number: ADDROW Add Row.
hp40g+.book Page 25 Friday, December 9, 2005 REPLACE 1:03 AM Replaces portion of a matrix or vector stored in name with an object starting at position start. start for a matrix is a list containing two numbers; for a vector, it is a single number. Replace also works with lists and graphics. REPLACE name;start;object: SCALE Multiplies the specified row_number of the specified matrix by value.
hp40g+.book PRVAR Page 26 Friday, December 9, 2005 1:03 AM Prints name and contents of variablename. PRVAR variablename: You can also use the PRVAR command to print the contents of a program or a note. PRVAR programname;PROG: PRVAR notename;NOTE: Prompt commands BEEP Beeps at the frequency and for the time you specify. BEEP frequency;seconds: CHOOSE Creates a choose box, which is a box containing a list of options from which the user chooses one. Each option is numbered, 1 through n.
hp40g+.book Page 27 Friday, December 9, 2005 1:03 AM Example If you have stored {1,2,3,4} in variable L1, entering CLVAR L1 will clear L1. DISP Displays textitem in a row of the display at the line_number. A text item consists of any number of expressions and quoted strings of text. The expressions are evaluated and turned into strings. Lines are numbered from the top of the screen, 1 being the top and 7 being the bottom.
hp40g+.book Page 28 Friday, December 9, 2005 1:03 AM Examples 5.152000 X DATE(sets the date to May 15, 2000). 10.1500 X TIME (sets the time to 10:15 am). EDITMAT Matrix Editor. Opens the Matrix editor for the specified matrix. Returns to the program when user presses EDITMAT matrixname: The EDITMAT command can also be used to create matrices. 1. Press CMDS M 1, and then press 2. Press . The Matrix catalog opens with M1 available for editing.
hp40g+.book Page 29 Friday, December 9, 2005 1:03 AM Example INPUT R; "Circular Area"; "Radius"; "Enter Number";1: MSGBOX Displays a message box containing textitem. A text item consists of any number of expressions and quoted strings of text. The expressions are evaluated and turned into strings of text. For example, "AREA IS:" 2 +2 becomes AREA IS: 4. Use CHARS to type the quote marks " ".
hp40g+.book Page 30 Friday, December 9, 2005 1:03 AM Stat-One commands DO1VSTATS Calculates STATS using datasetname and stores the results in the corresponding variables: NΣ, TotΣ, MeanΣ, PVarΣ, SVarΣ, PSDev, SSDev, MinΣ, Q1, Median, Q3, and MaxΣ. Datasetname can be H1, H2, ..., or H5. Datasetname must include at least two data points. DO1VSTATS datasetname: SETFREQ Sets datasetname frequency according to column or value. Datasetname can be H1, H2,...
hp40g+.book Page 31 Friday, December 9, 2005 1:03 AM Storing and retrieving variables in programs The HP 40gs has both Home variables and Aplet variables. Home variables are used for real numbers, complex numbers, graphics, lists, and matrices. Home variables keep the same values in HOME and in aplets. Aplet variables are those whose values depend on the current aplet. The aplet variables are used in programming to emulate the definitions and settings you make when working with aplets interactively.
hp40g+.book Page 32 Coord Function Parametric Polar Sequence Solve Statistics Extremum Function FastRes Function Solve Friday, December 9, 2005 1:03 AM Turns the coordinate-display mode in Plot view on or off. From Plot view, use the Menu mean key to toggle coordinate display on an off. In a program, type 1 0 X X Coord—to turn coordinate display on (default). Coord—to turn coordinate display off. Contains the last value found by the Extremum operation in the Plot-FCN menu.
hp40g+.book Page 33 Hwidth Statistics Friday, December 9, 2005 1:03 AM Sets the width of histogram bars. From Plot Setup in 1VAR stats set a value for Hwidth or In a program, type n Indep All Aplets X Hwidth Defines the value of the independent variable used in tracing mode. In a program, type n InvCross All Aplets X Indep Toggles between solid crosshairs or inverted crosshairs. (Inverted is useful if the background is solid).
hp40g+.book Page 34 Nmin / Nmax Sequence Friday, December 9, 2005 1:03 AM Defines the minimum and maximum independent variable values. Appears as the NRNG fields in the Plot Setup input form. From Plot Setup, enter values for NRNG. or In a program, type n 1 XNmin n 2 XNmax where n 2 > n 1 Recenter Recenters at the crosshairs locations when zooming. All Aplets From Plot-Zoom-Set Factors, check (or uncheck) Recenter or In a program, type 1 0 Root X X Recenter— to turn recenter on (default).
hp40g+.book Page 35 Friday, December 9, 2005 Simult Function Parametric Polar Sequence Enables you to choose between simultaneous and sequential graphing of all selected expressions. From Plot Setup, check (or uncheck) _SIMULT or In a program, type 1 0 Slope Function StatPlot Statistics 1:03 AM X X Simult—for simultaneous graphing (default). Simult—for sequential graphing. Contains the last value found by the Slope function in the Plot-FCN menu.
hp40g+.book Page 36 Tmin / Tmax Parametric Friday, December 9, 2005 1:03 AM Sets the minimum and maximum independent variable values. Appears as the TRNG field in the Plot Setup input form. From Plot Setup, enter values for TRNG. or In a program, type n1 X Tmin n2 X Tmax where n 2 > n 1 Tracing All Aplets Turns the tracing mode on or off in Plot view. In a program, type 1 0 Tstep Parametric X X Tracing—to turn Tracing mode on (default). Tracing—to turn Tracing mode off.
hp40g+.book Page 37 Friday, December 9, 2005 Xtick AAll Aplets 1:03 AM Sets the distance between tick marks for the horizontal axis. From the Plot Setup input form, enter a value for Xtick. or In a program, type n Ytick All Aplets X Xtick where n > 0 Sets the distance between tick marks for the vertical axis. From the Plot Setup input form, enter a value for Ytick.
hp40g+.book Page 38 Xzoom All Aplets Friday, December 9, 2005 1:03 AM Sets the horizontal zoom factor. From Plot-ZOOM-Set Factors, enter the value for XZOOM. or In a program, type n X XZOOM where n > 0 The default value is 4. Yzoom All Aplets Sets the vertical zoom factor. From Plot-ZOOM-Set Factors, enter the value for YZOOM. or In a program, type n X YZOOM The default value is 4. Symbolic-view variables Angle All Aplets Sets the angle mode.
hp40g+.book Page 39 Friday, December 9, 2005 X1, Y1...X9,Y9 X0,Y0 Parametric 1:03 AM Can contain any expression. Independent variable is T. Example 'SIN(4*T)' X1(T) R1...R9, R0 Polar Sequence Example X R1(θ) Can contain any expression. Independent variable is N. Example RECURSE (U,U(N-1)*N,1,2) E1...E9, E0 Solve X Can contain any expression. Independent variable is θ. '2*SIN(2*θ)' U1...U9, U0 Y1(T):'2*SIN(6*T)' X X U1(N) Can contain any equation or expression.
hp40g+.book Page 40 Friday, December 9, 2005 1:03 AM Example Cubic X S2fit or 6 X S2fit Numeric-view variables The following aplet variables control the Numeric view. The value of the variable applies to the current aplet only. C1...C9, C0 Statistics C0 through C9, for columns of data. Can contain lists. Enter data in the Numeric view or In a program, type LIST XCn where n = 0, 1, 2, 3 ...
hp40g+.book Page 41 Friday, December 9, 2005 1:03 AM 1 Standard 2 Fixed 3 Sci 4 Eng 5 Fraction 6 MixFraction Note: if Fraction or Mixed Fraction is chosen, the setting will be disregarded when labeling axes in the Plot view. A setting of Scientific will be used instead. Example Scientific X Format or 3 X Format NumCol Sets the column to be highlighted in Numeric view. All Aplets except Statistics aplet In a program, type n X NumCol where n can be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
hp40g+.book Page 42 NumStart Function Parametric Polar Sequence Friday, December 9, 2005 Sets the starting value for a table in Numeric view. From Num Setup, enter a value for NUMSTART. or In a program, type n NumStep Function Parametric Polar Sequence 1:03 AM X NumStart Sets the step size (increment value) for an independent variable in Numeric view. From Num Setup, enter a value for NUMSTEP.
hp40g+.book Page 43 Friday, December 9, 2005 1:03 AM Example 1VAR X StatMode or 1 X StatMode Note variables The following aplet variable is available in Note view. NoteText All Aplets Use NoteText to recall text previously entered in Note view. Sketch variables The following aplet variables are available in Sketch view. Page All Aplets Sets a page in a sketch set. The graphics can be viewed one at a time using the and keys.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM 22 Extending aplets Aplets are the application environments where you explore different classes of mathematical operations. You can extend the capability of the HP 40gs in the following ways: • Create new aplets, based on existing aplets, with specific configurations such as angle measure, graphical or tabular settings, and annotations. • Transmit aplets between HP 40gs calculators via a serial or USB cable.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM 1. Open the Solve aplet and save it under the new name. Solve | TRIANGLES 2. Enter the four formulas: θ O H θ A H θ O A A B C 3. Decide whether you want the aplet to operate in Degrees, Radians, or Grads. MODES Degrees 4. View the Aplet Library. The “TRIANGLES” aplet is listed in the Aplet Library. The Solve aplet can now be reset and used for other problems.
hp40g+.book Page 3 Friday, December 9, 2005 1:03 AM Using a customized aplet To use the “Triangles” aplet, simply select the appropriate formula, change to the Numeric view and solve for the missing variable. Find the length of a ladder leaning against a vertical wall if it forms an angle of 35o with the horizontal and extends 5 metres up the wall. 1. Select the aplet. TRIANGLES 2. Choose the sine formula in E1. 3. Change to the Numeric view and enter the known values. 35 5 4.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM Annotating an aplet with notes The Note view ( NOTE) attaches a note to the current aplet. See Chapter 20, “Notes and sketches”. Annotating an aplet with sketches The Sketch view ( SKETCH) attaches a picture to the current aplet. See chapter 20, “Notes and sketches”. HINT Notes and sketches that you attach to an aplet become part of the aplet. When you transfer the aplet to another calculator, the associated note and sketch are transferred as well.
hp40g+.book Page 5 Friday, December 9, 2005 To transmit an aplet 1:03 AM 1. Connect the PC or aplet disk drive to the calculator by an appropriate cable. 2. Sending calculator: Open the Library, highlight the aplet to send, and press . – The SEND TO menu appears with the following options: HP39/40 (USB) = to send via the USB port HP39/40 (SER) = to send via the RS232 serial port USB DISK DRIVE = to send to a disk drive via the USB port = to send to a disk drive via the RS232 serial port SER.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM If you are using the PC Connectivity Kit to download aplets from a PC, you will see a list of aplets in the PC’s current directory. Check as many items as you would like to receive. Sorting items in the aplet library menu list Once you have entered information into an aplet, you have defined a new version of an aplet. The information is automatically saved under the current aplet name, such as “Function.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM R Reference information Glossary aplet A small application, limited to one topic. The built-in aplet types are Function, Parametric, Polar, Sequence, Solve, Statistics, Inference, Finance, Trig Explorer, Quad Explorer, Linear Explorer and Triangle Solve. An aplet can be filled with the data and solutions for a specific problem. It is reusable (like a program, but easier to use) and it records all your settings and definitions.
hp40g+.book R-2 Page 2 Friday, December 9, 2005 1:03 AM list A set of values separated by commas (periods if the Decimal Mark mode is set to Comma) and enclosed in braces. Lists are commonly used to enter statistical data and to evaluate a function with multiple values. Created and manipulated by the List editor and catalog. matrix A two-dimensional array of values separated by commas (periods if the Decimal Mark mode is set to Comma) and enclosed in nested brackets.
ReferenceInfo.fm Page 3 Friday, December 16, 2005 views 11:26 AM The possible contexts for an aplet: Plot, Plot Setup, Numeric, Numeric Setup, Symbolic, Symbolic Setup, Sketch, Note, and special views like split screens. Resetting the HP 40gs If the calculator “locks up” and seems to be stuck, you must reset it. This is much like resetting a PC. It cancels certain operations, restores certain conditions, and clears temporary memory locations.
hp40g+.book Page 4 Friday, December 9, 2005 1:03 AM If the calculator does not turn on If the HP 40gs does not turn on follow the steps below until the calculator turns on. You may find that the calculator turns on before you have completed the procedure. If the calculator still does not turn on, please contact Customer Support for further information. 1. Press and hold the key for 10 seconds. 2. Press and hold the key and the third menu key simultaneously.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM To install the main batteries a. Slide up the battery compartment cover as illustrated. To install the backup battery a. Press down the holder. Push the plate to the shown direction and lift it. b. Insert 4 new AAA (LR03) batteries into the main compartment. Make sure each battery is inserted in the indicated direction. b. Insert a new CR2032 lithium battery. Make sure its positive (+) side is facing up. c.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Variables Home variables The home variables are: R-6 Category Available name Complex Z1...Z9, Z0 Graphic G1...G9, G0 Library Function Parametric Polar Sequence Solve Statistics User-named List L1...L9, L0 Matrix M1...M9, M0 Modes Ans Date HAngle HDigits HFormat Ierr Time Notepad User-named Program Editline User-named Real A...
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.book Page 12 Friday, December 9, 2005 1:03 AM Statistics aplet variables The statistics aplet variables are: R-12 Category Available name Plot Axes Connect Coord Grid Hmin Hmax Hwidth Indep InvCross Labels Recenter S1mark S2mark S3mark S4mark S5mark StatPlot Tracing Xcross Ycross Xtick Ytick Xmin Xmax Ymin Ymax Xzoom Yxoom Symbolic Angle S1fit S2fit S3fit S4fit S5fit Numeric C0,...
hp40g+.book Page 13 Friday, December 9, 2005 1:03 AM MATH menu categories Math functions The math functions are: Category Available name Calculus ∂ ∫ TAYLOR Complex ARG CONJ IM RE Constant e i MAXREAL MINREAL π Hyperb.
hp40g+.book R-14 Page 14 Friday, December 9, 2005 1:03 AM Category Available name (Continued) Matrix COLNORM COND CROSS DET DOT EIGENVAL EIGENVV IDENMAT INVERSE LQ LSQ LU MAKEMAT QR RANK ROWNORM RREF SCHUR SIZE SPECNORM SPECRAD SVD SVL TRACE TRN Polynom. POLYCOEF POLYEVAL POLYFORM POLYROOT Prob.
hp40g+.book Page 15 Friday, December 9, 2005 1:03 AM Category Available name (Continued) Tests < ≤ == ≠ > ≥ AND IFTE NOT OR XOR Trig ACOT ACSC ASEC COT CSC SEC Program constants The program constants are: Category Available name Angle Degrees Grads Radians Format Standard Fixed SeqPlot Cobweb Stairstep S1...
hp40g+.book Page 16 Friday, December 9, 2005 1:03 AM Physical Constants The physical constants are: Category Available Name Chemist • Avogadro (Avagadro’s Number, NA) • Boltz. (Boltmann, k) • mol. vo... (molar volume, Vm) • univ gas (universal gas, R) • std temp (standard temperature, St dT) • std pres (standard pressure, St dP) Phyics • • • • • Quantum • • • • • • • StefBolt (Stefan-Boltzmann, σ) light s... (speed of light, c) permitti (permittivity, ε0) permeab (permeability, μ0) acce gr...
hp40g+.book Page 17 Friday, December 9, 2005 1:03 AM CAS functions CAS functions are: Category Function Algebra COLLECT DEF EXPAND FACTOR PARTFRAC QUOTE STORE | SUBST TEXPAND UNASSIGN Complex i ABS ARG CONJ DROITE IM – RE SIGN Constant e i ∞ π Diff & Int DERIV DERVX DIVPC FOURIER IBP INTVX lim PREVAL RISCH SERIES TABVAR TAYLOR0 TRUNC Hyperb.
hp40g+.book R-18 Page 18 Friday, December 9, 2005 1:03 AM Category Function (Continued) Polynom.
hp40g+.
hp40g+.book Page 20 Friday, December 9, 2005 1:03 AM Category Command (Continued) Stat-Two DO2VSTATS SETDEPEND SETINDEP Status messages Message Meaning Bad Argument Type Incorrect input for this operation. Bad Argument Value The value is out of range for this operation. Infinite Result Math exception, such as 1/0. Insufficient Memory You must recover some memory to continue operation.
hp40g+.book Page 21 Friday, December 9, 2005 1:03 AM Message Meaning (Continued) Invalid Syntax The function or command you entered does not include the proper arguments or order of arguments. The delimiters (parentheses, commas, periods, and semi-colons) must also be correct. Look up the function name in the index to find its proper syntax. Name Conflict The | (where) function attempted to assign a value to the variable of integration or summation index.
hp40g+.
hp40g+.book Page 1 Friday, December 9, 2005 1:03 AM Limited Warranty HP 40gs Graphing Calculator; Warranty period: 12 months 1. 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. If HP receives notice of such defects during the warranty period, HP will, at its option, either repair or replace products which prove to be defective.
hp40g+.book Page 2 Friday, December 9, 2005 1:03 AM 6. HP MAKES NO OTHER EXPRESS WARRANTY OR CONDITION WHETHER WRITTEN OR ORAL. TO THE EXTENT ALLOWED BY LOCAL LAW, ANY IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY, SATISFACTORY QUALITY, OR FITNESS FOR A PARTICULAR PURPOSE IS LIMITED TO THE DURATION OF THE EXPRESS WARRANTY SET FORTH ABOVE. Some countries, states or provinces do not allow limitations on the duration of an implied warranty, so the above limitation or exclusion might not apply to you.
hp40g+.
hp40g+.book Page 4 Friday, December 9, 2005 L.America 1:03 AM Country: Telephone numbers Argentina 0-810-555-5520 Brazil Sao Paulo 3747-7799; ROTC 0-800-157751 Mexico Mx City 5258-9922; ROTC 01-800-472-6684 Venezuela 0800-4746-8368 Chile 800-360999 Columbia 9-800-114726 Peru 0-800-10111 Central America & Caribbean 1-800-711-2884 Guatemala 1-800-999-5105 Puerto Rico 1-877-232-0589 Costa Rica 0-800-011-0524 N.America Country : Telephone numbers U.S.
hp40g+.book Page 5 Friday, December 9, 2005 1:03 AM Regulatory Notices Federal Communications Commission Notice This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation.
hp40g+.book Page 6 Friday, December 9, 2005 1:03 AM Hewlett-Packard Company P. O. Box 692000, Mail Stop 530113 Houston, Texas 77269-2000 Or, call 1-800-474-6836 For questions regarding this FCC declaration, contact: Hewlett-Packard Company P. O. Box 692000, Mail Stop 510101 Houston, Texas 77269-2000 Or, call 1-281-514-3333 To identify this product, refer to the part, series, or model number found on the product.
hp40g+.book Page 7 Friday, December 9, 2005 Japanese Notice 1:03 AM こ の装置は、 情報処理装置等電波障害自主規制協議会 (VCCI) の基準に基づ く ク ラ ス B 情報技術装置です。 こ の装 置は、 家庭環境で使用する こ と を目的 と し ていますが、 この 装置がラ ジオやテ レ ビ ジ ョ ン受信機に近接 し て使用 さ れる と 、 受信障害を引き起 こ す こ と があ り ます。 取 り 扱い説明書に従っ て正 し い取 り 扱い を し て く だ さ い。 Korean Notice Disposal of Waste Equipment by Users in Private Household in the European Union This symbol on the product or on its packaging indicates that this product must not be disposed of with your other household waste.
hp40g+.
hp40g+.
hp40g+.book Page 2 Friday, December 9, 2005 bad guesses error message 7-7 batteries R-4 Bernoulli’s number 14-65 box-and-whisker plot 10-16 branch commands CASE...END 21-18 IF...THEN...ELSE...END 21-18 IFERR...THEN...
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.
hp40g+.