HP 15c Manual
Have a look at the manual HP 15c Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 1114 HP manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.
Section 14: Numerical Integration 201 Because the accuracy of any integral is limited by the accuracy of the function (as indicated in the display format), the calculator cannot compute the value of an integral exactly, but rather only approximates it. The HP-15C places the uncertainty* of an integrals approximation in the Y- register at the same time it places the approximation in the X-register. To determine the accuracy of an approximation, check its uncertainty by pressing ®. Example: With the display format set to i 2, calculate the integral in the expression for J1(1) (from the example on page 197). Keystrokes Display 0 v 0.0000 Key lower limit into Y-register. |$ 3.1416 Key upper limit into X-register. | R 3.1416 (If not already in Radians mode.) ´ i 2 3.14 00 Set display format to i 2. ´ f 1 1.3 8 00 Integral approximated in i 2. ® 1.8 8 - 03 Uncertainty of i 2 approximation. The integral is 1.38 ± 0.00188. Since the uncertainty would not affect the approximation until its third decimal place, you can consider all the displayed digits in this approximation to be accurate. In general, though, it is difficult to anticipate how many digits in an approximation will be unaffected by its uncertainty. This depends on the particular function being integrated, the limits of integration, and the display format. * No algorithm for numerical integration can compute the exact difference between its approximation and the actual integral. But the algorithm in the HP-15C estimates an ―upper bound‖ on this difference, which is the uncertainty of the approximation. For example, if the integral Si (2) is 1.6054 ± 0.0001, the approximation to the integral is 1.6054 and its uncertainty is 0.0001. This means that while we dont know the exact difference between the actual integral and its approximation, we do know that it is highly unlikely that the difference is bigger than 0.0001. (Note the first footnote on page 200.)
202 Section 14: Numerical Integration If the uncertainty of an approximation is larger than what you choose to tolerate, you can decrease it by specifying a greater number of digits in the display format and repeating the approximation.* Whenever you want to repeat an approximation, you dont need to key the limits of integration back into the X- and Y-registers. After an integral is calculated, not only are the approximation and its uncertainty placed in the X- and Y-registers, but in addition the upper limit of integration is placed in the Z-register, and the lower limit is placed in the T-register. To return the limits to the X- and Y-registers for calculating an integral again, simply press ) ). Example: For the integral in the expression for J1(l), you want an answer accurate to four decimal places instead of only two. Keystrokes Display ´ i 4 1.8826 -03 Set display format to i 4. )) 3.1416 00 Roll down stack until upper limit appears in X-register. ´f 1 1.3825 00 Integral approximated in i4. ® 1.7091 -05 Uncertainty of i 4 approximation. The uncertainty indicates that this approximation is accurate to at least four decimal places. Note that the uncertainty of the i 4 approximation is about one-hundredth as large as the uncertainty of the i 2 approximation. In general, the uncertainty of any f approximation decreases by about a factor of 10 for each additional digit specified in the display format. * Provided that f(x) is still calculated accurately to the number of digits shown in the display.
Section 14: Numerical Integration 203 In the preceding example, the uncertainty indicated that the approximation might be correct to only four decimal places. If we temporarily display all 10 digits of the approximation, however, and compare it to the actual value of the integral (actually, an approximation known to be accurate to a sufficient number of decimal places), we find that the approximation is actually more accurate than its uncertainty indicates. Keystrokes Display ® 1.382 5 00 Return approximation to display. ´ CLEAR u 1382459676 All 10 digits of approximation. The value of this integral, correct to eight decimal places, is 1.38245969. The calculators approximation is accurate to seven decimal places rather than only four. In fact, since the uncertainty of an approximation is calculated very conservatively, the calculators approximation, in most cases will be more accurate than its uncertainty indicates. However, normally there is no way to determine just how accurate an approximation is. For a more detailed look at the accuracy and uncertainty of f approximations, refer to appendix E. Using f in a Program f can appear as an instruction in a program provided that the program is not called (as a subroutine) by f itself. In other words, f cannot be used recursively. Consequently, you cannot use f to calculate multiple integrals; if you attempt to do so, the calculator will halt with Error 7 in the display. However, f can appear as an instruction in a subroutine called by _. The use of f as an instruction in a program utilizes one of the seven pending returns in the calculator. Since the subroutine called by f utilizes another return, there can be only five other pending returns. Executed from the keyboard, on the other hand, f itself does not utilize one of the pending returns, so that six pending returns are available for subroutines within the subroutine called by f Remember that if all seven pending returns have been utilized, a call to another subroutine will result in a display of Error 5. (Refer to page 105.)
204 Section 14: Numerical Integration Memory Requirements f requires 23 registers to operate. (Appendix C explains how they are automatically allocated from memory.) If 23 unoccupied registers are not available, f will not run and Error 10 will be displayed. A routine that combines f and _ also requires 23 registers of space. For Further Information This section has given you the information you need to use f with confidence over a wide range of applications. In appendix E, more esoteric aspects of f are discussed. These include: How f works. Accuracy, uncertainty, and calculation time. Uncertainty and the display format. Conditions that could cause incorrect results. Conditions that prolong calculation time. Obtaining the current approximation to an integral.
205 Appendix A Error Conditions If you attempt a calculation containing an improper operation – say division by zero – the display will show Error and a number. To clear an error message, press any one key. This also restores the display prior to the Error display. The HP-15C has the following error messages. (The description of Error 2 includes a list of statistical formulas used.) Error 0: Improper Mathematics Operation Illegal argument to math routine: ÷, where x = 0. y, where: out of Complex mode, y < 0 and x is noninteger; out of Complex mode, y = 0 and x ≤ 0; or in Complex mode, y = 0 and Re(x) ≤ 0. ¤, where, out of Complex mode, x < 0. ∕, where x = 0. o, where: out of Complex mode, x ≤ 0; or in Complex mode, x = 0. Z, where: out of Complex mode, x ≤ 0; or in Complex mode, x = 0. ,, where, out of Complex mode, │x│> l. {, where, out of Complex mode, │x│> l. O ÷, where x = 0. l ÷, where the contents of the addressed register = 0. ∆, where the value in the Y-register is 0. H \, where, out of Complex mode, x< 1. H ], where, out of Complex mode, │x│> 1. c p, where:
206 Appendix A: Error Conditions x or y is noninteger; x < 0 or y < 0; x > y; x or y ≥ 1010. Error 1: Improper Matrix Operation Applying an operation other than a matrix operation to a matrix, that is, attempting a nonmatrix operation while a matrix is in the relevant register (whether the X- or Y-register or a storage register). Error 2: Improper Statistics Operation ’ n = 0 S n ≤ 1 j n ≤ 1 L n ≤ 1 Error 2 is also displayed if division by zero or the square root of a negative number would be required during computation with any of the following formulas: where: M = nΣx2 – (Σx)2 N = nΣy2 – (Σy)2 P = nΣxy – ΣxΣy (A and B are the values returned by the operation L, where y= Ax + B.) n xx n yy 1)(n n M xs 1)(n n N ys NM Pr M PA Mn xPyMB Mn xxnPyMy ˆ
Appendix A: Error Conditions 207 Error 3: Improper Register Number or Matrix Element Storage register named is nonexistent or matrix element indicated is nonexistent. Error 4: Improper Line Number or Label Call Line number called for is currently unoccupied or nonexistent (>448); or you have attempted to load a program line without available space; or the label called does not exist; or User mode is on and you did not press ´ before ¤, , @, y or ∕. Error 5: Subroutine Level Too Deep Subroutine nested more than seven deep. Error 6: Improper Flag Number Attempted a flag number >9. Error 7: Recursive _ or f A subroutine which is called by _ also contains a _ instruction; a subroutine which is called by f also contains an f instruction. Error 8: No Root _ unable to find a root using given estimates. Error 9: Service Self-test discovered circuitry problem, or wrong key pressed during key test. Error 10: Insufficient Memory There is not enough memory available to perform a given operation. Error 11: Improper Matrix Argument Inconsistent or improper matrix arguments for a given matrix operation:
208 Appendix A: Error Conditions + or -, where the dimensions are incompatible. *, where: the dimensions are incompatible; or the result is one of the arguments. ∕, where the matrix is not square. scalar/matrix ÷, where the matrix is not square. ÷, where: the matrix in the X-register is not square; the dimensions are incompatible; or the result is the matrix in the X-register. > 2, where the input is a scalar; or the number of rows is odd. > 3, where the input is a scalar; or the number of columns is odd. > 4, where the input is scalar. > 5, where: the input is a scalar; the dimensions are incompatible; or the result is one of the arguments. > 6, where: the input is scalar; the dimensions are incompatible (including the result); or the result is one of the arguments. > 9, where the matrix is not square. l m V, where contents of RI are scalar. m V, where contents of RI are scalar. O
209 Appendix B Stack Lift and the LAST X Register The HP-15C calculator has been designed to operate in a natural manner. As you have seen working through this handbook, most calculations do not require you to think about the operation of the automatic memory stack. There are occasions, however – especially as you delve into programming – when you need to know the effect of a particular operation upon the stack. The following explanation should help you. Digit Entry Termination Most operations on the calculator, whether executed as instructions in a program or pressed from the keyboard, terminate digit entry. This means that the calculator knows that any digits you key in after any of these operations are part of a new number. The only operations that do not terminate digit entry are the digit entry keys themselves: 0 through 9 “ − . ‛ Stack Lift There are three types of operations on the calculator based on how they affect stack lift. These are stack-disabling operations, stack-enabling operations, and neutral operations. When the calculator is in Complex mode, each operation affects both the real and imaginary stacks. The stack lift effects are the same. In addition, the number keyed into the display (real X-register) after any operation except − or ` is accompanied by the placement of a zero in the imaginary X-register.
210 Appendix B: Stack Lift and the LAST X Register Disabling Operations Stack Lift. There are four stack-disabling operations on the calculator.* These operations disable the stack lift, so that a number keyed in after one of these disabling operations writes over the current number in the displayed X-register and the stack does not lift. These special disabling operations are: v ` z w Imaginary X-Register. A zero is placed in the imaginary X-register when the next number following v, z, or w is keyed or recalled into the display (real X-register). However, the next number keyed in or recalled after − or ` does not change the contents of the imaginary X- register. Enabling Operations Stack Lift. Most of the operations on the keyboard, including one-and two- number mathematical functions like x and *, are stack-enabling operations. This means that a number keyed in after one of these operations will lift the stack (because the stack has been ―enabled‖ to lift). Both the real and imaginary stacks are affected. (Recall that a shaded X-register means that its contents will be written over when the next number is keyed in or recalled.) T t z y y Z z y x x Y y x 4.0000 4.0000 X x 4 4.0000 3 Keys: 4 v 3 (Assumes stack enabled.) Stack lifts. Stack disabled. No stack lift. * Refer to footnote, page 36.