17302
861
Zoom out
Zoom in
Vorherige Seite
1/864
Nächste Seite
hp 48gII graphing calculator
user’s guide
H
Edition 4
HP part number F2226-90020
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. SHALL NOT BE LIABLE FOR ANY ERRORS
OR FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN
CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE
OF THIS MANUAL OR THE EXAMPLES CONTAINED HEREIN.
© Copyright 2003 Hewlett-Packard Development Company, L.P.
Reproduction, adaptation, or translation of this manual is prohibited without
prior written permission of Hewlett-Packard Company, except as allowed
under the copyright laws.
Hewlett-Packard Company
4995 Murphy Canyon Rd,
Suite 301
San Diego,CA 92123
Printing History
Edition 4 April 2004
Preface
You have in your hands a compact symbolic and numerical computer that will
facilitate calculation and mathematical analysis of problems in a variety of
disciplines, from elementary mathematics to advanced engineering and
science subjects. Although referred to as a calculator, because of its
compact format resembling typical hand-held calculating devices, the hp 48gII
should be thought of as a graphics/programmable hand-held computer.
The hp 48gII can be operated in two different calculating modes, the Reverse
Polish Notation (RPN) mode and the Algebraic (ALG) mode (see page 1-11 in
user’s guide for additional details). The RPN mode was incorporated into
calculators to make calculations more efficient. In this mode, the operands in
an operation (e.g., ‘2’ and ‘3’ in the operation ‘2+3’) are entered into the
calculator screen, referred to as the stack, and then the operator (e.g., ‘+’ in
the operation ‘2+3’) is entered to complete the operation. The ALG mode, on
the other hand, mimics the way you type arithmetic expressions in paper.
Thus, the operation ‘2+3’, in ALG mode, will be entered in the calculator by
pressing the keys ‘2’,+’, and ‘3, in that order. To complete the operation
we use the ENTER key. Examples of applications of the different functions
and operations in this calculator are illustrated in this user’s guide in both
modes.
This guide contains examples that illustrate the use of the basic calculator
functions and operations. The chapters in this user’s guide are organized by
subject in order of difficulty. Starting with the setting of calculator modes and
display options, and continuing with real and complex number calculations,
operations with lists, vectors, and matrices, detailed examples of graph
applications, use of strings, basic programming, graphics programming,
string manipulation, advanced calculus and multivariate calculus applications,
advanced differential equations applications (including Laplace transform,
and Fourier series and transforms), and probability and statistic applications.
For symbolic operations the calculator includes a powerful Computer
Algebraic System (CAS) that lets you select different modes of operation, e.g.,
complex numbers vs. real numbers, or exact (symbolic) vs. approximate
(numerical) mode. The display can be adjusted to provide textbook-type
expressions, which can be useful when working with matrices, vectors,
fractions, summations, derivatives, and integrals. The high-speed graphics of
the calculator are very convenient for producing complex figures in very little
time.
Thanks to the infrared port and the RS 232 cable available with your
calculator, you can connect your calculator with other calculators or
computers. The high-speed connection through infrared or RS 232 allows the
fast and efficient exchange of programs and data with other calculators or
computers. The calculator provides a flash memory card port to facilitate
storage and exchange of data with other users.
The programming capabilities of the calculator allow you or other users to
develop efficient applications for specific purposes. Whether it is advanced
mathematical applications, specific problem solution, or data logging, the
programming languages available in your calculator make it into a very
versatile computing device.
We hope your calculator will become a faithful companion for your school
and professional applications.
Page TOC-1
Table of contents
A note about screenshots in this guide, Note-1
Chapter 1 - Getting started, 1-1
Basic Operations, 1-1
Batteries, 1-1
Turning the calculator on and off, 1-2
Adjusting the display contrast, 1-2
Contents of the calculator’s display, 1-2
Menus, 1-3
SOFT menus vs. CHOOSE boxes, 1-3
Selecting SOFT menus or CHOOSE boxes, 1-4
The TOOL menu, 1-6
Setting time and date, 1-7
Introducing the calculator’s keyboard, 1-10
Setting calculator’s mode, 1-11
Operating mode, 1-12
Number format and decimal dot or comma, 1-16
Angle measure, 1-21
Coordinate system, 1-22
Beep, Key Click, and Last Stack, 1-23
Selecting CAS settings, 1-24
Selecting Display modes, 1-24
Selecting the display font, 1-25
Selecting properties of the line editor, 1-26
Selecting properties of the Stack, 1-26
Selecting properties of the Equation Writer (EQW), 1-27
Selecting the size of the header, 1-28
Selecting the clock display, 1-28
Chapter 2 - Introducing the calculator, 2-1
Calculator objects, 2-1
Editing expressions in the screen, 2-3
Creating arithmetic expressions, 2-3
Editing arithmetic expressions, 2-6
Page TOC-2
Creating algebraic expressions, 2-7
Editing algebraic expressions, 2-8
Using the Equation Writer (EQW) to create expressions, 2-10
Creating arithmetic expressions, 2-11
Editing arithmetic expressions, 2-16
Creating algebraic expressions, 2-19
Editing algebraic expressions, 2-20
Creating and editing summations, derivatives, and integrals, 2-28
Organizing data in the calculator, 2-32
Functions for manipulation of variables, 2-33
The HOME directory, 2-34
The CASDIR sub-directory, 2-35
Typing directory and variable names, 2-37
Creating sub-directories, 2-38
Moving among sub-directories, 2-42
Deleting sub-directories, 2-42
Variables, 2-46
Creating variables, 2-46
Checking variable contents, 2-51
Replacing the contents of variables, 2-53
Copying variables, 2-54
Reordering variables in a directory, 2-57
Moving variables using the FILES menu, 2-58
Deleting variables, 2-59
UNDO and CMD functions, 2-61
Flags, 2-62
Example of flag setting: general solution vs. principal value, 2-63
Other flags of interest, 2-64
CHOOSE boxes vs. SOFT menus, 2-65
Selected CHOOSE boxes, 2-66
Chapter 3 - Simple calculations with real numbers, 3-1
Checking calculator settings, 3-1
Checking calculator mode, 3-2
Real number calculations, 3-2
Changing sing of a number, variable, or expression, 3-3
Page TOC-3
The inverse function, 3-3
Addition, subtraction, multiplication, division, 3-3
Using parentheses, 3-4
Absolute value function, 3-4
Squares and square roots, 3-4
Powers and roots, 3-5
Base-10 logarithms and powers of 10, 3-5
Using powers of 10 in entering data, 3-5
Natural logarithms and exponential function, 3-6
Trigonometric functions, 3-6
Inverse trigonometric functions, 3-6
Differences between functions and operators, 3-7
Real number functions in the MTH menu, 3-7
Hyperbolic functions and their inverses, 3-9
Real number functions, 3-11
Special functions, 3-14
Calculator constants, 3-16
Operation with units, 3-17
The UNITS menu, 3-17
Available units, 3-18
Converting to base units, 3-21
Attaching units to numbers, 3-22
Operations with units, 3-25
Units manipulation tools, 3-27
Physical constants in the calculator, 3-28
Special physical functions, 3-31
Function ZFACTOR, 3-32
Function F0λ, 3-32
Function SIDENS, 3-32
Function TDELTA, 3-33
Function TINC, 3-33
Defining and using functions, 3-33
Functions defined by more than one expression, 3-35
The IFTE function, 3-35
Combined IFTE functions, 3-36
Page TOC-4
Chapter 4 - Calculations with complex numbers, 4-1
Definitions, 4-1
Setting the calculator to COMPLEX mode, 4-1
Entering complex numbers, 4-2
Polar representation of a complex number, 4-3
Simple operations with complex numbers, 4-4
Changing sign of a complex number, 4-4
Entering the unit imaginary number, 4-5
The CMPLX menus, 4-5
CMPLX menu through the MTH menu, 4-5
CMPLX menu in keyboard, 4-7
Functions applied to complex numbers, 4-8
Functions from the MTH menu, 4-8
Function DROITE: equation of a straight line, 4-9
Chapter 5 - Algebraic and arithmetic operations, 5-1
Entering algebraic objects, 5-1
Simple operations with algebraic objects, 5-2
Functions in the ALG menu, 5-3
COLLECT, 5-5
EXPAND, 5-5
FACTOR, 5-5
LNCOLLECT, 5-5
LIN, 5-5
PARTFRAC, 5-5
SOLVE, 5-5
SUBST, 5-5
TEXPAND, 5-5
Other forms of substitution in algebraic expressions, 5-6
Operations with transcendental functions, 5-7
Expansion and factoring using log-exp functions, 5-8
Expansion and factoring using trigonometric functions, 5-8
Functions in the ARITHMETIC menu, 5-9
DIVIS, 5-10
Page TOC-5
FACTORS, 5-10
LGCD, 5-10
PROPFRAC, 5-10
SIMP2, 5-10
INTEGER menu, 5-10
POLYNOMIAL menu, 5-11
MODULO menu, 5-12
Applications of the ARITHMETIC menu, 5-12
Modular arithmetic, 5-12
Finite arithmetic in the calculator, 5-15
Polynomials, 5-18
Modular arithmetic with polynomials, 5-19
The CHINREM function, 5-19
The EGCD function, 5-19
The GCD function, 5-19
The HERMITE function, 5-20
The HORNER function, 5-20
The variable VX, 5-20
The LAGRANGE function, 5-21
The LCM function, 5-21
The LEGENDRE function, 5-22
The PCOEF function, 5-22
The PROOT function, 5-22
The PTAYL function, 5-22
The QUOTIENT and REMAINDER functions, 5-23
The EPSX0 function and the CAS variable EPS, 5-23
The PEVAL function, 5-23
The TCHEBYCHEFF function, 5-24
Fractions, 5-24
The SIMP2 function, 5-24
The PROPFRAC function, 5-24
The PARTFRAC function, 5-25
The FCOEF function, 5-25
The FROOTS function, 5-26
Step-by-step operations with polynomial fractions, 5-26
The CONVERT menu and algebraic operations, 5-27
Page TOC-6
UNITS convert menu, 5-27
BASE convert menu, 5-28
TRIGONOMETRIC convert menu, 5-28
MATRICES convert menu, 5-28
REWRITE convert menu, 5-28
Chapter 6 - Solution to single equations
, 6-1
Symbolic solution of algebraic equations, 6-2
Function ISOL, 6-1
Function SOLVE, 6-2
Function SOLVEVX, 6-4
Function ZEROS, 6-4
Numerical solver menu, 6-5
Polynomial equations, 6-6
Financial calculations, 6-9
Solving equations with one unknown through NUM.SLV, 6-14
The SOLVE soft menu, 6-27
The ROOT sub-menu, 6-27
Function ROOT, 6-27
Variable EQ, 6-28
The SOLVR sub-menu, 6-28
The DIFFE sub-menu, 6-30
The POLY sub-menu, 6-30
The SYS sub-menu, 6-31
The TVM sub-menu, 6-31
Chapter 7 - Solving multiple equations, 7-1
Rational equation systems, 7-1
Example 1 - Projectile motion, 7-1
Example 2 - Stresses in a thick wall cylinder, 7-2
Example 3 – System of polynomial equations, 7-4
Solution to simultaneous equations with MSLV, 7-4
Example 1 - Example from the help facility, 7-5
Example 2 - Entrance from a lake into an open channel, 7-6
Using the Multiple Equation Solver (MES), 7-10
Application 1 - Solution of triangles, 7-10
Page TOC-7
Application 2 - Velocity and acceleration in polar coordinates, 7-18
Chapter 8 - Operations with Lists
, 8-1
Definitions, 8-1
Creating and storing lists, 8-1
Composing and decomposing lists, 8-2
Operations with lists of numbers, 8-3
Changing sign, 8-3
Addition, subtraction, multiplication, division, 8-3
Real number functions from the keyboard, 8-5
Real number functions from the MTH menu, 8-5
Examples of functions that use two arguments, 8-6
Lists of complex numbers, 8-7
Lists of algebraic objects, 8-8
The MTH/LIST menu, 8-8
Manipulating elements of a list, 8-10
List size, 8-10
Extracting and inserting elements, 8-10
Element position in the list, 8-11
HEAD and TAIL functions, 8-11
The SEQ function, 8-11
The MAP function, 8-12
Defining functions that use lists, 8-13
Applications of lists, 8-14
Harmonic mean of a list, 8-15
Geometric mean of a list, 8-16
Weighted average, 8-17
Statistics of grouped data, 8-18
Chapter 9 - Vectors, 9-1
Definitions, 9-1
Entering vectors, 9-2
Typing vectors in the stack, 9-2
Storing vectors into variables, 9-3
Page TOC-8
Using the Matrix Writer (MTWR) to enter vectors, 9-3
Building a vector with ARRY, 9-6
Identifying, extracting, and inserting vector elements, 9-7
Simple operations with vectors, 9-9
Changing sign, 9-9
Addition, subtraction, 9-9
Multiplication and division by a scalar, 9-10
Absolute value function, 9-10
The MTH/VECTOR menu, 9-10
Magnitude, 9-11
Dot product, 9-11
Cross product, 9-11
Decomposing a vector, 9-12
Building a two-dimensional vector, 9-12
Building a three-dimensional vector, 9-13
Changing coordinate system, 9-13
Application of vector operations, 9-16
Resultant of forces, 9-16
Angle between vectors, 9-16
Moment of a force, 9-17
Equation of a plane in space, 9-18
Row vectors, column vectors, and lists, 9-19
Function OBJ, 9-20
Function LIST, 9-20
Function DROP, 9-21
Transforming a row vector into a column vector, 9-21
Transforming a column vector into a row vector, 9-22
Transforming a list into a vector, 9-24
Transforming a vector (or matrix) into a list, 9-25
Chapter 10 - Creating and manipulating matrices, 10-1
Definitions, 10-1
Entering matrices in the stack, 10-2
Using the Matrix Writer, 10-2
Typing the matrix directly into the stack, 10-3
Creating matrices with calculator functions, 10-3
Page TOC-9
Functions GET and PUT, 10-6
Functions GETI and PUTI, 10-6
Function SIZE, 10-7
Function TRN, 10-8
Function CON, 10-8
Function IDN, 10-9
Function RDM, 10-10
Function RANM, 10-11
Function SUB, 10-11
Function REPL, 10-12
Function DIAG, 10-12
Function DIAG, 10-13
Function VANDERMONDE, 10-14
Function HILBERT, 10-14
A program to build a matrix out of a number of lists, 10-15
Lists represent columns of the matrix, 10-15
Lists represent rows of the matrix, 10-17
Manipulating matrices by columns, 10-18
Function COL, 10-18
Function COL, 10-19
Function COL+, 10-20
Function COL-, 10-20
Function CSWP, 10-21
Manipulating matrices by rows, 10-21
Function ROW, 10-22
Function ROW , 10-23
Function ROW+, 10-24
Function ROW -, 10-24
Function RSWP, 10-25
Function RCI, 10-25
Function RCIJ, 10-26
Chapter 11 - Matrix Operations and Linear Algebra
, 11-1
Operations with matrices, 11-1
Addition and subtraction, 11-2
Multiplication, 11-2
Page TOC-10
Characterizing a matrix (the matrix NORM menu), 11-6
Function ABS, 11-7
Function SNRM, 11-7
Functions RNRM and CNRM, 11-8
Function SRAD, 11-9
Function COND, 11-9
Function RANK, 11-10
Function DET, 11-11
Function TRACE, 11-13
Function TRAN, 11-14
Additional matrix operations (the matrix OPER menu), 11-14
Function AXL, 11-15
Function AXM, 11-15
Function LCXM, 11-15
Solution of linear systems, 11-16
Using the numerical solver for linear systems, 11-17
Least-square solution (function LSQ), 11-23
Solution with the inverse matrix, 11-26
Solution by “division” of matrices, 11-26
Solving multiple set of equations with the same coefficient
matrix, 11-27
Gaussian and Gauss-Jordan elimination, 11-28
Step-by-step calculator procedure for solving linear systems, 11-37
Solution to linear systems using calculator functions, 11-46
Residual errors in linear system solutions (function RSD) , 11-43
Eigenvalues and eigenvectors, 11-44
Function PCAR, 11-44
Function EGVL, 11-45
Function EGV, 11-46
Function JORDAN, 11-47
Function MAD, 11-47
Matrix factorization, 11-48
Function LU, 11-49
Orthogonal matrices and singular value decomposition, 11-49
Function SCHUR, 11-50
Function LQ, 11-51
Page TOC-11
Function QR, 11-51
Matrix Quadratic Forms, 11-51
The QUADF menu, 11-52
Linear Applications, 11-54
Function IMAGE, 11-54
Function ISOM, 11-54
Function KER, 11-55
Function MKISOM, 11-55
Chapter 12 - Graphics
, 12-1
Graphs options in the calculator, 12-1
Plotting an expression of the form y = f(x) , 12-2
Some useful PLOT operations for FUNCTION plots, 12-5
Saving a graph for future use, 12-8
Graphics of transcendental functions, 12-10
Graph of ln(X) , 12-8
Graph of the exponential function, 12-10
The PPAR variable, 12-11
Inverse functions and their graphs, 12-12
Summary of FUNCTION plot operation, 12-13
Plots of trigonometric and hyperbolic functions and their inverses, 12-16
Generating a table of values for a function, 12-17
The TPAR variable, 12-18
Plots in polar coordinates, 12-19
Plotting conic curves, 12-21
Parametric plots, 12-23
Generating a table of parametric equations, 12-26
Plotting the solution to simple differential equations, 12-26
Truth plots, 12-29
Plotting histograms, bar plots, and scatterplots, 12-30
Bar plots, 12-30
Scatter plots, 12-32
Slope fields, 12-34
Fast 3D plots, 12-35
Wireframe plots, 12-37
Ps-Contour plots, 12-39
Page TOC-12
Y-Slice plots, 12-41
Gridmap plots, 12-42
Pr-Surface plots, 12-43
The VPAR variable, 12-44
Interactive drawing, 12-44
DOT+ and DOT-, 12-45
MARK, 12-46
LINE, 12-46
TLINE, 12-46
BOX, 12-47
CIRCL, 12-47
LABEL, 12-47
DEL, 12-47
ERASE, 12-48
MENU, 12-48
SUB, 12-48
REPL, 12-48
PICT, 12-48
X,Y, 12-48
Zooming in and out in the graphics display, 12-49
ZFACT, ZIN, ZOUT, and ZLAST, 12-49
BOXZ, 12-50
ZDFLT, ZAUTO, 12-50
HZIN, HZOUT, VZIN, and VZOUT, 12-50
CNTR, 12-50
ZDECI, 12-50
ZINTG, 12-51
ZSQR, 12-51
ZTRIG, 12-51
The SYMBOLIC menu and graphs, 12-51
The SYMB/GRAPH menu, 12-52
Function DRAW3DMATRIX, 12-54
Chapter 13 - Calculus Applications, 13-1
The CALC (Calculus) menu, 13-1
Limits and derivatives, 13-1
Page TOC-13
Function lim, 13-2
Derivatives, 13-3
Function DERIV and DERVX,13-3
The DERIV&INTEG menu, 13-3
Calculating derivatives with ,13-4
The chain rule,13-6
Derivatives of equations,13-6
Implicit derivatives,13-7
Application of derivatives,13-7
Analyzing graphics of functions,13-7
Function DOMAIN, 13-9
Function TABVAL, 13-9
Function SIGNTAB, 13-10
Function TABVAR, 13-10
Using derivatives to calculate extreme points, 13-12
Higher-order derivatives, 13-13
Anti-derivatives and integrals, ,13-14
Functions INT, INTVX, RISCH, SIGMA, and SIGMAVX,13-14
Definite integrals,13-15
Step-by-step evaluation of derivatives and integrals,13-16
Integrating an equation, 13-18
Techniques of integration, 13-18
Substitution or change of variables, 13-18
Integration by parts and differentials,13-19
Integration by partial fractions,13-20
Improper integrals,13-21
Integration with units, 13-21
Infinite series,13-23
Taylor and Maclaurin’s series,13-23
Taylor polynomial and remainder,13-23
Functions TAYLR, TAYRL0, and SERIES,13-24
Chapter 14 - Multi-variate Calculus Applications, 14-1
Multi-variate functions, 14-1
Partial derivatives, 14-1
Higher-order derivatives, 14-3
Page TOC-14
The chain rule for partial derivatives, 14-4
Total differential of a function z = z(x,y) , 14-5
Determining extrema in functions of two variables, 14-5
Using function HESS to analyze extrema, 14-6
Multiple integrals, 14-8
Jacobian of coordinate transformation, 14-9
Double integral in polar coordinates, 14-9
Chapter 15 - Vector Analysis Applications, 15-1
Definitions, 15-1
Gradient and directional derivative, 15-1
A program to calculate the gradient, 15-2
Using function HESS to obtain the gradient, 15-2
Potential of a gradient, 15-3
Divergence, 15-4
Laplacian, 15-4
Curl, 15-5
Irrotational fields and potential function, 15-5
Vector potential, 15-6
Chapter 16 - Differential Equations
, 16-1
Basic operations with differential equations, 16-1
Entering differential equations, 16-1
Checking solutions in the calculator, 16-2
Slope field visualization of solutions, 16-3
The CALC/DIFF menu, 16-4
Solution to linear and non-linear equations, 16-4
Function LDEC, 16-4
Function DESOLVE, 16-7
The variable ODETYPE, 16-8
Laplace transforms, 16-10
Definitions, 16-10
Laplace transform and inverses in the calculator, 16-11
Laplace transform theorems, 16-12
Dirac’s delta function and Heaviside’s step function, 16-15
Applications of Laplace transform in the solution of ODEs, 16-17
Page TOC-15
Fourier series, 16-27
Function FOURIER, 16-28
Fourier series for a quadratic function, 16-29
Fourier series for a triangular wave, 16-35
Fourier series for a square wave, 16-39
Fourier series applications in differential equations, 16-42
Fourier Transforms, 16-43
Definition of Fourier transforms, 16-46
Properties of the Fourier transform, 16-48
Fast Fourier Transform (FFT) , 16-49
Examples of FFT applications, 16-50
Solution to specific second-order differential equations, 16-53
The Cauchy or Euler equation , 16-53
Legendre’s equation, 16-54
Bessel’s equation, 16-55
Chebyshev or Tchebycheff polynomials, 16-57
Laguerre’s equation, 16-58
Weber’s equation and Hermite polynomials, 16-59
Numerical and graphical solutions to ODEs, 16-60
Numerical solution of first-order ODE, 16-60
Graphical solution of first-order ODE, 16-62
Numerical solution of second-order ODE, 16-64
Graphical solution for a second-order ODE, 16-66
Numerical solution for stiff first-order ODE, 16-68
Numerical solution to ODEs with the SOLVE/DIFF menu, 16-69
Function RKF, 16-70
Function RRK, 16-71
Function RKFSTEP, 16-72
Function RRKSTEP, 16-73
Function RKFST, 16-72
Function RKFERR, 16-72
Function RSBERR, 16-73
Chapter 17 - Probability Applications, 17-1
The MTH/PROBABILITY.. sub-menu - part 1, 17-1
Factorials, combinations, and permutations, 17-1
Page TOC-16
Random numbers, 17-2
Discrete probability distributions, 17-4
Binomial distribution, 17-4
Poisson distribution, 17-5
Continuous probability distributions, 17-6
The gamma distribution, 17-6
The exponential distribution, 17-7
The beta distribution, 17-7
The Weibull distribution, 17-7
Functions for continuous distributions, 17-7
Continuous distributions for statistical inference, 17-9
Normal distribution pdf, 17-9
Normal distribution cdf, 17-10
The Student-t distribution, 17-10
The Chi-square distribution, 17-11
The F distribution, 17-12
Inverse cumulative distribution functions, 17-13
Chapter 18 - Statistical Applications, 18-1
Pre-programmed statistical features, 18-1
Entering data, 18-1
Calculating single-variable statistics, 18-2
Obtaining frequency distributions, 18-5
Fitting data to a function y = f(x) , 18-10
Obtaining additional summary statistics, 18-13
Calculation of percentiles, 18-14
The STAT soft menu, 18-15
The DATA sub-menu, 18-15
The ΣPAR sub-menu, 18-16
The 1VAR sub-menu, 18-16
The PLOT sub-menu, 18-17
The FIT sub-menu, 18-18
Example of STAT menu operations, 18-18
Confidence intervals, 18-22
Estimation of Confidence Intervals, 18-23
Definitions, 18-23
Page TOC-17
Confidence intervals for the population mean when the
population variance is known, 18-23
Confidence intervals for the population mean when the
population variance is unknown, 18-24
Confidence interval for a proportion, 18-24
Sampling distributions of differences and sums of statistics, 18-25
Confidence intervals for sums and differences of mean values, 18-26
Determining confidence intervals, 18-27
Confidence intervals for the variance, 18-33
Hypothesis testing, 18-34
Procedure for testing hypotheses, 18-35
Errors in hypothesis testing, 18-35
Inferences concerning one mean, 18-36
Inferences concerning two means, 18-39
Paired sample tests, 18-40
Inferences concerning one proportion, 18-41
Testing the difference between two proportions, 18-41
Hypothesis testing using pre-programmed features, 18-43
Inferences concerning one variance, 18-47
Inferences concerning two variances, 18-48
Additional notes on linear regression, 18-49
The method of least squares, 18-49
Additional equations for linear regression, 18-51
Prediction error, 18-51
Confidence intervals and hypothesis testing in
linear regression, 18-52
Procedure for inference statistics for linear regression
using the calculator, 18-53
Multiple linear fitting, 18-56
Polynomial fitting, 18-58
Selecting the best fitting, 18-62
Chapter 19 - Numbers in Different Bases
, 19-1
Definitions, 19-1
The BASE menu, 19-1
Functions HEC, DEC, OCT and BIN, 19-2
Page TOC-18
Conversion between number systems, 19-3
Wordsize, 19-4
Operations with binary integers, 19-4
The LOGIC menu, 19-5
The BIT menu, 19-6
The BYTE menu, 19-6
Hexadecimal numbers for pixel references, 19-7
Chapter 20 - Customizing menus and keyboard
, 20-1
Customizing menus, 20-1
The PRG/MODES/MENU, 20-1
Menu numbers (RCLMENU and MENU functions), 20-2
Custom menus (MENU and TMENU functions), 20-2
Menu specification and CST variable, 20-4
Customizing the keyboard, 20-5
The PRG/MODES/KEYS sub-menu, 20-5
Recall current user-defined key list, 20-6
Assign an object to a user-defined key, 20-6
Operating user-defined keys, 20-6
Un-assigning a user-defined key, 20-7
Assigning multiple user-defined key, 20-7
Chapter 21 - Programming in User RPL language
, 21-1
An example of programming, 21-1
Global and local variables and subprograms, 21-2
Global Variable Scope, 21-4
Local Variable Scope, 21-5
The PRG menu, 21-5
Navigating through RPN sub-menus, 21-6
Functions listed by sub-menu, 21-6
Shortcuts in the PRG menu, 21-9
Keystroke sequence for commonly used commands, 21-10
Programs for generating lists of numbers, 21-13
Examples of sequential programming, 21-15
Programs generated by defining a function, 21-15
Page TOC-19
Programs that simulate a sequence of stack operations, 21-17
Interactive input in programs, 21-19
Prompt with an input string, 21-21
A function with an input string, 21-22
Input string for two or three input values, 21-24
Input through input forms, 21-27
Creating a choose box, 21-31
Identifying output in programs, 21-33
Tagging a numerical result, 21- 33
Decomposing a tagged numerical result into number and tag, 21-33
“De-tagging” a tagged quantity, 21-33
Examples of tagged output, 21-34
Using a message box, 21-37
Relational and logical operators, 21-43
Relational operators, 21-43
Logical operators, 21-44
Program branching, 21-46
Branching with IF, 21-46
The CASE construct, 21-51
Program loops, 21-53
The START construct, 21-53
The FOR construct, 21-59
The DO construct, 21-61
The WHILE construct, 21-62
Errors and error trapping, 21-64
DOERR, 21-64
ERRN, 21-64
ERRM, 21-65
ERR0, 21-65
LASTARG, 21-65
Sub-menu IFERR, 21-65
User RPL programming in algebraic mode, 21-66
Chapter 22 - Programs for graphics manipulation, 22-1
The PLOT menu, 22-1
User-defined key for the PLOT menu, 22-1
Page TOC-20
Description of the PLOT menu, 22-2
Generating plots with programs, 22-14
Two-dimensional graphics, 22-14
Three-dimensional graphics, 22-15
The variable EQ, 22-15
Examples of interactive plots using the PLOT menu, 22-15
Examples of program-generated plots, 22-17
Drawing commands for use in programming, 22-19
PICT, 22-20
PDIM, 22-20
LINE, 22-20
TLINE, 22-20
BOX, 22-21
ARC, 22-21
PIX?, PIXON, and PIXOFF, 22-22
PVIEW, 22-22
PXC, 22-22
CPX, 22-22
Programming examples using drawing functions, 22-22
Pixel coordinates, 22-25
Animating graphics, 22-26
Animating a collection of graphics, 22-27
More information on the ANIMATE function, 22-29
Graphic objects (GROBs), 22-30
The GROB menu, 22-31
A program with plotting and drawing functions, 22-33
Modular programming, 22-36
Running the program, 22-36
A program to calculate principal stresses, 22-38
Ordering the variables in the sub-directory, 22-39
A second example of Mohr’s circle calculations, 22-39
An input form for the Mohr’s circle program, 22-40
Chapter 23 - Character strings, 23-1
String-related functions in the TYPE sub-menu, 23-1
String concatenation, 23-2
Page TOC-21
The CHARS menu, 23-2
The characters list, 23-3
Chapter 24 - Calculator objects and flags, 24-1
Description of calculator objects, 24-1
Function TYPE, 24-2
Function VTYPE, 24-2
Calculator flags, 24-3
System flags, 24-3
Functions for setting and changing flags, 24-3
User flags, 24-4
Chapter 25 - Date and Time Functions, 25-1
The TIME menu, 25-1
Setting an alarm, 25-1
Browsing alarms, 25-2
Setting time and date, 25-2
TIME Tools, 25-2
Calculations with dates, 25-3
Calculations with times, 25-4
Alarm functions, 25-4
Chapter 26 - Managing memory, 26-1
Memory Structure, 26-1
The HOME directory, 26-2
Port memory, 26-2
Checking objects in memory, 26-2
Backup objects, 26-3
Backing up objects in port memory, 26-3
Backing up and restoring HOME, 26-4
Storing, deleting, and restoring backup objects, 26-5
Using data in backup objects, 26-5
Using libraries, 26-6
Installing and attaching a library, 26-6
Library numbers, 26-7
Deleting a library, 26-7
Page TOC-22
Creating libraries, 26-7
Backup battery, 26-7
Appendices
Appendix A - Using input forms, A-1
Appendix B - The calculator’s keyboard, B-1
Appendix C - CAS settings, C-1
Appendix D - Additional character set, D-1
Appendix E - The Selection Tree in the Equation Writer, E-1
Appendix F - The Applications (APPS) menu
, F-1
Appendix G - Useful shortcuts, G-1
Appendix H - The CAS help facility, H-1
Appendix I - Command catalog list, I-1
Appendix J - The MATHS menu, J-1
Appendix K - The MAIN menu, K-1
Appendix L - Line editor commands, L-1
Appendix M – Index, M-1
Limited Warranty –
W
W
-
-
1
1
Service, W-2
Regulatory information, W-4
Page Note-1
A note about screenshots in this guide
A screenshot is a representation of the calculator screen. For example, the
first time the calculator is turned on you get the following screen (calculator
screens are shown with a thick border in this section):
The top two lines represent the screen header and the remaining area in the
screen is used for calculator output.
Most screenshots in this guide were generated using a computer-based
emulator (a program that simulates the operation of the calculator in a
computer), and are missing the screen header lines. Instead, they will show
additional screen output area in the location of the header lines, as shown
below:
This additional screen output area in many screen shots in this guide will not
show when you try those guide’s example in your calculator. Thus, while in
the guide you may see a screenshot as the following:
the calculator will actually show the following screen:
Page Note-2
Notice that the header lines cover the top first and a half lines of output in the
calculator’s screen. Nevertheless, the lines of output not visible are still
available for you to use. You can access those lines in your calculator by
pressing the up-arrow key (), which will allow you to scroll down the
screen contents.
Also, as you perform the three operations listed in the screenshot, in the order
shown, your screen will show them occupying higher levels in the display as
shown next:
The keystrokes required to complete these exercises are the following:
S2.5`
R„Ü5.5+‚¹2.5`
The next operation,
2.3+5*„Ê\2.3`
will force the lines corresponding to the operation SIN(2.5) to move upwards
and be hidden by the header lines.
Many screenshots in this guide have also been modified to show only the
operation of interest. For example, the screenshot for the operation SIN(2.5),
shown above, may be simplified in this guide to look as:
Page Note-3
These simplifications of the screenshots are aimed at economizing output
space in the guide.
Be aware of the differences between the guide’s screenshots and the actual
screen display, and you should have no problem reproducing the exercises in
this guide.
Page 1-1
Chapter 1
Getting started
This chapter is aimed at providing basic information in the operation of your
calculator. The exercises are aimed at familiarizing yourself with the basic
operations and settings before actually performing a calculation.
Basic Operations
The following exercises are aimed at getting you acquainted with the
hardware of your calculator.
Batteries
The calculator uses 3 AAA (LR03) batteries as main power and a CR2032
lithium battery for memory backup.
Before using the calculator, please install the batteries according to the
following procedure.
To install the main batteries
a. Make sure the calculator is off. Slide up the battery compartment
cover as illustrated.
b. Insert 3 new AAA (LR03) batteries into the main compartment. Make sure
each battery is inserted in the indicated direction.
To install the backup battery
a. Make sure the calculator is off. Press down the holder. Push the
plate to the shown direction and lift it.
Page 1-2
b. Insert a new CR2032 lithium battery. Make sure its positive (+) side is
facing up.
c. Replace the plate and push it to the original place.
After installing the batteries, press [ON] to turn the power on.
Warning: When the low battery icon is displayed, you need to replace the
batteries as soon as possible. However, avoid removing the backup battery
and main batteries at the same time to avoid data lost.
Turning the calculator on and off
The $ key is located at the lower left corner of the keyboard. Press it once
to turn your calculator on. To turn the calculator off, press the red right-shift
key @ (first key in the second row from the bottom of the keyboard),
followed by the $ key. Notice that the $ key has a red OFF label
printed in the upper right corner as a reminder of the OFF command.
Adjusting the display contrast
You can adjust the display contrast by holding the $ key while pressing the
+ or - keys. The $(hold) + key combination produces a darker
display. The $(hold) - key combination produces a lighter display
Contents of the calculator’s display
Turn your calculator on once more. The display should look as indicated
below.
Page 1-3
At the top of the display you will have two lines of information that describe
the settings of the calculator. The first line shows the characters:
RAD XYZ HEX R= 'X'
For details on the meaning of these specifications see Chapter 2.
The second line shows the characters: { HOME } indicating that the HOME
directory is the current file directory in the calculator’s memory. In Chapter 2
you will learn that you can save data in your calculator by storing them in files
or variables. Variables can be organized into directories and sub-directories.
Eventually, you may create a branching tree of file directories, similar to those
in a computer hard drive. You can then navigate through the file directory
tree to select any directory of interest. As you navigate through the file
directory the second line of the display will change to reflect the proper file
directory and sub-directory.
At the bottom of the display you will find a number of labels, namely,
@EDIT @VIEW @@ RCL @@ @@STO@ ! PURGE !CLEAR
associated with the six soft menu keys, F1 through F6:
ABCDEF
The six labels displayed in the lower part of the screen will change depending
on which menu is displayed. But A will always be associated with the first
displayed label, B with the second displayed label, and so on.
Menus
The six labels associated with the keys A through F form part of a menu
of functions. Since the calculator has only six soft menu keys, it only display 6
labels at any point in time. However, a menu can have more than six entries.
Each group of 6 entries is called a Menu page. The current menu, known as
the TOOL menu (see below), has eight entries arranged in two pages. The
next page, containing the next two entries of the menu is available by
Page 1-4
pressing the L (NeXT menu) key. This key is the third key from the left in
the third row of keys in the keyboard. Press L once more to return to the
main TOOL menu, or press the I key (third key in second row of keys from
the top of the keyboard).
The TOOL menu is described in detain in the next section. At this point we
will illustrate some properties of menus that you will find useful while using
your calculator.
SOFT menus vs. CHOOSE boxes
Menus, or SOFT menus, associate labels in the lower part of the screen with
the six soft menu keys (Athrough F). By pressing the appropriate soft
menu key, the function shown in the associated label gets activated. For
example, with the TOOL menu active, pressing the @CLEAR key (F) activates
function CLEAR, which erases (clears up) the contents of the screen. To see
this function in action, type a number, say 123`, and then press
the F key.
SOFT menus are typically used to select from among a number of related
functions. However, SOFT menus are not the only way to access collections
of related functions in the calculator. The alternative way will be referred to
as CHOOSE boxes. To see an example of a choose box, activate the TOOL
menu (press I), and then press the keystroke combination
‚ã(associated with the 3 key). This will provide the following
CHOOSE box:
This CHOOSE box is labeled BASE MENU and provides a list of numbered
functions, from 1. HEX x to 6. BR. This display will constitute the first page
of this CHOOSE box menu showing six menu functions. You can navigate
through the menu by using the up and down arrow keys, —˜, located in
the upper right side of the keyboard, right under the E and Fsoft menu
keys. To activate any given function, first, highlight the function name by
Page 1-5
using the up and down arrow keys, —˜, or by pressing the number
corresponding to the function in the CHOOSE box. After the function name is
selected, press the @@@OK@@@ soft menu key (F). Thus, if you wanted to use
function RB (Real to Binary), you could press 6F.
If you want to move to the top of the current menu page in a CHOOSE box,
use „—. To move to the bottom of the current page, use „˜. To
move to the top of the entire menu, use ‚—. To move to the bottom of
the entire menu, use ‚˜.
Selecting SOFT menus or CHOOSE boxes
You can select the format in which your menus will be displayed by changing
a setting in the calculator system flags (A system flag is a calculator variable
that controls a certain calculator operation or mode. For more information
about flags, see Chapter 24). System flag 117 can be set to produce either
SOFT menus or CHOOSE boxes. To access this flag use:
H @)FLAGS —„ —˜
Your calculator will show the following screen, highlighting the line starting
with the number 117:
By default, the line will look as shown above. The highlighted line (117
CHOOSE boxes) indicates that CHOOSE boxes are the current menu display
setting. If you prefer to use SOFT menu keys, press the soft menu key
(C), followed by @@@OK@@@ (F). Press @@@OK@@@ (F) once more to return to
normal calculator display.
If you now press ‚ã, instead of the CHOOSE box that you saw earlier,
the display will now show six soft menu labels as the first page of the STACK
menu:
@CHK@
Page 1-6
To navigate through the functions of this menu, press the L key to move to
the next page, or „«(associated with the L key) to move to the
previous page. The following figures show the different pages of the BASE
menu accessed by pressing the L key twice:
Pressing the L key once more will takes us back to the first menu page.
Note: With the SOFT menu setting for system flag 117, the keystroke
combination (hold) ˜, will show a list of the functions in the current soft
menu. For example, for the two first pages in the BASE menu, you will get:
To revert to the CHOOSE boxes setting, use:
H @)FLAGS —„ —˜@@CHK@@ @@@OK@@@ @@@OK@@@.
Notes:
1. The TOOL menu, obtained by pressing I, will always produce a
SOFT menu.
2. Most of the examples in this user’s manual are shown using both SOFT
menus and CHOOSE boxes. Programming applications (Chapters 21 and
22) use exclusively SOFT menus.
3. Additional information on SOFT menus vs. CHOOSE boxes is presented
in Chapter 2 o f this guide.
The TOOL menu
The soft menu keys for the menu currently displayed, known as the TOOL
menu, are associated with operations related to manipulation of variables (see
pages for more information on variables):
@EDIT A EDIT the contents of a variable (see Chapter 2 and Appendix
L for more information on editing)
Page 1-7
@VIEW B VIEW the contents of a variable
@@ RCL @@ C ReCaLl the contents of a variable
@@STO@ D STOre the contents of a variable
! PURGE E PURGE a variable
CLEAR F CLEAR the display or stack
The calculator has only six soft menu keys, and can only display 6 labels at
any point in time. However, a menu can have more than six entries. Each
group of 6 entries is called a Menu page. The TOOL menu has eight entries
arranged in two pages. The next page, containing the next two entries of the
menu are available by pressing the L (NeXT menu) key. This key is the
third key from the left in the third row of keys in the keyboard.
In this case, only the first two soft menu keys have commands associated with
them. These commands are:
@CASCM A CASCMD: CAS CoMmanD, used to launch a command from
the CAS by selecting from a list
@HELP B HELP facility describing the commands available
Pressing the L key will show the original TOOL menu. Another way to
recover the TOOL menu is to press the I key (third key from the left in the
second row of keys from the top of the keyboard).
Setting time and date
The calculator has an internal real time clock. This clock can be continuously
displayed on the screen and be used for alarms as well as running scheduled
tasks. This section will show not only how to set time and date, but also the
basics of using CHOOSE boxes and entering data in a dialog box. Dialog
boxes on your calculator are similar to a computer dialog box.
To set time and date we use the TIME choose box available as an alternative
function for the 9 key. By combining the red right-shift button, , with
the 9 key the TIME choose box is activated. This operation can also be
represented as ‚Ó. The TIME choose box is shown in the figure below:
Page 1-8
As indicated above, the TIME menu provides four different options, numbered
1 through 4. Of interest to us as this point is option 3. Set time, date... Using
the down arrow key, ˜, highlight this option and press the !!@@OK#@ F soft
menu key. The following input form (see Appendix 1-A) for adjusting time
and date is shown:
Setting the time of the day
Using the number keys, 1234567890, start by
adjusting the hour of the day. Suppose that we change the hour to 11, by
pressing 11 as the hour field in the SET TIME AND DATE input form is
highlighted. This results in the number 11 being entered in the lower line of
the input form:
Press the !!@@OK#@ F soft menu key to effect the change. The value of 11 is
now shown in the hour field, and the minute field is automatically highlighted:
Page 1-9
Let’s change the minute field to 25, by pressing: 25 !!@@OK#@ . The
seconds field is now highlighted. Suppose that you want to change the
seconds field to 45, use: 45 !!@@OK#@
The time format field is now highlighted. To change this field from its current
setting you can either press the W key (the second key from the left in the
fifth row of keys from the bottom of the keyboard), or press the @CHOOS soft
menu key ( B).
If using the W key, the setting in the time format field will change to
either of the following options:
o AM : indicates that displayed time is AM time
o PM : indicates that displayed time is PM time
o 24-hr : indicates that that the time displayed uses a 24 hour
format where18:00, for example, represents 6pm
The last selected option will become the set option for the time format by
using this procedure.
If using the @CHOOS soft menu key, the following options are available.
Use the up and down arrow keys,— ˜, to select among these three
options (AM, PM, 24-hour time). Press the !!@@OK#@ F soft menu key to
make the selection.
Setting the date
After setting the time format option, the SET TIME AND DATE input form will
look as follows:
Page 1-10
To set the date, first set the date format. The default format is M/D/Y
(month/day/year). To modify this format, press the down arrow key. This
will highlight the date format as shown below:
Use the @CHOOS soft menu key ( B), to see the options for the date format:
Highlight your choice by using the up and down arrow keys,— ˜, and
press the !!@@OK#@ F soft menu key to make the selection.
Introducing the calculator’s keyboard
The figure below shows a diagram of the calculator’s keyboard with the
numbering of its rows and columns.
Page 1-11
The figure shows 10 rows of keys combined with 3, 5, or 6 columns. Row 1
has 6 keys, rows 2 and 3 have 3 keys each, and rows 4 through 10 have 5
keys each. There are 4 arrow keys located on the right-hand side of the
keyboard in the space occupied by rows 2 and 3.
Each key has three, four, or five functions. The main key function correspond
to the most prominent label in the key. Also, the green left-shift key, key (8,1),
the red right-shift key, key (9,1), and the blue ALPHA key, key (7,1), can be
Page 1-12
combined with some of the other keys to activate the alternative functions
shown in the keyboard. For example, the
P key, key(4,4), has the
following six functions associated with it:
P Main function, to activate the SYMBolic menu
„´ Left-shift function, to activate the MTH (Math) menu
… N Right-shift function, to activate the CATalog function
~p ALPHA function, to enter the upper-case letter P
~„p ALPHA-Left-Shift function, to enter the lower-case letter p
~…p ALPHA-Right-Shift function, to enter the symbol P
Of the six functions associated with the key only the first four are shown in the
keyboard itself. This is the way that the key looks in the keyboard:
Notice that the color and the position of the labels in the key, namely, SYMB,
MTH, CAT and P, indicate which is the main function (SYMB), and which of
the other three functions is associated with the left-shift (MTH), right-
shift (CAT ) , and ~ (P) keys.
For detailed information on the calculator keyboard operation referee to
Appendix B .
Selecting calculator modes
This section assumes that you are now at least partially familiar with the use of
choose and dialog boxes (if you are not, please refer to Chapter 2).
Press the H button (second key from the left on the second row of keys from
the top) to show the following CALCULATOR MODES input form:
Page 1-13
Press the !!@@OK#@ F soft menu key to return to normal display. Examples of
selecting different calculator modes are shown next.
Operating Mode
The calculator offers two operating modes: the Algebraic mode, and the
Reverse Polish Notation (RPN) mode. The default mode is the Algebraic
mode (as indicated in the figure above), however, users of earlier HP
calculators may be more familiar with the RPN mode.
To select an operating mode, first open the CALCULATOR MODES input form
by pressing the H button. The Operating Mode field will be highlighted.
Select the Algebraic or RPN operating mode by either using the \ key
(second from left in the fifth row from the keyboard bottom), or pressing the
@CHOOS soft menu key ( B). If using the latter approach, use up and down
arrow keys, — ˜, to select the mode, and press the !!@@OK#@ soft menu key
to complete the operation.
To illustrate the difference between these two operating modes we will
calculate the following expression in both modes:
5.2
3
23
33
1
53
e+
To enter this expression in the calculator we will first use the equation writer,
‚O. Please identify the following keys in the keyboard, besides the
numeric keypad keys:
!@.#*+-/R
Q¸Ü‚Oš™˜—`
Page 1-14
The equation writer is a display mode in which you can build mathematical
expressions using explicit mathematical notation including fractions,
derivatives, integrals, roots, etc. To use the equation writer for writing the
expression shown above, use the following keystrokes:
‚OR3*!Ü5-
1/3*3
———————
/23Q3™™+!¸2.5`
After pressing `the calculator displays the expression:
(3*(5-1/(3*3))/23^3+EXP(2.5))
Pressing `again will provide the following value. Accept Approx. mode
on, if asked, by pressing !!@@OK#@. [Note: The integer values used above, e.g.,
3, 5, 1, represent exact values. The EXP(2.5), however, cannot be expressed
as an exact value, therefore, a switch to Approx mode is required]:
You could also type the expression directly into the display without using the
equation writer, as follows:
R!Ü3.*!Ü5.-
1./ !Ü3.*3.™™
/23.Q3+!¸2.5`
to obtain the same result.
Change the operating mode to RPN by first pressing the H button. Select
the RPN operating mode by either using the \key, or pressing the @CHOOS
soft menu key. Press the !!@@OK#@ F soft menu key to complete the operation.
The display, for the RPN mode looks as follows:
Page 1-15
Notice that the display shows several levels of output labeled, from bottom to
top, as 1, 2, 3, etc. This is referred to as the stack of the calculator. The
different levels are referred to as the stack levels, i.e., stack level 1, stack level
2, etc.
Basically, what RPN means is that, instead of writing an operation such as 3
+ 2, in the calculator by using 3+2`, we write first the operands,
in the proper order, and then the operator, i.e., 3`2`+. As
you enter the operands, they occupy different stack levels. Entering
3`puts the number 3 in stack level 1. Next, entering 2`pushes
the 3 upwards to occupy stack level 2. Finally, by pressing +, we are
telling the calculator to apply the operator, or program, + to the objects
occupying levels 1 and 2. The result, 5, is then placed in level 1. A simpler
way to calculate this operation is by using: 3`2+.
Let's try some other simple operations before trying the more complicated
expression used earlier for the algebraic operating mode:
123/32 123`32/
4
2
4`2Q
3
27 27`3@»
Notice the position of the y and the x in the last two operations. The base in
the exponential operation is y (stack level 2) while the exponent is x (stack
level 1) before the key Q is pressed. Similarly, in the cubic root operation,
y (stack level 2) is the quantity under the root sign, and x (stack level 1) is the
root.
Try the following exercise involving 3 factors: (5 + 3) × 2
5`3+ Calculates (5 +3) first.
2X Completes the calculation.
Let's try now the expression proposed earlier:
5.2
3
23
33
1
53
e+
Page 1-16
3.` Enter 3 in level 1
5.` Enter 5 in level 1, 3 moves to y
3.` Enter 3 in level 1, 5 moves to level 2, 3 to level 3
3.* Place 3 and multiply, 9 appears in level 1
Y 1/(3×3), last value in lev. 1; 5 in level 2; 3 in level 3
- 5 - 1/(3×3) , occupies level 1 now; 3 in level 2
* 3× (5 - 1/(3×3)), occupies level 1 now.
23.`Enter 23 in level 1, 14.66666 moves to level 2.
3.Q Enter 3, calculate 23
3
into level 1. 14.666 in lev. 2.
/ (3× (5-1/(3×3)))/23
3
into level 1
2.5 Enter 2.5 level 1
e
2.5
, goes into level 1, level 2 shows previous value.
+ (3× (5 - 1/(3×3)))/23
3
+
e
2.5
= 12.18369, into lev. 1.
R ((3× (5 - 1/(3×3)))/23
3
+
e
2.5
) = 3.4905156, into 1.
Although RPN requires a little bit more thought than the algebraic (ALG) mode,
there are multiple advantages in using RPN. For example, in RPN mode you
can see the equation unfolding step by step. This is extremely useful to detect
a possible input error. Also, as you become more efficient in this mode and
learn more of the tricks, you will be able to calculate expression faster and
will much less keystrokes. Consider, for example the calculation of (4×6 -
5)/(1+4×6 - 5). In RPN mode you can write:
4 ` 6 * 5 - ` 1 + /
obviously, even In RPN mode, you can enter an expression in the same order
as the algebraic mode by using the Equation writer. For example,
‚OR3.*!Ü5.-1/3.*3.
———————
/23.Q3™™+!¸2.5`
The resulting expression is shown in stack level 1 as follows:
Notice how the expression is placed in stack level 1 after pressing `.
Pressing the EVAL key at this point will evaluate the numerical value of that
expression Note: In RPN mode, pressing ENTER when there is no command
Page 1-17
line will execute the DUP function which copies the contents of stack level 1 of
the stack onto level 2 (and pushes all the other stack levels one level up). This
is extremely useful as showed in the previous example.
To select between the ALG vs. RPN operating mode, you can also set/clear
system flag 95 through the following keystroke sequence:
H @)FLAGS —„—„—„ — @@CHK@@ @@OK@@ @@OK@@
Alternatively, you can use one of the following shortcuts:
In ALG mode,
CF(-95) selects RPN mode
In RPN mode,
95 \` SF selects ALG mode
For more information on calculator’s system flags see Chapter 2.
Number Format and decimal dot or comma
Changing the number format allows you to customize the way real numbers
are displayed by the calculator. You will find this feature extremely useful in
operations with powers of tens or to limit the number of decimals in a result.
To select a number format, first open the CALCULATOR MODES input form by
pressing the H button. Then, use the down arrow key, ˜, to select the
option Number format. The default value is Std, or Standard format. In the
standard format, the calculator will show floating-point numbers with the
maximum precision allowed by the calculator (12 significant digits). To learn
more about reals, see Chapter 2. To illustrate this and other number formats
try the following exercises:
Standard format:
This mode is the most used mode as it shows numbers in the most familiar
notation.
Press the !!@@OK#@ soft menu key, with the Number format set to Std, to
return to the calculator display. Enter the number 123.4567890123456.
Notice that this number has 16 significant figures. Press the ` key.
Page 1-18
The number is rounded to the maximum 12 significant figures, and is
displayed as follows:
In the standard format of decimal display, integer numbers are shown
with no decimal zeros whatsoever. Numbers with different decimal
figures will be adjusted in the display so that only those decimal figures
that are necessary will be shown. More examples of numbers in standard
format are shown next:
Fixed format with no decimals: Press the H button. Next, use the
down arrow key, ˜, to select the option Number format. Press the
@CHOOS soft menu key ( B), and select the option Fixed with the arrow
down key ˜.
Notice that the Number Format mode is set to Fix followed by a zero (0).
This number indicates the number of decimals to be shown after the
decimal point in the calculator’s display. Press the !!@@OK#@ soft menu key
to return to the calculator display. The number now is shown as:
This setting will force all results to be rounded to the closest integer (0
digit displayed after the comma). However, the number is still stored by
the calculator with its full 12 significant digit precision. As we change the
number of decimals to be displayed, you will see the additional digits
being shown again.
Page 1-19
Fixed format with decimals:
This mode is mainly used when working with limited precision. For
example, if you are doing financial calculation, using a FIX 2 mode is
convenient as it can easily represent monetary units to a 1/100 precision.
Press the H button. Next, use the down arrow key, ˜, to select the
option Number format. Press the @CHOOS soft menu key ( B), and select
the option Fixed with the arrow down key ˜.
Press the right arrow key, , to highlight the zero in front of the option
Fix. Press the @CHOOS soft menu key and, using the up and down arrow
keys, —˜, select, say, 3 decimals.
Press the !!@@OK#@ soft menu key to complete the selection:
Press the !!@@OK#@ soft menu key return to the calculator display. The
number now is shown as:
Notice how the number is rounded, not truncated. Thus, the number
123.4567890123456, for this setting, is displayed as 123.457, and not
as 123.456 because the digit after 6 is > 5
Page 1-20
Scientific format
The scientific format is mainly used when solving problems in the physical
sciences where numbers are usually represented as a number with limited
precision multiplied by a power of ten.
To set this format, start by pressing the H button. Next, use the down
arrow key, ˜, to select the option Number format. Press the @CHOOS soft
menu key ( B), and select the option Scientific with the arrow down key
˜. Keep the number 3 in front of the Sci. (This number can be
changed in the same fashion that we changed the Fixed number of
decimals in the example above).
Press the !!@@OK#@ soft menu key return to the calculator display. The
number now is shown as:
This result, 1.23E2, is the calculator’s version of powers-of-ten notation,
i.e., 1.235 × 10
2
. In this, so-called, scientific notation, the number 3 in
front of the Sci number format (shown earlier) represents the number of
significant figures after the decimal point. Scientific notation always
includes one integer figure as shown above. For this case, therefore, the
number of significant figures is four.
Engineering format
The engineering format is very similar to the scientific format, except that
the powers of ten are multiples of three.
To set this format, start by pressing the H button. Next, use the down
arrow key, ˜, to select the option Number format. Press the @CHOOS soft
menu key ( B), and select the option Engineering with the arrow down
key ˜. Keep the number 3 in front of the Eng. (This number can be
changed in the same fashion that we changed the Fixed number of
decimals in an earlier example).
Page 1-21
Press the !!@@OK#@ soft menu key return to the calculator display. The
number now is shown as:
Because this number has three figures in the integer part, it is shown with
four significative figures and a zero power of ten, while using the
Engineering format. For example, the number 0.00256, will be shown as:
Decimal comma vs. decimal point
Decimal points in floating-point numbers can be replaced by commas, if
the user is more familiar with such notation. To replace decimal points for
commas, change the FM option in the CALCULATOR MODES input form
to commas, as follows (Notice that we have changed the Number Format
to Std):
Press the H button. Next, use the down arrow key, ˜, once, and the
right arrow key, , highlighting the option __FM,. To select commas,
press the @@CHK@@ soft menu key (i.e., the B key). The input form will
look as follows:
Press the !!@@OK#@ soft menu key return to the calculator display. The
number 123.456789012, entered earlier, now is shown as:
Page 1-22
Angle Measure
Trigonometric functions, for example, require arguments representing plane
angles. The calculator provides three different Angle Measure modes for
working with angles, namely:
Degrees: There are 360 degrees (360
o
) in a complete circumference, or
90 degrees (90
o
) in a right angle. This representation is mainly used
when doing basic geometry, mechanical or structural engineering, and
surveying.
Radians: There are 2π radians (2π
r
) in a complete circumference, or π/2
radians (π/2
r
) in a right angle. This notation is mainly used when solving
mathematics and physics problems. This is the default mode of the
calculator.
Grades: There are 400 grades (400
g
) in a complete circumference, or
100 grades (100
g
) in a right angle. This notation is similar to the degree
mode, and was introduced in order to “simplify” the degree notation but
is seldom used now.
The angle measure affects the trig functions like SIN, COS, TAN and
associated functions.
To change the angle measure mode, use the following procedure:
Press the H button. Next, use the down arrow key, ˜, twice. Select
the Angle Measure mode by either using the \key (second from left in
the fifth row from the keyboard bottom), or pressing the @CHOOS soft menu
key ( B). If using the latter approach, use up and down arrow
keys,— ˜, to select the preferred mode, and press the !!@@OK#@ F soft
menu key to complete the operation. For example, in the following
screen, the Radians mode is selected:
Coordinate System
Page 1-23
The coordinate system selection affects the way vectors and complex numbers
are displayed and entered. To learn more about complex numbers and
vectors, see Chapters 4 and 9, respectively.
Two- and three-dimensional vector components and complex numbers can be
represented in any of 3 coordinate systems: The Cartesian (2 dimensional) or
Rectangular (3 dimensional), Cylindrical (3 dimensional) or Polar (2
dimensional), and Spherical (only 3 dimensional). In a Cartesian or
Rectangular coordinate system a point P will have three linear coordinates
(x,y,z) measured from the origin along each of three mutually perpendicular
axes (in 2 d mode, z is assumed to be 0). In a Cylindrical or Polar
coordinate system the coordinates of a point are given by (r,θ,z), where r is a
radial distance measured from the origin on the xy plane, θ is the angle that
the radial distance r forms with the positive x axis -- measured as positive in a
counterclockwise direction --, and z is the same as the z coordinate in a
Cartesian system (in 2 d mode, z is assumed to be 0). The Rectangular and
Polar systems are related by the following quantities:
22
)cos( yxrrx +== θ
==
x
y
ry
1
tan)sin( θθ
z
z
=
In a Spherical coordinate system the coordinates of a point are given by
(ρ,θ,φ) where ρ is a radial distance measured from the origin of a Cartesian
system, θ is an angle representing the angle formed by the projection of the
linear distance ρ onto the xy axis (same as θ in Polar coordinates), and φ is
the angle from the positive z axis to the radial distance ρ. The Rectangular
and Spherical coordinate systems are related by the following quantities:
+
==
==
++==
z
yx
z
x
y
y
zyxx
22
1
1
222
tan)cos(
tan)sin()sin(
)cos()sin(
φφρ
θθφρ
ρθφρ
To change the coordinate system in your calculator, follow these steps:
Page 1-24
Press the H button. Next, use the down arrow key, ˜, three times.
Select the Angle Measure mode by either using the \ key (second from
left in the fifth row from the keyboard bottom), or pressing the @CHOOS soft
menu key ( B). If using the latter approach, use up and down arrow
keys,— ˜, to select the preferred mode, and press the !!@@OK#@ F soft
menu key to complete the operation. For example, in the following
screen, the Polar coordinate mode is selected:
Beep, Key Click, and Last Stack
The last line of the CALCULATOR MODES input form include the options:
_Beep _Key Click _Last Stack
By choosing the check mark next to each of these options, the corresponding
option is activated. These options are described next:
_Beep : When selected, , the calculator beeper is active. This operation
mainly applies to error messages, but also some user functions like
BEEP.
_Key Click : When selected, each keystroke produces a “click” sound.
_Last Stack: Keeps the contents of the last stack entry for use with the functions
UNDO and ANS (see Chapter 2).
The _Beep option can be useful to advise the user about errors. You may
want to deselect this option if using your calculator in a classroom or library.
The _Key Click option can be useful as an audible way to check that each
keystroke was entered as intended.
The _Last Stack option is very useful to recover the last operation in case we
need it for a new calculation.
To select, or deselect, any of these three options, first press the H button.
Next,
Page 1-25
Use the down arrow key, ˜, four times to select the _Last Stack option.
Use the soft menu key (i.e., the B key) to change the selection.
Press the left arrow key š to select the _Key Click option. Use the
soft menu key (i.e., the B key) to change the selection.
Press the left arrow key š to select the _Beep option. Use the soft
menu key (i.e., the B key) to change the selection.
Press the !!@@OK#@ F soft menu key to complete the operation.
Selecting CAS settings
CAS stands for Computer Algebraic System. This is the mathematical core of
the calculator where the symbolic mathematical operations and functions are
programmed and performed. The CAS offers a number of settings can be
adjusted according to the type of operation of interest. These are:
The default independent variable
Numeric vs. symbolic mode
Approximate vs. Exact mode
Verbose vs. Non-verbose mode
Step-by-step mode for operations
Increasing power format for polynomials
Rigorous mode
Simplification of non-rational expressions
Details on the selection of CAS settings are presented in Appendix C.
Selecting Display modes
The calculator display can be customized to your preference by selecting
different display modes. To see the optional display settings use the following:
First, press the H button to activate the CALCULATOR MODES input
form. Within the CALCULATOR MODES input form, press the @@DISP@ soft
menu key (D) to display the DISPLAY MODES input form.
@CHK@
@CHK@
@CHK@
Page 1-26
To navigate through the many options in the DISPLAY MODES input form,
use the arrow keys: š™˜—.
To select or deselect any of the settings shown above, that require a check
mark, select the underline before the option of interest, and toggle the
soft menu key until the right setting is achieved. When an option is
selected, a check mark will be shown in the underline (e.g., the Textbook
option in the Stack: line above). Unselected options will show no check
mark in the underline preceding the option of interest (e.g., the _Small,
_Full page, and _Indent options in the Edit: line above).
To select the Font for the display, highlight the field in front of the Font:
option in the DISPLAY MODES input form, and use the @CHOOS soft menu
key (B).
After having selected and unselected all the options that you want in the
DISPLAY MODES input form, press the @@@OK@@@ soft menu key. This will take
you back to the CALCULATOR MODES input form. To return to normal
calculator display at this point, press the @@@OK@@@ soft menu key once more.
Selecting the display font
Changing the font display allows you to have the calculator look and feel
changed to your own liking. By using a 6-pixel font, for example, you can
display up to 9 stack levels! Follow these instructions to select your display
font:
First, press the H button to activate the CALCULATOR MODES input form.
Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key
(D) to display the DISPLAY MODES input form. The Font: field is
highlighted, and the option Ft8_0:system 8 is selected. This is the default
value of the display font. Pressing the @CHOOS soft menu key (B), will
provide a list of available system fonts, as shown below:
The options available are three standard System Fonts (sizes 8, 7, and 6) and
a Browse.. option. The latter will let you browse the calculator memory for
@CHK@
Page 1-27
additional fonts that you may have created (see Chapter 23) or downloaded
into the calculator.
Practice changing the display fonts to sizes 7 and 6. Press the OK soft menu
key to effect the selection. When done with a font selection, press the @@@OK@@@
soft menu key to go back to the CALCULATOR MODES input form. To return
to normal calculator display at this point, press the @@@OK@@@ soft menu key once
more and see how the stack display change to accommodate the different font.
Selecting properties of the line editor
First, press the H button to activate the CALCULATOR MODES input form.
Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key
(D) to display the DISPLAY MODES input form. Press the down arrow key,
˜, once, to get to the Edit line. This line shows three properties that can be
modified. When these properties are selected (checked) the following effects
are activated:
_Small Changes font size to small
_Full page Allows to place the cursor after the end of the line
_Indent Auto intend cursor when entering a carriage return
Detailed instructions on the use of the line editor are presented in Chapter 2 in
this guide.
Selecting properties of the Stack
First, press the H button to activate the CALCULATOR MODES input form.
Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key
(D) to display the DISPLAY MODES input form. Press the down arrow key,
˜, twice, to get to the Stack line. This line shows two properties that can be
modified. When these properties are selected (checked) the following effects
are activated:
_Small Changes font size to small. This maximized the amount of
information displayed on the screen. Note, this selection
overrides the font selection for the stack display.
_Textbook Display mathematical expressions in graphical mathematical
notation
Page 1-28
To illustrate these settings, either in algebraic or RPN mode, use the equation
writer to type the following definite integral:
‚O…Á0™„虄¸\x™x`
In Algebraic mode, the following screen shows the result of these keystrokes
with neither _Small nor _Textbook are selected:
With the _Small option selected only, the display looks as shown below:
With the _Textbook option selected (default value), regardless of whether the
_Small option is selected or not, the display shows the following result:
Selecting properties of the equation writer (EQW)
First, press the H button to activate the CALCULATOR MODES input form.
Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key
(D) to display the DISPLAY MODES input form. Press the down arrow key,
˜, three times, to get to the EQW (Equation Writer) line. This line shows
two properties that can be modified. When these properties are selected
(checked) the following effects are activated:
_Small Changes font size to small while using the equation
editor
_Small Stack Disp Shows small font in the stack for textbook style
display
Detailed instructions on the use of the equation editor (EQW) are presented
elsewhere in this manual.
Page 1-29
For the example of the integral
0
dXe
X
, presented above, selecting the
_Small Stack Disp in the EQW line of the DISPLAY MODES input form
produces the following display:
Selecting the size of the header
First, press the H button to activate the CALCULATOR MODES input form.
Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key
(D) to display the DISPLAY MODES input form. Press the down arrow key,
˜, four times, to get to the Header line. The value 2 is assigned to the
Header field by default. This means that the top part of the display will
contain two lines, one showing the current settings of the calculator, and a
second one showing the current sub directory within the calculator’s memory
(These lines were described earlier in the manual). The user can select to
change this setting to 1 or 0 to reduce the number of header lines in the
display.
Selecting the clock display
First, press the H button to activate the CALCULATOR MODES input form.
Within the CALCULATOR MODES input form, press the @@DISP@ soft menu key
(D) to display the DISPLAY MODES input form. Press the down arrow key,
˜, four times, to get to the Header line. The Header field will be
highlighted. Use the right arrow key () to select the underline in front of
the options _Clock or _Analog. Toggle the soft menu key until the
desired setting is achieved. If the _Clock option is selected, the time of the
day and date will be shown in the upper right corner of the display. If the
_Analog option is also selected, an analog clock, rather than a digital clock,
will be shown in the upper right corner of the display. If the _Clock option is
not selected, or the header is not present, or too small, the date and time of
day will not be shown in the display.
@CHK@
Page 2-1
Chapter 2
Introducing the calculator
In this chapter we present a number of basic operations of the calculator
including the use of the Equation Writer and the manipulation of data objects
in the calculator. Study the examples in this chapter to get a good grasp of
the capabilities of the calculator for future applications.
Calculator objects
Any number, expression, character, variable, etc., that can be created and
manipulated in the calculator is referred to as an object. Some of the most
useful type of objects are listed below.
Real. These object represents a number, positive or negative, with 12
significant digits and an exponent ranging from -499 to +499. example of
reals are: 1., -5., 56.41564 1.5E45, -555.74E-95
When entering a real number, you can use the V key to enter the exponent
and the \ key to change the sign of the exponent or mantissa.
Note that real must be entered with a decimal point, even if the number does
not have a fractional part. Otherwise the number is taken as an integer
number, which is a different calculator objects. Reals behave as you would
expect a number to when used in a mathematical operation.
Integers. These objects represent integer numbers (numbers without fractional
part) and do not have limits (except the memory of the calculator). Example
of integers are: 1, 564654112, -413165467354646765465487. Note
how these numbers do not have a decimal point.
Due to their storage format, integer numbers are always maintain full
precision in their calculation. For example, an operation such as 30/14, with
integer numbers, will return 15/7 and not 2.142…. To force a real (or
floating-point) result, use function NUM ‚ï.
Integers are used frequently in CAS-based functions as they are designed to
keep full precision in their operation..
Page 2-2
If the approximate mode (APPROX) is selected in the CAS (see Appendix C),
integers will be automatically converted to reals. If you are not planning to use
the CAS, it might be a good idea to switch directly into approximate mode.
Refer to Appendix C for more details.
Mixing integers and reals together or mistaking an integer for a real is a
common occurrence. The calculator will detect such mixing of objects and ask
you if you want to switch to approximate mode.
Complex numbers, are an extension of real numbers that include the unit
imaginary number, i
2
= -1. A complex number, e.g., 3 + 2i, is written as (3,
2) in the calculator.
Complex numbers can be displayed in either Cartesian or polar mode
depending on the setting selected. Note that complex numbers are always
stored in Cartesian mode and that only the display is affected. This allows the
calculator to keep as much precision as possible during calculations.
Most mathematics functions work on complex numbers. There is no need to
use a special “complex +“ function to add complex numbers, you can use the
same + function that on reals or integers.
Vector and matrix operations utilize objects of type 3, real arrays, and, if
needed, type 4, complex arrays. Objects type 2, strings, are simply lines of
text (enclosed between quotes) produced with the alphanumeric keyboard.
A list is just a collection of objects enclosed between curly brackets and
separated by spaces in RPN mode (the space key is labeled #), or by
commas in algebraic mode. Lists, objects of type 5, can be very useful when
processing collections of numbers. For example, the columns of a table can be
entered as lists. If preferred, a table can be entered as a matrix or array.
Objects type 8 are programs in User RPL language. These are simply sets of
instructions enclosed between the symbols << >>.
Associated with programs are objects types 6 and 7, Global and Local
Names, respectively. These names, or variables
, are used to store any type
of objects. The concept of global or local names is related to the scope or
reach of the variable in a given program.
Page 2-3
An algebraic object, or simply, an algebraic (object of type 9), is a valid
algebraic expression enclosed between apostrophes.
Binary integers, objects of type 10, are used in some computer science
applications.
Graphics objects, objects of type 11, store graphics produced by the
calculator.
Tagged objects, objects of type 12, are used in the output of many programs
to identify results. For example, in the tagged object:
Mean: 23.2, the word
Mean: is the tag used to identify the number 23.2 as the mean of a sample, for
example.
Unit objects, objects of type 13, are numerical values with a physical unit
attached to them.
Directories, objects of type 15, are memory locations used to organize your
variables in a similar fashion as folders are used in a personal computer.
Libraries, objects of type 16, are programs residing in memory ports that are
accessible within any directory (or sub-directory) in your calculator. They
resemble built-in functions, objects of type 18, and built-in commands, objects
of type 19, in the way they are used.
Editing expressions in the screen
In this section we present examples of expression editing directly into the
calculator display (algebraic history or RPN stack).
Creating arithmetic expressions
For this example, we select the Algebraic operating mode and select a Fix
format with 3 decimals for the display. We are going to enter the arithmetic
expression:
3
0.20.3
5.7
0.1
0.1
0.5
+
To enter this expression use the following keystrokes:
Page 2-4
5.*„Ü1.+1./7.5™/
„ÜR3.-2.Q3
The resulting expression is: 5.*(1.+1./7.5)/(ƒ3.-2.^3).
Press ` to get the expression in the display as follows:
Notice that, if your CAS is set to EXACT (see Appendix C) and you enter your
expression using integer numbers for integer values, the result is a symbolic
quantity, e.g.,
5*„Ü1+1/7.5™/
„ÜR3-2Q3
Before producing a result, you will be asked to change to Approximate mode.
Accept the change to get the following result (shown in Fix decimal mode with
three decimal places – see Chapter 1):
In this case, when the expression is entered directly into the stack, as soon as
you press `, the calculator will attempt to calculate a value for the
expression. If the expression is entered between quotes, however, the
calculator will reproduce the expression as entered. In the following example,
we enter the same expression as above, but using quotes. For this case we
set the operating mode to Algebraic, the CAS mode to Exact (deselect
_Approx), and the display setting to Textbook. The keystrokes to enter the
expression are the following:
³5*„Ü1+1/7.5™/
„ÜR3-2Q3`
Page 2-5
The result will be shown as follows:
To evaluate the expression we can use the EVAL function, as follows:
µ„î`
As in the previous example, you will be asked to approve changing the CAS
setting to Approx. Once this is done, you will get the same result as before.
An alternative way to evaluate the expression entered earlier between quotes
is by using the option …ï. To recover the expression from the existing
stack, use the following keystrokes: ƒƒ…ï
We will now enter the expression used above when the calculator is set to the
RPN operating mode. We also set the CAS to Exact and the display to
Textbook. The keystrokes to enter the expression between quotes are the
same used earlier, i.e.,
³5*„Ü1+1/7.5™/
„ÜR3-2Q3`
Resulting in the output
Press ` once more to keep two copies of the expression available in the
stack for evaluation. We first evaluate the expression using the function EVAL,
and next using the function NUM. First, evaluate the expression using
function EVAL. The resulting expression is semi-symbolic in the sense that
there are floating-point components to the result, as well as a 3. Next, we
switch stack locations and evaluate using function NUM:
Exchange stack levels 1 and 2 (the SWAP command)
…ï Evaluate using function NUM
Page 2-6
This latter result is purely numerical, so that the two results in the stack,
although representing the same expression, seem different. To verify that they
are not, we subtract the two values and evaluate this difference using function
EVAL:
- Subtract level 1 from level 2
µ Evaluate using function EVAL
The result is zero (0.).
Note: Avoid mixing integer and real data to avoid conflicts in the
calculations. For many physical science and engineering applications,
including numerical solution of equation, statistics applications, etc., the
APPROX mode (see Appendix C) works better. For mathematical
applications, e.g., calculus, vector analysis, algebra, etc., the EXACT mode is
preferred. Become acquainted with operations in both modes and learn how
to switch from one to the other for different types of operations (see Appendix
C).
Editing arithmetic expressions
Suppose that we entered the following expression, between quotes, with the
calculator in RPN mode and the CAS set to EXACT:
rather than the intended expression:
3
23
5.7
1
1
5
+
. The incorrect expression
was entered by using:
³5*„Ü1+1/1.75™/„Ü
R5-2Q3`
To enter the line editor use „˜. The display now looks as follows:
Page 2-7
The editing cursor is shown as a blinking left arrow over the first character in
the line to be edited. Since the editing in this case consists of removing some
characters and replacing them with others, we will use the right and left arrow
keys, š™, to move the cursor to the appropriate place for editing, and the
delete key, ƒ, to eliminate characters.
The following keystrokes will complete the editing for this case:
Press the right arrow key, , until the cursor is immediately to the
right of the decimal point in the term 1.75
Press the delete key, ƒ, twice to erase the characters 1.
Press the right arrow key, , once, to move the cursor to the right of
the 7
Type a decimal point with .
Press the right arrow key, , until the cursor is immediately to the
right of the 5
Press the delete key, ƒ, once to erase the character 5
Type a 3 with 3
Press ` to return to the stack
The edited expression is now available in the stack.
Editing of a line of input when the calculator is in Algebraic operating mode is
exactly the same as in the RPN mode. You can repeat this example in
Algebraic mode to verify this assertion.
Creating algebraic expressions
Algebraic expressions include not only numbers, but also variable names. As
an example, we will enter the following algebraic expression:
Page 2-8
b
L
yR
R
x
L
2
12
+
+
+
We set the calculator operating mode to Algebraic, the CAS to Exact, and the
display to Textbook. To enter this algebraic expression we use the following
keystrokes:
³2*~l*R„Ü1+~„x/~r™/
„ Ü ~r+~„y™+2*~l/~„b
Press ` to get the following result:
Entering this expression when the calculator is set in the RPN mode is exactly
the same as this Algebraic mode exercise.
Editing algebraic expressions
Editing of an algebraic expression with the line editor is very similar to that of
an arithmetic expression (see exercise above). Suppose that we want to
modify the expression entered above to read
b
L
xR
R
x
L
2
12
2
+
+
+
To edit this algebraic expression using the line editor use „˜. This
activates the line editor, showing the expression to be edited as follows:
Page 2-9
The editing cursor is shown as a blinking left arrow over the first character in
the line to be edited. As in an earlier exercise on line editing, we will use the
right and left arrow keys, š™, to move the cursor to the appropriate
place for editing, and the delete key, ƒ, to eliminate characters.
The following keystrokes will complete the editing for this case:
Press the right arrow key, , until the cursor is to the right of the x
Type Q2 to enter the power 2 for the x
Press the right arrow key, , until the cursor is to the right of the y
Press the delete key, ƒ, once to erase the characters y.
Type ~„x to enter an x
Press the right arrow key, , 4 times to move the cursor to the right
of the *
Type R to enter a square root symbol
Type „Ü to enter a set of parentheses (they come in pairs)
Press the right arrow key, , once, and the delete key, ƒ, once,
to delete the right parenthesis of the set inserted above
Press the right arrow key, , 4 times to move the cursor to the right
of the b
Type „Ü to enter a second set of parentheses
Press the delete key, ƒ, once, to delete the left parenthesis of the
set inserted above.
Press ` to return to normal calculator display.
The result is shown next:
Notice that the expression has been expanded to include terms such as
|R|, the absolute value, and SQ(bR), the square of bR. To see if we can
simplify this result, use FACTOR(ANS(1)) in ALG mode:
Page 2-10
Press „˜ to activate the line editor once more. The result is now:
Pressing ` once more to return to normal display.
To see the entire expression in the screen, we can change the option
_Small Stack Disp in the DISPLAY MODES input form (see Chapter 1).
After effecting this change, the display will look as follows:
Note: To use Greek letters and other characters in algebraic expressions use
the CHARS menu. This menu is activated by the keystroke
combination …±. Details are presented in Appendix D.
Using the Equation Writer (EQW) to create expressions
The equation writer is an extremely powerful tool that not only let you enter or
see an equation, but also allows you to modify and work/apply functions on
all or part of the equation. The equation writer (EQW), therefore, allows you
to perform complex mathematical operations, directly, or in a step-by-step
mode, as you would do on paper when solving, for example, calculus
problems.
Page 2-11
The Equation Writer is launched by pressing the keystroke combination
‚O (the third key in the fourth row from the top in the keyboard). The
resulting screen is the following:
The six soft menu keys for the Equation Writer activate the following functions:
@EDIT: lets the user edit an entry in the line editor (see examples above)
@CURS: highlights expression and adds a graphics cursor to it
@BIG: if selected (selection shown by the character in the label) the font used in
the writer is the system font 8 (the largest font available)
@EVAL: lets you evaluate, symbolically or numerically, an expression highlighted
in the equation writer screen (similar to …µ)
@FACTO: lets you factor an expression highlighted in the equation writer screen
(if factoring is possible)
@SIMP: lets you simplify an expression highlighted in the equation writer screen
(as much as it can be simplified according to the algebraic rules of the CAS)
If you press the L key, two more soft menu options show up as shown
below:
The six soft menu keys for the Equation Writer activate the following functions:
@CMDS: allows access to the collection of CAS commands listed in alphabetical
order. This is useful to insert CAS commands in an expression available in the
Equation Writer.
@HELP: activates the calculator’s CAS help facility to provide information and
examples of CAS commands.
Some examples for the use of the Equation Writer are shown below.
Creating arithmetic expressions
Entering arithmetic expressions in the Equation Writer is very similar to
entering an arithmetic expression in the stack enclosed in quotes. The main
difference is that in the Equation Writer the expressions produced are written
Page 2-12
in “textbook” style instead of a line-entry style. Thus, when a division sign
(i.e., /) is entered in the Equation Writer, a fraction is generated and the
cursor placed in the numerator. To move to the denominator you must use the
down arrow key. For example, try the following keystrokes in the Equation
Writer screen: 5/5+2
The result is the expression
The cursor is shown as a left-facing key. The cursor indicates the current
edition location. Typing a character, function name, or operation will enter
the corresponding character or characters in the cursor location. For example,
for the cursor in the location indicated above, type now:
*„Ü5+1/3
The edited expression looks as follows:
Suppose that you want to replace the quantity between parentheses in the
denominator (i.e., 5+1/3) with (5+π
2
/2). First, we use the delete key (ƒ)
delete the current 1/3 expression, and then we replace that fraction with π
2
/2,
as follows: ƒƒƒ„ìQ2
When we hit this point the screen looks as follows:
In order to insert the denominator 2 in the expression, we need to highlight
the entire π
2
expression. We do this by pressing the right arrow key ()
once. At that point, we enter the following keystrokes: /2
Page 2-13
The expression now looks as follows:
Suppose that now you want to add the fraction 1/3 to this entire expression,
i.e., you want to enter the expression:
3
1
)
2
5(25
5
2
+
++
π
First, we need to highlight the entire first term by using either the right arrow
() or the upper arrow () keys, repeatedly, until the entire expression is
highlighted, i.e., seven times, producing:
NOTE: Alternatively, from the original position of the cursor (to the right of the
2 in the denominator of π
2
/2), we can use the keystroke combination ‚—
, interpreted as (‚ ‘ ).
Once the expression is highlighted as shown above, type +1/3 to
add the fraction 1/3. Resulting in:
Showing the expression in smaller-size
To show the expression in a smaller-size font (which could be useful if the
expression is long and convoluted), simply press the @BIG C soft menu key.
For this case, the screen looks as follows:
Page 2-14
To recover the larger-font display, press the @BIG C soft menu key once more.
Evaluating the expression
To evaluate the expression (or parts of the expression) within the Equation
Writer, highlight the part that you want to evaluate and press the @EVAL D
soft menu key.
For example, to evaluate the entire expression in this exercise, first, highlight
the entire expression, by pressing ‚ ‘. Then, press the @EVAL D soft
menu key. If your calculator is set to Exact CAS mode (i.e., the _Approx
CAS mode is not checked), then you will get the following symbolic result:
If you want to recover the unevaluated expression at this time, use the function
UNDO, i.e., …¯(the first key in the third row of keys from the top of the
keyboard). The recovered expression is shown highlighted as before:
If you want a floating-point (numerical) evaluation, use the NUM function
(i.e., …ï). The result is as follows:
Page 2-15
Use the function UNDO ( …¯) once more to recover the original
expression:
Evaluating a sub-expression
Suppose that you want to evaluate only the expression in parentheses in the
denominator of the first fraction in the expression above. You have to use the
arrow keys to select that particular sub-expression. Here is a way to do it:
˜ Highlights only the first fraction
˜ Highlights the numerator of the first fraction
Highlights denominator of the first fraction
˜ Highlights first term in denominator of first fraction
Highlights second term in denominator of first fraction
˜ Highlights first factor in second term in denominator of first fraction
Highlights expression in parentheses in denominator of first fraction
Since this is the sub-expression we want evaluated, we can now press the
@EVAL D soft menu key, resulting in:
A symbolic evaluation once more. Suppose that, at this point, we want to
evaluate the left-hand side fraction only. Press the upper arrow key ()
three times to select that fraction, resulting in:
Page 2-16
Then, press the @EVAL D soft menu key to obtain:
Let’s try a numerical evaluation of this term at this point. Use …ï to
obtain:
Let’s highlight the fraction to the right, and obtain a numerical evaluation of
that term too, and show the sum of these two decimal values in small-font
format by using: …ï C, we get:
To highlight and evaluate the expression in the Equation Writer we use:
D, resulting in:
Editing arithmetic expressions
We will show some of the editing features in the Equation Writer as an
exercise. We start by entering the following expression used in the previous
exercises:
Page 2-17
And will use the editing features of the Equation Editor to transform it into the
following expression:
In the previous exercises we used the arrow keys to highlight sub-expressions
for evaluation. In this case, we will use them to trigger a special editing cursor.
After you have finished entering the original expression, the typing cursor (a
left-pointing arrow) will be located to the right of the 3 in the denominator of
the second fraction as shown here:
Press the down arrow key (˜) to trigger the clear editing cursor. The screen
now looks like this:
By using the left arrow key (š) you can move the cursor in the general left
direction, but stopping at each individual component of the expression. For
example, suppose that we will first will transform the expression π
2
/2 into the
expression LN(π
5
/3) . With the clear cursor active, as shown above, press
the left-arrow key (š) twice to highlight the 2 in the denominator of π
2
/2.
Next, press the delete key (ƒ) once to change the cursor into the insertion
cursor. Press ƒ once more to delete the 2, and then 3 to enter a 3. At
this point, the screen looks as follows:
Page 2-18
Next, press the down arrow key (˜) to trigger the clear editing cursor
highlighting the 3 in the denominator of π
2
/3. Press the left arrow key (š)
once to highlight the exponent 2 in the expression π
2
/3. Next, press the
delete key (ƒ) once to change the cursor into the insertion cursor. Press
ƒ once more to delete the 2, and then 5 to enter a 5. Press the upper
arrow key () three times to highlight the expression π
5
/3. Then, type
‚¹ to apply the LN function to this expression. The screen now looks
like this:
Next, we’ll change the 5 within the parentheses to a ½ by using these
keystrokes: šƒƒ1/2
Next, we highlight the entire expression in parentheses an insert the square
root symbol by using: ————R
Next, we’ll convert the 2 in front of the parentheses in the denominator into a
2/3 by using: šƒƒ2/3
At this point the expression looks as follows:
The final step is to remove the 1/3 in the right-hand side of the expression.
This is accomplished by using: —————™ƒƒƒƒƒ
The final version will be:
In summary, to edit an expression in the Equation Writer you should use the
arrow keys (š™—˜) to highlight expression to which functions will be
applied (e.g., the LN and square root cases in the expression above). Use the
Page 2-19
down arrow key (˜) in any location, repeatedly, to trigger the clear editing
cursor. In this mode, use the left or right arrow keys (š™) to move from
term to term in an expression. When you reach a point that you need to edit,
use the delete key (ƒ) to trigger the insertion cursor and proceed with the
edition of the expression.
Creating algebraic expressions
An algebraic expression is very similar to an arithmetic expression, except
that English and Greek letters may be included. The process of creating an
algebraic expression, therefore, follows the same idea as that of creating an
arithmetic expression, except that use of the alphabetic keyboard is included.
To illustrate the use of the Equation Writer to enter an algebraic equation we
will use the following example. Suppose that we want to enter the expression:
+
+
3/1
2
3
2
θ
µ
λ
µ
yx
LNe
Use the following keystrokes:
2 / R3 ™™ * ~‚n+ „¸\ ~‚m
™™ * ‚¹ ~„x + 2 * ~‚m * ~‚c
~„y ——— / ~‚t Q1/3
This results in the output:
In this example we used several lower-case English letters, e.g., x
(~„x), several Greek letters, e.g., λ (~‚n), and even a
combination of Greek and English letters, namely, y (~‚c
~„y). Keep in mind that to enter a lower-case English letter, you need
to use the combination: ~„ followed by the letter you want to enter.
Also, you can always copy special characters by using the CHARS menu
(…±) if you don’t want to memorize the keystroke combination that
produces it. A listing of commonly used ~‚keystroke combinations
was listed in an earlier section.
Page 2-20
The expression tree
The expression tree is a diagram showing how the Equation Writer interprets
an expression. See Appendix E for a detailed example.
The CURS function
The CURS function (@CURS) in the Equation Writer menu (the B key) converts
the display into a graphical display and produces a graphical cursor that can
be controlled with the arrow keys (š™—˜) for selecting sub-
expressions. The sub-expression selected with @CURS will be shown framed in
the graphics display. After selecting a sub-expression you can press ` to
show the selected sub-expression highlighted in the Equation writer. The
following figures show different sub-expressions selected with and the
corresponding Equation Writer screen after pressing `.
Editing algebraic expressions
The editing of algebraic equations follows the same rules as the editing of
algebraic equations. Namely:
Use the arrow keys (š™—˜) to highlight expressions
Use the down arrow key (˜), repeatedly, to trigger the clear editing
cursor . In this mode, use the left or right arrow keys (š™) to
move from term to term in an expression.
Page 2-21
At an editing point, use the delete key (ƒ) to trigger the insertion
cursor and proceed with the edition of the expression.
To see the clear editing cursor in action, let’s start with the algebraic
expression that we entered in the exercise above:
Press the down arrow key, ˜, at its current location to trigger the clear
editing cursor. The 3 in the exponent of θ will be highlighted. Use the left
arrow key, š, to move from element to element in the expression. The order
of selection of the clear editing cursor in this example is the following (press
the left arrow key, š, repeatedly):
1. The 1 in the 1/3 exponent
2. θ
3. y
4. µ
5. 2
6. x
7. µ in the exponential function
8. λ
9. 3 in the 3 term
10. the 2 in the 2/3 fraction
At any point we can change the clear editing cursor into the insertion cursor
by pressing the delete key (ƒ). Let’s use these two cursors (the clear editing
cursor and the insertion cursor) to change the current expression into the
following:
If you followed the exercise immediately above, you should have the clear
editing cursor on the number 2 in the first factor in the expression. Follow
these keystrokes to edit the expression:
Page 2-22
~‚2 Enters the factorial for the 3 in the square root
(entering the factorial changes the cursor to the selection cursor)
˜˜™™ Selects the µ in the exponential function
/3*~‚f Modifies exponential function argument
™™™™ Selects y
R Places a square root symbol on y
(this operation also changes the cursor to the selection cursor)
˜˜ ™—— S Select θ
1/3
and enter the SIN function
The resulting screen is the following:
Evaluating a sub-expression
Since we already have the sub-expression
(
)
3/1
θSIN highlighted, let’s press
the @EVAL D soft menu key to evaluate this sub-expression. The result is:
Some algebraic expressions cannot be simplified anymore. Try the following
keystrokes: —D. You will notice that nothing happens, other than the
highlighting of the entire argument of the LN function. This is because this
expression cannot be evaluated (or simplified) any more according to the
CAS rules. Trying the keystrokes: —D again does not produce any
changes on the expression. Another sequence of —D keystrokes,
however, modifies the expression as follows:
One more application of the —D keystrokes produces more changes:
Page 2-23
This expression does not fit in the Equation Writer screen. We can see the
entire expression by using a smaller-size font. Press the @BIG C soft menu
key to get:
Even with the larger-size font, it is possible to navigate through the entire
expression by using the clear editing cursor. Try the following keystroke
sequence: C˜˜˜˜, to set the clear editing cursor atop the factor
3 in the first term of the numerator. Then, press the right arrow key, , to
navigate through the expression.
Simplifying an expression
Press the @BIG C soft menu key to get the screen to look as in the previous
figure (see above). Now, press the @SIMP C soft menu key, to see if it is
possible to simplify this expression as it is shown in the Equation Writer. The
result is the following screen:
This screen shows the argument of the SIN function, namely,
3
θ ,
transformed into
3
)(θLN
e . This may not seem like a simplification, but it is in
the sense that the cubic root function has been replaced by the inverse
functions exp-LN.
Page 2-24
Factoring an expression
In this exercise we will try factoring a polynomial expression. To continue the
previous exercise, press the ` key. Then, launch the Equation Writer again
by pressing the ‚O key. Type the equation:
XQ2™+2*X*~y+~y Q2™-
~‚a Q2™™+~‚b Q2
resulting in
Let’s select the first 3 terms in the expression and attempt a factoring of this
sub-expression: ‚—˜‚™‚™ . This produces:
Now, press the @FACTO soft menu key, to get
Press ‚¯to recover the original expression. Next, enter the following
keystrokes: ˜˜˜™™™™™™™———‚™ to select
the last two terms in the expression, i.e.,
press the soft menu key, to get
Press ‚¯to recover the original expression. Now, let’s select the entire
expression by pressing the upper arrow key () once. And press the
@FACTO soft menu key, to get
@FACTO
Page 2-25
Press ‚¯to recover the original expression.
Note: Pressing the @EVAL or the @SIMP soft menu keys, while the entire original
expression is selected, produces the following simplification of the expression:
Using the CMDS menu key
With the original polynomial expression used in the previous exercise still
selected, press the L key to show the @CMDS and @HELP soft menu keys.
These two commands belong to the second part of the soft menu available
with the Equation Writer. Let’s try this example as an application of the @CMDS
soft menu key: Press the @CMDS soft menu key to get the list of CAS commands:
Next, select the command DERVX (the derivative with respect to the variable X,
the current CAS independent variable) by using: ~d˜˜˜ .
Command DERVX will now be selected:
Press the @@OK@@ soft menu key (F), to get:
Page 2-26
Next, press the L key to recover the original Equation Writer menu, and
press the @EVAL@ soft menu key (D) to evaluate this derivative. The result is:
Using the HELP menu
Press the L key to show the @CMDS and @HELP soft menu keys. Press the @HELP
soft menu key to get the list of CAS commands. Then, press ~ d ˜ ˜
˜ to select the command DERVX. Press the @@OK@@ soft menu key (F), to get
information on the command DERVX:
Detailed explanation on the use of the help facility for the CAS is presented in
Chapter 1. To return to the Equation Writer, press the @EXIT soft menu key.
Press the ` key to exit the Equation Writer.
Using the editing functions BEGIN, END, COPY, CUT and PASTE
To facilitate editing, whether with the Equation Writer or on the stack, the
calculator provides five editing functions, BEGIN, END, COPY, CUT and
PASTE, activated by combining the right-shift key () with keys (2,1), (2,2),
(3,1), (3,2), and (3,3), respectively. These keys are located in the leftmost
part of rows 2 and 3. The action of these editing functions are as follows:
BEGIN: marks the beginning of a string of characters for editing
END: marks the ending of a string of characters for editing
COPY: copies the string of characters selected by BEGIN and END
CUT: cuts the string of characters selected by BEGIN and END
PASTE: pastes a string of characters, previously copied or cut, into the current
cursor position
To see and example, lets start the Equation Writer and enter the following
expression (used in an earlier exercise):
Page 2-27
2 / R3 ™™ * ~‚m + „¸\ ~‚m
™™ * ‚¹ ~„x + 2 * ~‚m * ~‚c
~„y ——— / ~‚t Q1/3
The original expression is the following:
We want to remove the sub-expression x+2⋅λ⋅∆y from the argument of the LN
function, and move it to the right of the λ in the first term. Here is one
possibility: ˜ššš———‚ªšš—*‚¬
The modified expression looks as follows:
Next, we’ll copy the fraction 2/3 from the leftmost factor in the expression,
and place it in the numerator of the argument for the LN function. Try the
following keystrokes:
˜˜šš———‚¨˜˜
‚™ššš‚¬
The resulting screen is as follows:
The functions BEGIN and END are not necessary when operating in the
Equation Writer, since we can select strings of characters by using the arrow
keys. Functions BEGIN and END are more useful when editing an expression
with the line editor. For example, let’s select the expression x+2⋅λ⋅∆y from this
expression, but using the line editor within the Equation Writer, as follows:
‚—A
The line editor screen will look like this (quotes shown only if calculator in RPN
mode):
Page 2-28
To select the sub-expression of interest, use:
™™™™™™™™‚¢
™™™™™™™™™™‚¤
The screen shows the required sub-expression highlighted:
We can now copy this expression and place it in the denominator of the LN
argument, as follows:‚¨™™… (27 times) …
ƒƒ… (9 times) … ƒ ‚¬
The line editor now looks like this:
Pressing ` shows the expression in the Equation Writer (in small-font format,
press the @BIG C soft menu key):
Press ` to exit the Equation Writer.
Creating and editing summations, derivatives, and integrals
Summations, derivatives, and integrals are commonly used for calculus,
probability and statistics applications. In this section we show some examples
of such operations created with the equation writer. Use ALG mode.
Summations
We will use the Equation Writer to enter the following summation:
=1
2
1
k
k
Page 2-29
Press ‚O to activate the Equation Writer. Then press ‚½to enter
the summation sign. Notice that the sign, when entered into the Equation
Writer screen, provides input locations for the index of the summation as well
as for the quantity being summed. To fill these input locations, use the
following keystrokes:
~„k™1™„è™1/~„kQ2
The resulting screen is:
To see the corresponding expression in the line editor, press ‚— and the
A soft menu key, to show:
This expression shows the general form of a summation typed directly in the
stack or line editor:
Σ(index = starting_value, ending_value, summation expression)
Press ` to return to the Equation Writer. The resulting screen shows the
value of the summation,
To recover the unevaluated summation use ‚¯. To evaluate the
summation again, you can use the D soft menu key. This shows again that
6
1
2
1
2
π
=
=k
k
.
You can use the Equation Writer to prove that
+∞=
=1
1
k
k
.
This summation (representing an infinite series) is said to diverge.
Double summations are also possible, for example:
Page 2-30
Derivatives
We will use the Equation Writer to enter the following derivative:
)(
2
δβα ++ tt
dt
d
Press ‚O to activate the Equation Writer. Then press ‚¿to enter
the (partial) derivative sign. Notice that the sign, when entered into the
Equation Writer screen, provides input locations for the expression being
differentiated and the variable of differentiation. To fill these input locations,
use the following keystrokes:
~„t™~‚a*~„tQ2
™™+~‚b*~„t+~‚d
The resulting screen is the following:
To see the corresponding expression in the line editor, press ‚— and the
A soft menu key, to show:
This indicates that the general expression for a derivative in the line editor or
in the stack is: variable(function of variables)
Press ` to return to the Equation Writer. The resulting screen is not the
derivative we entered, however, but its symbolic value, namely,
To recover the derivative expression use ‚¯. To evaluate the derivative
again, you can use the D soft menu key. This shows again that
Page 2-31
βαδβα +=+ ttt
dt
d
2)(
2
.
Second order derivatives are possible, for example:
which evaluates to:
Note: The notation
()
x
is proper of partial derivatives. The proper
notation for total derivatives (i.e., derivatives of one variable) is
()
dx
d
. The
calculator, however, does not distinguish between partial and total
derivatives.
Definite integrals
We will use the Equation Writer to enter the following definite
integral:
τ
0
)sin( dttt . Press ‚O to activate the Equation Writer.
Then press ‚ Á to enter the integral sign. Notice that the sign, when
entered into the Equation Writer screen, provides input locations for the limits
of integration, the integrand, and the variable of integration. To fill these
input locations, use the following keystrokes:0™~‚u™~ „
t*S~„t™~„t. The resulting screen is the following:
To see the corresponding expression in the line editor, press —— and the
A soft menu key, to show:
Page 2-32
This indicates that the general expression for a derivative in the line editor or
in the stack is: (lower_limit, upper_limit,integrand,variable_of_integration)
Press ` to return to the Equation Writer. The resulting screen is not the
definite integral we entered, however, but its symbolic value, namely,
To recover the derivative expression use ‚¯. To evaluate the derivative
again, you can use the D soft menu key. This shows again that
)cos()sin()sin(
0
τττ
τ
=
dttt
Double integrals are also possible. For example,
which evaluates to 36. Partial evaluation is possible, for example:
This integral evaluates to 36.
Organizing data in the calculator
You can organize data in your calculator by storing variables in a directory
tree. To understand the calculator’s memory, we first take a look at the file
directory. Press the keystroke combination „¡ (first key in second row
of keys from the top of the keyboard) to get the calculator’s File Manager
screen:
Page 2-33
This screen gives a snapshot of the calculator’s memory and of the directory
tree. The screen shows that the calculator has three memory ports (or memory
partitions), port 0:IRAM, port 1:ERAM, and port 2:FLASH . Memory ports are
used to store third party application or libraries, as well as for backups. The
size of the three different ports is also indicated. The fourth and subsequent
lines in this screen show the calculator’s directory tree. The top directory
(currently highlighted) is the Home directory, and it has predefined into it a
sub-directory called CASDIR. The File Manager screen has three functions
associated with the soft-menu keys:
@CHDIR (A): Change to selected directory
@CANCL (E): Cancel action
@@OK@@ (F): Approve a selection
For example, to change directory to the CASDIR, press the down-arrow key,
˜, and press @CHDIR (A). This action closes the File Manager window
and returns us to normal calculator display. You will notice that the second
line from the top in the display now starts with the characters { HOME
CASDIR } indicating that the current directory is CASDIR within the HOME
directory.
Functions for manipulation of variables
This screen includes 20 commands associated with the soft menu keys that
can be used to create, edit, and manipulate variables. The first six functions
are the following:
@EDIT To edit a highlighted variable
@COPY To copy a highlighted variable
@MOVE To move a highlighted variable
@@RCL@ To recall the contents of a highlighted variable
@EVAL To evaluate a highlighted variable
@TREE To see the directory tree where the variable is contained
If you press the L key, the next set of functions is made available:
@PURGE To purge, or delete, a variable
Page 2-34
@RENAM To rename a variable
@NEW To create a new variable
@ORDER To order a set of variables in the directory
@SEND To send a variable to another calculator or computer
@RECV To receive a variable from another calculator or computer
If you press the L key, the third set of functions is made available:
@HALT To return to the stack temporarily
@VIEW To see contents of a variable
@EDITB To edit contents of a binary variable (similar to @EDIT)
@HEADE To show the directory containing the variable in the header
@LIST Provides a list of variable names and description
@SORT To sort variables according to a sorting criteria
If you press the L key, the last set of functions is made available:
@XSEND To send variable with X-modem protocol
@CHDIR To change directory
To move between the different soft menu commands, you can use not only the
NEXT key (L), but also the PREV key („«).
The user is invited to try these functions on his or her own. Their applications
are straightforward.
The HOME directory
The HOME directory, as pointed out earlier, is the base directory for memory
operation for the calculator. To get to the HOME directory, you can press the
UPDIR function („§) -- repeat as needed -- until the {HOME} spec is
shown in the second line of the display header. Alternatively, you can use
(hold) §, press ` if in the algebraic mode. For this example, the
HOME directory contains nothing but the CASDIR. Pressing J will show
the variables in the soft menu keys:
Subdirectories
To store your data in a well organized directory tree you may want to create
subdirectories under the HOME directory, and more subdirectories within
Page 2-35
subdirectories, in a hierarchy of directories similar to folders in modern
computers. The subdirectories will be given names that may reflect the
contents of each subdirectory, or any arbitrary name that you can think of.
The CASDIR sub-directory
The CASDIR sub-directory contains a number of variables needed by the
proper operation of the CAS (Computer Algebraic System, see appendix C).
To see the contents of the directory, we can use the keystroke combination:
„¡which opens the File Manager once more:
This time the CASDIR is highlighted in the screen. To see the contents of the
directory press the @@OK@@ (F) soft menu key or `, to get the following
screen:
The screen shows a table describing the variables contained in the CASDIR
directory. These are variables pre-defined in the calculator memory that
establish certain parameters for CAS operation (see appendix C). The table
above contains 4 columns:
The first column indicate the type of variable (e.g., ‘EQ’ means an
equation-type variable, |R indicates a real-value variable, { } means a list,
nam means ‘a global name’, and the symbol
represents a graphic
variable.
The second column represents the name of the variables, i.e., PRIMIT,
CASINFO, MODULO, REALASSUME, PERIOD, VX, and EPS.
Column number 3 shows another specification for the variable type, e.g.,
ALG means an algebraic expression, GROB stands for graphics object,
INTG means an integer numeric variable, LIST means a list of data,
Page 2-36
GNAME means a global name, and REAL means a real (or floating-point)
numeric variable.
The fourth and last column represents the size, in bytes, of the variable
truncated, without decimals (i.e., nibbles). Thus, for example, variable
PERIOD takes 12.5 bytes, while variable REALASSUME takes 27.5 bytes
(1 byte = 8 bits, 1 bit is the smallest unit of memory in computers and
calculators).
CASDIR Variables in the stack
Pressing the $ key closes the previous screen and returns us to normal
calculator display. By default, we get back the TOOL menu:
We can see the variables contained in the current directory, CASDIR, by
pressing the J key (first key in the second row from the top of the
keyboard). This produces the following screen:
Pressing the L key shows one more variable stored in this directory:
To see the contents of the variable EPS, for example, use @EPS@. This
shows the value of EPS to be .0000000001
To see the value of a numerical variable, we need to press only the soft
menu key for the variable. For example, pressing cz followed by `,
shows the same value of the variable in the stack, if the calculator is set to
Algebraic. If the calculator is set to RPN mode, you need only press the
soft menu key for `.
To see the full name of a variable, press the apostrophe first ³, and
then the soft menu key corresponding to the variable. For example, for
the variable listed in the stack as PERIO, we use: ³@PERIO@, which
produces as output the string: 'PERIOD'. This procedure applies to
both the Algebraic and RPN calculator operating modes.
Variables in CASDIR
The default variables contained in the CASDIR directory are the following:
PRIMIT Latest primitive (anti-derivative) calculated, not a default
Page 2-37
variable, but one created by a previous exercise
CASINFO a graph that provides CAS information
MODULO Modulo for modular arithmetic (default = 13)
REALASSUME List of variable names assumed as real values
PERIOD Period for trigonometric functions (default = 2π)
VX Name of default independent variable (default = X)
EPS Value of small increment (epsilon), (default = 10
-10
)
These variables are used for the operation of the CAS.
Typing directory and variable names
To name subdirectories, and sometimes, variables, you will have to type
strings of letters at once, which may or may not be combined with numbers.
Rather than pressing the ~, ~„, or ~‚ key combinations to
type each letter, you can hold down the ~key and enter the various letter.
You can also lock the alphabetic keyboard temporarily and enter a full name
before unlocking it again. The following combinations of keystrokes will lock
the alphabetic keyboard:
~~ locks the alphabetic keyboard in upper case. When locked in this
fashion, pressing the before a letter key produces a lower case letter,
while pressing the key before a letter key produces a special character.
If the alphabetic keyboard is already locked in upper case, to lock it in lower
case, type, „~
~~„~ locks the alphabetic keyboard in lower case. When locked
in this fashion, pressing the before a letter key produces an upper case
letter. To unlock lower case, press „~
To unlock the upper-case locked keyboard, press ~
Let’s try some exercises typing directory/variable names in the stack.
Assuming that the calculator is in the Algebraic mode of operation (although
the instructions work as well in RPN mode), try the following keystroke
sequences. With these commands we will be typing the words ‘MATH’,
‘Math’, and ‘MatH’
Page 2-38
³~~math`
³~~m„a„t„h`
³~~m„~at„h`
The calculator display will show the following (left-hand side is Algebraic
mode, right-hand side is RPN mode):
Note: if system flag 60 is set, you can lock the alphabetical keyboard by just
pressing ~. See Chapter 1 for more information on system flags.
Creating subdirectories
Subdirectories can be created by using the FILES environment or by using the
command CRDIR. The two approaches for creating sub-directories are
presented next.
Using the FILES menu
Regardless of the mode of operation of the calculator (Algebraic or RPN), we
can create a directory tree, based on the HOME directory, by using the
functions activated in the FILES menu. Press „¡ to activate the FILES
menu. If the HOME directory is not already highlighted in the screen, i.e.,
use the up and down arrow keys (—˜) to highlight it. Then, press the
@@OK@@ (F) soft menu key. The screen may look like this:
Page 2-39
showing that only one object exists currently in the HOME directory, namely,
the CASDIR sub-directory. Let’s create another sub-directory called MANS
(for MANualS) where we will store variables developed as exercises in this
manual. To create this sub-directory first enter: L @@NEW@@ (C) . This will
produce the following input form:
The Object input field, the first input field in the form, is highlighted by default.
This input field can hold the contents of a new variable that is being created.
Since we have no contents for the new sub-directory at this point, we simply
skip this input field by pressing the down-arrow key, ˜, once. The Name
input field is now highlighted:
This is where we enter the name of the new sub-directory (or variable, as the
case may be), as follows: ~~mans`
The cursor moves to the _Directory check field. Press the (C) soft menu
key to specify that you are creating a directory, and press @@OK@@ to exit the
input form. The variable listing for the HOME directory will be shown in the
screen as follows:
The screen indicates that there is a new directory (MANS) within the HOME
directory.
@CHK@
Page 2-40
Next, we will create a sub-directory named INTRO (for INTROduction), within
MANS, to hold variables created as exercise in subsequent sections of this
chapter. Press the $ key to return to normal calculator display (the TOOLS
menu will be shown). Then, press J to show the HOME directory contents
in the soft menu key labels. The display may look like this (if you have
created other variables in the HOME directory they will show in the soft menu
key labels too):
To move into the MANS directory, press the corresponding soft menu key
(A in this case), and ` if in algebraic mode. The directory tree will be
shown in the second line of the display as {HOME MANS}. However, there
will be no labels associated with the soft menu keys, as shown below,
because there are no variables defined within this directory.
Let’s create the sub-directory INTRO by using:
„¡@@OK@@ L @@NEW@@ ˜ ~~intro` @@CHK@@ @@OK@@
Press the $ key, followed by the J key, to see the contents of the MANS
directory as follows:
Press the )!INTRO soft menu key to move into the INTRO sub-directory. This will
show an empty sub-directory. Later on, we will do some exercises in creating
variables.
Using the command CRDIR
The command CRDIR can be used to create directories. This command is
available through the command catalog key (the ‚N key, second key in
fourth row of keys from the top of the keyboard), through the programming
menus (the „°key, same key as the ‚N key), or by simply typing it.
Through the catalog key
Press ‚N~c. Use the up and down arrow keys (—˜) to
locate the CRDIR command. Press the @@OK@@ soft menu key to activate the
command.
Through the programming menus
Press „°. This will produce the following pull-down menu for
programming:
Page 2-41
Use the down arrow key (˜) to select the option 2. MEMORY… , or just
press 2. Then, press @@OK@@. This will produce the following pull-down
menu:
Use the down arrow key (˜) to select the 5. DIRECTORY option, or just
press 5. Then, press @@OK@@. This will produce the following pull-down
menu:
Use the down arrow key (˜) to select the 5. CRDIR option, and press
@@OK@@.
Command CRDIR in Algebraic mode
Once you have selected the CRDIR through one of the means shown above,
the command will be available in your stack as follows:
At this point, you need to type a directory name, say chap1 :
~~„~chap1~`
The name of the new directory will be shown in the soft menu keys, e.g.,
Page 2-42
Command CRDIR in RPN mode
To use the CRDIR in RPN mode you need to have the name of the directory
already available in the stack before accessing the command. For example:
~~„~chap2~`
Then access the CRDIR command by either of the means shown above, e.g.,
through the ‚N key:
Press the @@OK@ soft menu key to activate the command, to create the sub-
directory:
Moving among subdirectories
To move down the directory tree, you need to press the soft menu key
corresponding to the sub-directory you want to move to. The list of variables
in a sub-directory can be produced by pressing the J (VARiables) key. To
move up in the directory tree, use the function UPDIR, i.e., enter „§.
Alternatively, you can use the FILES menu, i.e., press „¡. Use the up
and down arrow keys (—˜) to select the sub-directory you want to move
to, and then press the !CHDIR (CHange DIRectory) or A soft menu key. This
will show the contents of the sub-directory you moved to in the soft menu key
labels.
Deleting subdirectories
To delete a sub-directory, use one of the following procedures:
Using the FILES menu
Press the „¡ key to trigger the FILES menu. Select the directory
containing the sub-directory you want to delete, and press the !CHDIR if needed.
This will close the FILES menu and display the contents of the directory you
selected. In this case you will need to press `. Press the @@OK@@ soft menu
Page 2-43
key to list the contents of the directory in the screen. Select the sub-directory
(or variable) that you want to delete. Press L@PURGE. A screen similar to the
following will be shown:
The ‘S2’ string in this form is the name of the sub-directory that is being
deleted. The soft menu keys provide the following options:
@YES@ (A) Proceed with deleting the sub-directory (or variable)
@ALL@ (B) Proceed with deleting all sub-directories (or variables)
!ABORT (E) Do not delete sub-directory (or variable) from a list
@@NO@@ (F) Do not delete sub-directory (or variable)
After selecting one of these four commands, you will be returned to the screen
listing the contents of the sub-directory. The !ABORT command, however, will
show an error message:
and you will have to press @@OK@@, before returning to the variable listing.
Using the command PGDIR
The command PGDIR can be used to purge directories. Like the command
CRDIR, the PGDIR command is available through the ‚N or through the
„°key, or it can simply be typed in.
Through the catalog key
Press ‚N~~pg. This should highlight the PGDIR command.
Press the @@OK@@ soft menu key to activate the command.
Through the programming menus
Press „°. This will produce the following pull-down menu for
programming:
Page 2-44
Use the down arrow key (˜) to select the option 2. MEMORY… Then,
press @@OK@@. This will produce the following pull-down menu:
Use the down arrow key (˜) to select the 5. DIRECTORY option. Then,
press @@OK@@. This will produce the following pull-down menu:
Use the down arrow key (˜) to select the 6. PGDIR option, and press
@@OK@@.
Command PGDIR in Algebraic mode
Once you have selected the PGDIR through one of the means shown above,
the command will be available in your stack as follows:
At this point, you need to type the name of an existing directory, say S4 :
~s4`
As a result, sub-directory )@@S4@@ is deleted:
Instead of typing the name of the directory, you can simply press the
corresponding soft menu key at the listing of the PGDIR( ) command, e.g.,
Page 2-45
Press @@OK@@, to get:
Then, press )@@S3@@ to enter ‘S3’ as the argument to PGDIR.
Press ` to delete the sub-directory:
Command PGDIR in RPN mode
To use the PGDIR in RPN mode you need to have the name of the directory,
between quotes, already available in the stack before accessing the command.
For example: ³~s2`
Then access the PGDIR command by either of the means shown above, e.g.,
through the ‚N key:
Press the @@OK@ soft menu key to activate the command and delete the sub-
directory:
Page 2-46
Using the PURGE command from the TOOL menu
The TOOL menu is available by pressing the I key (Algebraic and RPN
modes shown):
The PURGE command is available by pressing the @PURGE soft menu key (E).
In the following examples we want to delete sub-directory S1:
Algebraic mode: Enter @PURGE J)@@S1@@`
RPN mode: Enter @S1@@ `I@PURGE J
Variables
Variables are like files on a computer hard drive. One variable can store one
object (numerical values, algebraic expressions, lists, vectors, matrices,
programs, etc). Even sub-directories can be through of as variables (in fact, in
the calculator, a subdirectory is also a type of calculator object).
Variables are referred to by their names, which can be any combination of
alphabetic and numerical characters, starting with a letter (either English or
Greek). Some non-alphabetic characters, such as the arrow () can be used
in a variable name, if combined with an alphabetical character. Thus, ‘A’
is a valid variable name, but ‘’ is not. Valid examples of variable names
are: ‘A’, ‘B’, ‘a’, ‘b’, ‘α’, ‘β’, ‘A1’, ‘AB12’, ‘A12’,’Vel’,’Z0’,’z1’, etc.
A variable can not have the same name than a function of the calculator. You
can not have a SIN variable for example as there is a SIN command in the
calculator. The reserved calculator variable names are the following:
ALRMDAT, CST, EQ, EXPR, IERR, IOPAR, MAXR, MINR, PICT, PPAR, PRTPAR,
VPAR, ZPAR, der_, e, i, n1,n2, …, s1, s2, …, ΣDAT, ΣPAR, π,
Variables can be organized into sub-directories.
Creating variables
To create a variable, we can use the FILES menu, along the lines of the
examples shown above for creating a sub-directory. For example, within the
Page 2-47
sub-directory {HOME MANS INTRO}, created in an earlier example, we
want to store the following variables with the values shown:
Name Contents Type
A 12.5 real
α
-0.25 real
A12 3×10
5
real
Q ‘r/(m+r)' algebraic
R [3,2,1] vector
z1 3+5i complex
p1 << r 'π*r^2' >> program
Using the FILES menu
We will use the FILES menu to enter the variable A. We assume that we are
in the sub-directory {HOME MANS INTRO}. To get to this sub-directory,
use the following: „¡ and select the INTRO sub-directory as shown in
this screen:
Press @@OK@@ to enter the directory. You will get a files listing with no entries
(the INTRO sub-directory is empty at this point)
Press the L key to move to the next set of soft menu keys, and press the
@@NEW@@ soft menu key. This will produce the NEW VARIABLE input form:
Page 2-48
To enter variable A (see table above), we first enter its contents, namely, the
number 12.5, and then its name, A, as follows: 12.5
@@OK@@ ~a@@OK@@. Resulting in the following screen:
Press @@OK@@ once more to create the variable. The new variable is shown in the
following variable listing:
The listing indicates a real variable (
|R), whose name is A, and that occupies
10.5 bytes of memory. To see the contents of the variable in this screen,
press L@VIEW@.
Press the @GRAPH (A) soft menu key to see the contents in a graphical
format.
Press the @TEXT (A) soft menu key to see the contents in text format.
Press @@OK@@ to return to the variable list
Press $ once more to return to normal display. Variable A should now
be featured in the soft menu key labels:
Using the STO command
A simpler way to create a variable is by using the STO command (i.e., the
K key). We provide examples in both the Algebraic and RPN modes, by
creating the remaining of the variables suggested above, namely:
Page 2-54
Check the new contents of variable A12 by using @@A12@@ .
Using the RPN operating mode:
³~‚b/2` ³@@A12@@ ` K
or, in a simplified way,
³~‚b/2™ ³@@A12@@ K
Using the left-shift key followed by the variable’s soft menu key (RPN)
This is a very simple way to change the contents of a variable, but it only
works in the RPN mode. The procedure consists in typing the new contents of
the variable and entering them into the stack, and then pressing the left-shift
key followed by the variable’s soft menu key. For example, in RPN, if we
want to change the contents of variable z1 to ‘a+bi ’, use:
³~„a+~„b*„¥`
This will place the algebraic expression ‘a+bi ’ in level 1: in the stack. To
enter this result into variable z1, use: J„@@@z1@@
To check the new contents of z1, use: @@@z1@@
An equivalent way to do this in Algebraic mode is the following:
~„a+~„b*„¥` K @@@z1@@ `
To check the new contents of z1, use: @@@z1@@
Using the ANS(1) variable (Algebraic mode)
In Algebraic mode one can use the ANS(1) variable to replace the contents of
a variable. For example, the procedure for changing the contents of z1 to
a+bi’ is the following: „î K @@@z1@@ `. To check the new
contents of z1, use: @@@z1@@
Copying variables
The following exercises show different ways of copying variables from one
sub-directory to another.
Using the FILES menu
To copy a variable from one directory to another you can use the FILES menu.
For example, within the sub-directory {HOME MANS INTRO}, we have
Page 2-55
variables p1, z1, R, Q, A12, α, and A. Suppose that we want to copy
variable A and place a copy in sub-directory {HOME MANS}. Also, we will
copy variable R and place a copy in the HOME directory. Here is how to do
it: Press „¡@@OK@@ to produce the following list of variables:
Use the down-arrow key ˜ to select variable A (the last in the list), then
press @@COPY@. The calculator will respond with a screen labeled PICK
DESTINATION:
Use the up arrow key to select the sub-directory MANS and press @@OK@@. If
you now press „§, the screen will show the contents of sub-directory
MANS (notice that variable A is shown in this list, as expected):
Press $ @INTRO@ `(Algebraic mode), or $ @INTRO@ (RPN mode) to return
to the INTRO directory. Press „¡@@OK@@ to produce the list of variables in
{HOME MANS INTRO}. Use the down arrow key (˜) to select variable R,
then press @@COPY@. Use the up arrow key () to select the HOME directory,
and press @@OK@@. If you now press „§, twice, the screen will show the
contents of the HOME directory, including a copy of variable R:
Page 2-56
Using the history in Algebraic mode
Here is a way to use the history (stack) to copy a variable from one directory
to another with the calculator set to the Algebraic mode. Suppose that we are
within the sub-directory {HOME MANS INTRO}, and want to copy the
contents of variable z1 to sub-directory {HOME MANS}. Use the following
procedure:@@z1@ K@@z1@ ` This simply stores the contents of z1 into
itself (no change effected on z1). Next, use „§` to move to the
{HOME MANS} sub-directory. The calculator screen will look like this:
Next, use the delete key three times, to remove the last three lines in the
display: ƒ ƒ ƒ. At this point, the stack is ready to execute the
command ANS(1)z1. Press ` to execute this command. Then, use
@@z1@, to verify the contents of the variable.
Using the stack in RPN mode
To demonstrate the use of the stack in RPN mode to copy a variable from one
sub-directory to another, we assume you are within sub-directory {HOME
MANS INTRO}, and that we will copy the contents of variable z1 into the
HOME directory. Use the following procedure:@@z1@ @@z1@ `
This procedure lists the contents and the name of the variable in the stack.
The calculator screen will look like this:
Now, use „§„§ to move to the HOME directory, and press K
to complete the operation. Use @@z1@, to verify the contents of the variable.
Copying two or more variables using the stack in Algebraic mode
The following is an exercise to demonstrate how to copy two or more
variables using the stack when the calculator is in Algebraic mode. Suppose,
once more, that we are within sub-directory {HOME MANS INTRO} and that
we want to copy the variables R and Q into sub-directory {HOME MANS}.
The keystrokes necessary to complete this operation are shown following:
@@ @R@@ K@@@R@@ `
Page 2-57
@@ @Q@@ K@@@Q@@ `
„§`
ƒ ƒ ƒ`
ƒ ƒ ƒ ƒ `
To verify the contents of the variables, use @@ @R@ and @@ @Q.
This procedure can be generalized to the copying of three or more variables.
Copying two or more variables using the stack in RPN mode
The following is an exercise to demonstrate how to copy two or more
variables using the stack when the calculator is in RPN mode. We assume,
again, that we are within sub-directory {HOME MANS INTRO} and that we
want to copy the variables R and Q into sub-directory {HOME MANS}. The
keystrokes necessary to complete this operation are shown following:
@@ @R@@ ³@@@R@@ `
@@ @Q@@ ³@@@Q@@ `
„§K K
To verify the contents of the variables, use @@ @R@ and @@ @Q.
This procedure can be generalized to the copying of three or more variables.
Reordering variables in a directory
In this section we illustrate the use of the ORDER command to reorder the
variables in a directory. We assume we start within the sub-directory {HOME
MANS} containing the variables, A12, R, Q, z1, A, and the sub-directory
INTRO, as shown below. (Copy A12 from INTRO into MANS).
Algebraic mode
In this case, we have the calculator set to Algebraic mode. Suppose that we
want to change the order of the variables to INTRO, A, z1, Q, R, A12.
Proceed as follows to activate the ORDER function:
„°˜@@OK@@ Select MEMORY from the programming menu
˜˜˜˜ @@OK@@ Select DIRECTORY from the MEMORY menu
—— @@OK@@ Select ORDER from the DIRECTORY menu
The screen will show the following input line:
Page 2-58
Next, we’ll list the new order of the variables by using their names typed
between quotes:
„ä ³)@INTRO ™‚í³@@@@A@@@
™‚í³@@@z1@@™‚í³@@@Q@@@
‚í³@@@@R@@@ ™‚í³@@A12@@ `
The screen now shows the new ordering of the variables:
RPN mode
In RPN mode, the list of re-ordered variables is listed in the stack before
applying the command ORDER. Suppose that we start from the same situation
as above, but in RPN mode, i.e.,
The reordered list is created by using:
„ä )@INTRO @@@@A@@@ @@@z1@@ @@@Q@@@ @@@@R@@@ @@A12@@ `
Then, enter the command ORDER, as done before, i.e.,
„°˜@@OK@@ Select MEMORY from the programming menu
˜˜˜˜ @@OK@@ Select DIRECTORY from the MEMORY menu
—— @@OK@@ Select ORDER from the DIRECTORY menu
The result is the following screen:
Moving variables using the FILES menu
To move a variable from one directory to another you can use the FILES menu.
For example, within the sub-directory {HOME MANS INTRO}, we have
variables p1, z1, R, Q, A12, α, and A. Suppose that we want to move
variable A12 to sub-directory {HOME MANS}. Here is how to do it: Press
„¡@@OK@@ to show a variable list. Use the down-arrow key ˜ to select
variable A12, then press @@MOVE@. The calculator will respond with a PICK
DESTINATION screen. Use the up arrow key to select the sub-directory
MANS and press @@OK@@. The screen will now show the contents of sub-
directory {HOME MANS INTRO}:
Page 3-2
2. Coordinate system specification (XYZ, RZ, R∠∠). The symbol
stands for an angular coordinate.
XYZ: Cartesian or rectangular (x,y,z)
RZ: cylindrical Polar coordinates (r,θ,z)
R∠∠: Spherical coordinates (ρ,θ,φ)
3. Number base specification (HEX, DEC, OCT, BIN)
HEX: hexadecimal numbers (base 16)
DEC: decimal numbers (base 10)
OCT: octal numbers (base 8)
BIN: binary numbers (base 2)
4. Real or complex mode specification (R, C)
R: real numbers
C: complex numbers
5. Exact or approximate mode specification (=, ~)
= exact (symbolic) mode
~ approximate (numerical) mode
6. Default CAS independent variable (e.g., ‘X’, ‘t’, etc.)
Checking calculator mode
When in RPN mode the different levels of the stack are listed in the left-hand
side of the screen. When the ALGEBRAIC mode is selected there are no
numbered stack levels, and the word ALG is listed in the top line of the display
towards the right-hand side. The difference between these operating modes
was described in detail in Chapter 1.
Real number calculations
To perform real number calculations it is preferred to have the CAS set to Real
(as opposite to Complex) mode. In some cases, a complex result may show
up, and a request to change the mode to Complex will be made by the
calculator. Exact mode is the default mode for most operations. Therefore,
you may want to start your calculations in this mode. Any change to Approx
mode required to complete an operation will be requested by the calculator.
There is no preferred selection for the angle measure or for the number base
specification. Real number calculations will be demonstrated in both the
Algebraic (ALG) and Reverse Polish Notation (RPN) modes.
Page 3-3
Changing sign of a number, variable, or expression
Use the \ key. In ALG mode, you can press \ before entering the
number, e.g., \2.5`. Result = -2.5. In RPN mode, you need
to enter at least part of the number first, and then use the \ key, e.g.,
2.5\. Result = -2.5. If you use the \ function while there is no
command line, the calculator will apply the NEG function (inverse of sign) to
the object on the first level of the stack.
The inverse function
Use the Ykey. In ALG mode, press Y first, followed by a number or
algebraic expression, e.g., Y2. Result = ½ or 0.5. In RPN mode, enter
the number first, then use the key, e.g., 4`Y. Result = ¼ or 0.25.
Addition, subtraction, multiplication, division
Use the proper operation key, namely, + - * /. In ALG mode,
press an operand, then an operator, then an operand, followed by an ` to
obtain a result. Examples:
3.7 + 5.2 `
6.3 - 8.5 `
4.2 * 2.5 `
2.3 / 4.5 `
The first three operations above are shown in the following screen shot:
In RPN mode, enter the operands one after the other, separated by an `,
then press the operator key. Examples:
3.7` 5.2 +
6.3` 8.5 -
4.2` 2.5 *
2.3` 4.5 /
Alternatively, in RPN mode, you can separate the operands with a space
(#) before pressing the operator key. Examples:
3.7#5.2 +
6.3#8.5 -
Page 3-4
4.2#2.5 *
2.3#4.5 /
Using parentheses
Parentheses can be used to group operations, as well as to enclose arguments
of functions. The parentheses are available through the keystroke
combination „Ü. Parentheses are always entered in pairs. For
example, to calculate (5+3.2)/(7-2.2):
In ALG mode:
„Ü5+3.2™/„Ü7-2.2`
In RPN mode, you do not need the parenthesis, calculation is done directly on
the stack:
5`3.2`+7`2.2`-/
In RPN mode, typing the expression between quotes will allow you to enter
the expression like in algebraic mode:
³„Ü5+3.2™/
„Ü7-2.2`µ
For both, ALG and RPN modes, using the Equation Writer:
‚O5+3.2™/7-2.2
The expression can be evaluated within the Equation writer, by using:
————@EVAL@ or, ‚—@EVAL@
Absolute value function
The absolute value function, ABS, is available through the keystroke
combination: „Ê. When calculating in the stack in ALG mode, enter
the function before the argument, e.g., „Ê \2.32`
In RPN mode, enter the number first, then the function, e.g.,
2.32\„Ê
Squares and square roots
The square function, SQ, is available through the keystroke combination:
„º. When calculating in the stack in ALG mode, enter the function
before the argument, e.g., „º\2.3`
Page 3-5
In RPN mode, enter the number first, then the function, e.g.,
2.3\„º
The square root function, , is available through the R key. When calculating
in the stack in ALG mode, enter the function before the argument, e.g.,
R123.4`
In RPN mode, enter the number first, then the function, e.g.,
123.4R
Powers and roots
The power function, ^, is available through the Q key. When calculating
in the stack in ALG mode, enter the base (y) followed by the Q key, and
then the exponent (x), e.g., 5.2Q1.25
In RPN mode, enter the number first, then the function, e.g.,
5.2`1.25`Q
The root function, XROOT(y,x), is available through the keystroke combination
‚». When calculating in the stack in ALG mode, enter the function
XROOT followed by the arguments (y,x), separated by commas, e.g.,
‚»3‚í 27`
In RPN mode, enter the argument y, first, then, x, and finally the function call,
e.g., 27`3`‚»
Base-10 logarithms and powers of 10
Logarithms of base 10 are calculated by the keystroke combination ‚Ã
(function LOG) while its inverse function (ALOG, or antilogarithm) is calculated
by using „Â. In ALG mode, the function is entered before the argument:
‚Ã2.45`
„Â\2.3`
In RPN mode, the argument is entered before the function
2.45` ‚Ã
2.3\` „Â
Using powers of 10 in entering data
Powers of ten, i.e., numbers of the form -4.5×10
-2
, etc., are entered by using
the V key. For example, in ALG mode:
\4.5V\2`
Page 3-6
Or, in RPN mode:
4.5\V2\`
Natural logarithms and exponential function
Natural logarithms (i.e., logarithms of base e = 2.7182818282) are
calculated by the keystroke combination ‚¹ (function LN) while its
inverse function, the exponential function (function EXP) is calculated by using
„¸. In ALG mode, the function is entered before the argument:
‚¹2.45`
„¸\2.3`
In RPN mode, the argument is entered before the function
2.45` ‚¹
2.3\` „¸
Trigonometric functions
Three trigonometric functions are readily available in the keyboard: sine
(S), cosine (T), and tangent (U). The arguments of these functions are
angles, therefore, they can be entered in any system of angular measure
(degrees, radians, grades). For example, with the DEG option selected, we
can calculate the following trigonometric functions:
In ALG mode:
S30`
T45`
U135`
In RPN mode:
30`S
45`T
135`U
Inverse trigonometric functions
The inverse trigonometric functions available in the keyboard are the arcsine
(ASIN), arccosine (ACOS), and arctangent (ATAN), available through the
keystroke combinations „¼, „¾, and „À, respectively.
Since the inverse trigonometric functions represent angles, the answer from
these functions will be given in the selected angular measure (DEG, RAD,
GRD). Some examples are shown next:
In ALG mode:
„¼0.25`
„¾0.85`
Page 3-7
„À1.35`
In RPN mode:
0.25`„¼
0.85`„¾
1.35`„À
All the functions described above, namely, ABS, SQ, , ^, XROOT, LOG,
ALOG, LN, EXP, SIN, COS, TAN, ASIN, ACOS, ATAN, can be combined
with the fundamental operations (+-*/) to form more complex
expressions. The Equation Writer, whose operations is described in Chapter
2, is ideal for building such expressions, regardless of the calculator
operation mode.
Differences between functions and operators
Functions like ABS, SQ, , LOG, ALOG, LN, EXP, SIN, COS, TAN, ASIN,
ACOS, ATAN require a single argument. Thus, their application is ALG
mode is straightforward, e.g., ABS(x). Some functions like XROOT require
two arguments, e.g., XROOT(x,y). This function has the equivalent keystroke
sequence ‚».
Operators, on the other hand, are placed after a single argument or between
two arguments. The factorial operator (!), for example, is placed after a
number, e.g., 5~‚2`. Since this operator requires a single
argument it is referred to as a unary operator. Operators that require two
arguments, such as + - * / Q, are binary operators, e.g.,
3*5, or 4Q2.
Real number functions in the MTH menu
The MTH (MaTHematics) menu include a number of mathematical functions
mostly applicable to real numbers. To access the MTH menu, use the
keystroke combination „´. With the default setting of CHOOSE boxes
for system flag 117 (see Chapter 2), the MTH menu is shown as the following
menu list:
Page 3-8
As they are a great number of mathematic functions available in the calculator,
the MTH menu is sorted by the type of object the functions apply on. For
example, options 1. VECTOR.., 2. MATRIX., and 3. LIST.. apply to those data
types (i.e., vectors, matrices, and lists) and will discussed in more detail in
subsequent chapters. Options 4. HYPERBOLIC.. and 5. REAL.. apply to real
numbers and will be discussed in detailed herein. Option 6. BASE.. is used
for conversion of numbers in different bases, and is also to be discussed in a
separate chapter. Option 7. PROBABILITY.. is used for probability
applications and will be discussed in an upcoming chapter. Option 8. FFT..
(Fast Fourier Transform) is an application of signal processing and will be
discussed in a different chapter. Option 9. COMPLEX.. contains functions
appropriate for complex numbers, which will be discussed in the next chapter.
Option 10. CONSTANTS provides access to the constants in the calculator.
This option will be presented later in this section. Finally, option 11. SPECIAL
FUNCTIONS.. includes functions of advanced mathematics that will be
discussed in this section also.
In general, to apply any of these functions you need to be aware of the
number and order of the arguments required, and keep in mind that, in ALG
mode you should select first the function and then enter the argument, while in
RPN mode, you should enter the argument in the stack first, and then select
the function.
Using calculator menus:
1. Since the operation of MTH functions (and of many other calculator
menus) is very similar, we will describe in detail the use of the 4.
HYPERBOLIC.. menu in this section, with the intention of describing the
general operation of calculator menus. Pay close attention to the process
for selecting different options.
2. To quickly select one of the numbered options in a menu list (or CHOOSE
box), simply press the number for the option in the keyboard. For
Page 3-9
example, to select option 4. HYPERBOLIC.. in the MTH menu, simply
press 4.
Hyperbolic functions and their inverses
Selecting Option 4. HYPERBOLIC.. , in the MTH menu, and pressing @@OK@@,
produces the hyperbolic function menu:
The hyperbolic functions are:
Hyperbolic sine, SINH, and its inverse, ASINH or sinh
-1
Hyperbolic cosine, COSH, and its inverse, ACOSH or cosh
-1
Hyperbolic tangent, TANH, and its inverse, ATANH or tanh
-1
This menu contains also the functions:
EXPM(x) = exp(x) – 1,
LNP1(x) = ln(x+1).
Finally, option 9. MATH, returns the user to the MTH menu.
For example, in ALG mode, the keystroke sequence to calculate, say,
tanh(2.5), is the following:
„´ Select MTH menu
4 @@OK@@ Select the 4. HYPERBOLIC.. menu
5 @@OK@@ Select the 5. TANH function
2.5` Evaluate tanh(2.5)
The screen shows the following output:
In the RPN mode, the keystrokes to perform this calculation are the following:
2.5` Enter the argument in the stack
„´ Select MTH menu
4 @@OK@@ Select the 4. HYPERBOLIC.. menu
5 @@OK@@ Select the 5. TANH function
Page 3-10
The result is:
The operations shown above assume that you are using the default setting for
system flag 117 (CHOOSE boxes). If you have changed the setting of this flag
(see Chapter 2) to SOFT menu, the MTH menu will show as labels of the soft
menu keys, as follows (left-hand side in ALG mode, right –hand side in RPN
mode):
Pressing L shows the remaining options:
Note: Pressing „«will return to the first set of MTH options. Also, using
the combination ‚˜ will list all menu functions in the screen, e.g.
Thus, to select, for example, the hyperbolic functions menu, with this menu
format press )@@HYP@ , to produce:
Finally, in order to select, for example, the hyperbolic tangent (tanh) function,
simply press @@TANH@.
Note: To see additional options in these soft menus, press the L key or the
„«keystroke sequence.
Page 3-16
Examples of these special functions are shown here using both the ALG and
RPN modes. As an exercise, verify that GAMMA(2.3) = 1.166711…,
PSI(1.5,3) = 1.40909.., and Psi(1.5) = 3.64899739..E-2.
These calculations are shown in the following screen shot:
Calculator constants
The following are the mathematical constants used by your calculator:
e: the base of natural logarithms.
i: the imaginary unit, i
i 2
= -1.
π: the ratio of the length of the circle to its diameter.
MINR: the minimum real number available to the calculator.
MAXR: the maximum real number available to the calculator.
To have access to these constants, select option 11. CONSTANTS.. in the
MTH menu,
The constants are listed as follows:
Selecting any of these entries will place the value selected, whether a symbol
(e.g., e, i, π, MINR, or MAXR) or a value (2.71.., (0,1), 3.14.., 1E-499,
9.99..E499) in the stack.
Page 3-17
Please notice that e is available from the keyboard as exp(1), i.e.,
„¸1`, in ALG mode, or 1` „¸, in RPN mode. Also,
π is available directly from the keyboard as „ì. Finally, i is available
by using „¥.
Operations with units
Numbers in the calculator can have units associated with them. Thus, it is
possible to calculate results involving a consistent system of units and produce
a result with the appropriate combination of units.
The UNITS menu
The units menu is launched by the keystroke combination ‚Û(associated
with the 6 key). With system flag 117 set to CHOOSE boxes, the result is
the following menu:
Option 1. Tools.. contains functions used to operate on units (discussed later).
Options 3. Length.. through 17.Viscosity.. contain menus with a number of
units for each of the quantities described. For example, selecting option 8.
Force.. shows the following units menu:
The user will recognize most of these units (some, e.g., dyne, are not used
very often nowadays) from his or her physics classes: N = newtons, dyn =
dynes, gf = grams – force (to distinguish from gram-mass, or plainly gram, a
Page 3-18
unit of mass), kip = kilo-poundal (1000 pounds), lbf = pound-force (to
distinguish from pound-mass), pdl = poundal.
To attach a unit object to a number, the number must be followed by an
underscore. Thus, a force of 5 N will be entered as 5_N.
For extensive operations with units SOFT menus provide a more convenient
way of attaching units. Change system flag 117 to SOFT menus (see
Chapter 1), and use the keystroke combination ‚Û to get the following
menus. Press L to move to the next menu page.
Pressing on the appropriate soft menu key will open the sub-menu of units for
that particular selection. For example, for the @)SPEED sub-menu, the following
units are available:
Pressing the soft menu key @)UNITS will take you back to the UNITS menu.
Recall that you can always list the full menu labels in the screen by using
‚˜, e.g., for the @)ENRG set of units the following labels will be listed:
Note: Use the L key or the „«keystroke sequence to navigate
through the menus.
Available units
The following is a list of the units available in the UNITS menu. The unit
symbol is shown first followed by the unit name in parentheses:
Page 3-19
LENGTH
m (meter), cm (centimeter), mm (millimeter), yd (yard), ft (feet), in (inch), Mpc
(Mega parsec), pc (parsec), lyr (light-year), au (astronomical unit), km
(kilometer), mi (international mile), nmi (nautical mile), miUS (US statute mile),
chain (chain), rd (rod), fath (fathom), ftUS (survey foot), Mil (Mil), µ (micron),
Å (Angstrom), fermi (fermi)
AREA
m^2 (square meter), cm^2 (square centimeter), b (barn), yd^2 (square yard),
ft^2 (square feet), in^2 (square inch), km^2 (square kilometer), ha (hectare),
a (are), mi^2 (square mile), miUS^2 (square statute mile), acre (acre)
VOLUME
m^3 (cubic meter), st (stere), cm^3 (cubic centimeter), yd^3 (cubic yard), ft^3
(cubic feet), in^3 (cubic inch), l (liter), galUK (UK gallon), galC (Canadian
gallon), gal (US gallon), qt (quart), pt (pint), ml (mililiter), cu (US cup), ozfl (US
fluid ounce), ozUK (UK fluid ounce), tbsp (tablespoon), tsp (teaspoon), bbl
(barrel), bu (bushel), pk (peck), fbm (board foot)
TIME
yr (year), d (day), h (hour), min (minute), s (second), Hz (hertz)
SPEED
m/s (meter per second), cm/s (centimeter per second), ft/s (feet per second),
kph (kilometer per hour), mph (mile per hour), knot (nautical miles per hour), c
(speed of light), ga (acceleration of gravity )
MASS
kg (kilogram), g (gram), Lb (avoirdupois pound), oz (ounce), slug (slug), lbt
(Troy pound), ton (short ton), tonUK (long ton), t (metric ton), ozt (Troy ounce),
ct (carat), grain (grain), u (unified atomic mass), mol (mole)
FORCE
N (newton), dyn (dyne), gf (gram-force), kip (kilopound-force), lbf (pound-
force), pdl (poundal)
Page 3-20
ENERGY
J (joule), erg (erg), Kcal (kilocalorie), Cal (calorie), Btu (International table btu),
ft×lbf (foot-pound), therm (EEC therm), MeV (mega electron-volt), eV (electron-
volt)
POWER
W (watt), hp (horse power),
PRESSURE
Pa (pascal), atm (atmosphere), bar (bar), psi (pounds per square inch), torr
(torr), mmHg (millimeters of mercury), inHg (inches of mercury), inH20 (inches
of water),
TEMPERATURE
o
C (degree Celsius),
o
F (degree Fahrenheit), K (Kelvin),
o
R (degree Rankine),
ELECTRIC CURRENT (Electric measurements)
V (volt), A (ampere), C (coulomb), (ohm), F (farad), W (watt), Fdy (faraday),
H (henry), mho (mho), S (siemens), T (tesla), Wb (weber )
ANGLE (planar and solid angle measurements)
o
(sexagesimal degree), r (radian), grad (grade), arcmin (minute of arc), arcs
(second of arc), sr (steradian)
LIGHT (Illumination measurements)
fc (footcandle), flam (footlambert), lx (lux), ph (phot), sb (stilb), lm (lumem), cd
(candela), lam (lambert)
RADIATION
Gy (gray), rad (rad), rem (rem), Sv (sievert), Bq (becquerel), Ci (curie), R
(roentgen)
VISCOSITY
P (poise), St (stokes)
Page 3-21
Units not listed
Units not listed in the Units menu, but available in the calculator include: gmol
(gram-mole), lbmol (pound-mole), rpm (revolutions per minute), dB (decibels).
These units are accessible through menu 117.02, triggered by using
MENU(117.02) in ALG mode, or 117.02 ` MENU in RPN mode. The
menu will show in the screen as follows (use ‚˜to show labels in
display):
These units are also accessible through the catalog, for example:
gmol: ‚N~„g
lbmol: ‚N~„l
rpm: ‚N~„r
dB: ‚N~„d
Converting to base units
To convert any of these units to the default units in the SI system, use the
function UBASE
. For example, to find out what is the value of 1 poise (unit of
viscosity) in the SI units, use the following:
In ALG mode, system flag 117 set to CHOOSE boxes:
‚Û Select the UNITS menu
@@OK@@ Select the TOOLS menu
˜ @@OK@@ Select the UBASE function
1 ‚Ý Enter 1 and underline
‚Û Select the UNITS menu
@@OK@@ Select the VISCOSITY option
@@OK@@ Select the UNITS menu
` Convert the units
Page 3-22
This results in the following screen (i.e., 1 poise = 0.1 kg/(ms)):
In RPN mode, system flag 117 set to CHOOSE boxes:
1 Enter 1 (no underline)
‚Û Select the UNITS menu
@@OK@@ Select the VISCOSITY option
@@OK@@ Select the unit P (poise)
‚Û Select the UNITS menu
@@OK@@ Select the TOOLS menu
˜ @@OK@@ Select the UBASE function
In ALG mode, system flag 117 set to SOFT menus:
‚Û Select the UNITS menu
)@TOOLS Select the TOOLS menu
@UBASE Select the UBASE function
1 ‚Ý Enter 1 and underline
‚Û Select the UNITS menu
„« @)VISC Select the VISCOSITY option
@@@P@@ Select the unit P (poise)
` Convert the units
In RPN mode, system flag 117 set to SOFT menus:
1 Enter 1 (no underline)
‚Û Select the UNITS menu
„« @)VISC Select the VISCOSITY option
@@@P@@ Select the unit P (poise)
‚Û Select the UNITS menu
)@TOOLS Select the TOOLS menu
@UBASE Select the UBASE function
Attaching units to numbers
To attach a unit object to a number, the number must be followed by an
underscore (‚Ý, key(8,5)). Thus, a force of 5 N will be entered as 5_N.
Page 3-23
Here is the sequence of steps to enter this number in ALG mode, system flag
117 set to CHOOSE boxes:
5‚Ý Enter number and underscore
‚Û Access the UNITS menu
8@@OK@@ Select units of force (8. Force..)
@@OK@@ Select Newtons (N)
` Enter quantity with units in the stack
The screen will look like the following:
Note: If you forget the underscore, the result is the expression 5*N, where N
here represents a possible variable name and not Newtons.
To enter this same quantity, with the calculator in RPN mode, use the following
keystrokes:
5 Enter number (do not enter underscore)
‚Û Access the UNITS menu
8@@OK@@ Select units of force (8. Force..)
@@OK@@ Select Newtons (N)
Notice that the underscore is entered automatically when the RPN mode is
active. The result is the following screen:
As indicated earlier, if system flag 117 is set to SOFT menus, then the UNITS
menu will show up as labels for the soft menu keys. This set up is very
convenient for extensive operations with units.
The keystroke sequences to enter units when the SOFT menu option is selected,
in both ALG and RPN modes, are illustrated next. For example, in ALG mode,
to enter the quantity 5_N use:
5‚Ý Enter number and underscore
Page 3-24
‚Û Access the UNITS menu
L @)@FORCE Select units of force
@ @@N@@ Select Newtons (N)
` Enter quantity with units in the stack
The same quantity, entered in RPN mode uses the following keystrokes:
5 Enter number (no underscore)
‚Û Access the UNITS menu
L @)@FORCE Select units of force
@ @@N@@ Select Newtons (N)
Note: You can enter a quantity with units by typing the underline and units
with the ~keyboard, e.g., 5‚Ý~n will produce the entry: 5_N
Unit prefixes
You can enter prefixes for units according to the following table of prefixes
from the SI system.
The prefix abbreviation is shown first, followed by its name, and by the
exponent x in the factor 10
x
corresponding to each prefix:
___________________________________________________
Prefix Name x Prefix Name x
____________________________________________________
Y yotta +24 d deci -1
Z zetta +21 c centi -2
E exa +18 m milli -3
P peta +15 µ micro -6
T tera +12 n nano -9
G giga +9 p pico -12
M mega +6 f femto -15
k,K kilo +3 a atto -18
h,H hecto +2 z zepto -21
D(*) deka +1 y yocto -24
_____________________________________________________
(*) In the SI system, this prefix is da rather than D. Use D for deka in the
calculator, however.
Page 3-25
To enter these prefixes, simply type the prefix using the ~ keyboard. For
example, to enter 123 pm (1 picometer), use:
123‚Ý~„p~„m
Using UBASE to convert to the default unit (1 m) results in:
Operations with units
Once a quantity accompanied with units is entered into the stack, it can be
used in operations similar to plain numbers, except that quantities with units
cannot be used as arguments of functions (say, SQ or SIN). Thus, attempting
to calculate LN(10_m) will produce an error message: Error: Bad Argument
Type.
Here are some calculation examples using the ALG operating mode. Be
warned that, when multiplying or dividing quantities with units, you must
enclosed each quantity with its units between parentheses. Thus, to enter, for
example, the product 12.5m × 5.2_yd, type it to read (12.5_m)*(5.2_yd)
`:
which shows as 65_(myd). To convert to units of the SI system, use function
UBASE:
Note: Recall that the ANS(1) variable is available through the keystroke
combination „î(associated with the ` key).
Page 3-26
To calculate a division, say, 3250 mi / 50 h, enter it as
(3250_mi)/(50_h) `:
which transformed to SI units, with function UBASE, produces:
Addition and subtraction can be performed, in ALG mode, without using
parentheses, e.g., 5 m + 3200 mm, can be entered simply as 5_m +
3200_mm `:
More complicated expression require the use of parentheses, e.g.,
(12_mm)*(1_cm^2)/(2_s) `:
Stack calculations in the RPN mode, do not require you to enclose the
different terms in parentheses, e.g.,
12_m ` 1.5_yd ` *
3250_mi ` 50_h ` /
These operations produce the following output:
Page 3-27
Also, try the following operations:
5_m ` 3200_mm ` +
12_mm ` 1_cm^2 `* 2_s ` /
These last two operations produce the following output:
Note: Units are not allowed in expressions entered in the equation writer.
Units manipulation tools
The UNITS menu contains a TOOLS sub-menu, which provides the following
functions:
CONVERT(x,y): convert unit object x to units of object y
UBASE(x): convert unit object x to SI units
UVAL(x): extract the value from unit object x
UFACT(x,y): factors a unit y from unit object x
UNIT(x,y): combines value of x with units of y
The UBASE function was discussed in detail in an earlier section in this
chapter. To access any of these functions follow the examples provided
earlier for UBASE. Notice that, while function UVAL requires only one
argument, functions CONVERT, UFACT, and UNIT require two arguments.
Try the following exercises, in your favorite calculator settings. The output
shown below was developed in ALG mode with system flat 117 set to SOFT
menu:
Examples of CONVERT
Page 4-3
Polar representation of a complex number
The result shown above represents a Cartesian (rectangular) representation of
the complex number 3.5-1.2i. A polar representation is possible if we
change the coordinate system to cylindrical or polar, by using function CYLIN.
You can find this function in the catalog (‚N). Changing to polar
shows the result:
For this result the angular measure is set to radians (you can always change to
radians by using function RAD). The result shown above represents a
magnitude, 3.7, and an angle 0.33029…. The angle symbol () is shown in
front of the angle measure.
Return to Cartesian or rectangular coordinates by using function RECT
(available in the catalog, ‚N). A complex number in polar
representation is written as z = re
i
θ
. You can enter this complex number into
the calculator by using an ordered pair of the form (r, ∠θ). The angle symbol
() can be entered as ~‚6. For example, the complex number z =
5.2e
1.5i
, can be entered as follows (the figures show the stack, before and
after entering the number):
Because the coordinate system is set to rectangular (or Cartesian), the
calculator automatically converts the number entered to Cartesian coordinates,
i.e., x = r cos θ, y = r sin θ, resulting, for this case, in (0.3678…, 5.18…).
On the other hand, if the coordinate system is set to cylindrical coordinates
(use CYLIN), entering a complex number (x,y), where x and y are real
numbers, will produce a polar representation. For example, in cylindrical
coordinates, enter the number (3.,2.). The figure below shows the RPN stack,
before and after entering this number:
Page 4-4
Simple operations with complex numbers
Complex numbers can be combined using the four fundamental operations
(+-*/). The results follow the rules of algebra with the caveat that
i
2
= -1. Operations with complex numbers are similar to those with real
numbers. For example, with the calculator in ALG mode and the CAS set to
Complex, we’ll attempt the following sum: (3+5i) + (6-3i):
Notice that the real parts (3+6) and imaginary parts (5-3) are combined
together and the result given as an ordered pair with real part 9 and
imaginary part 2. Try the following operations on your own:
(5-2i) - (3+4i) = (2,-6)
(3-i)(2-4i) = (2,-14)
(5-2i)/(3+4i) = (0.28,-1.04)
1/(3+4i) = (0.12, -0.16)
Notes:
The product of two numbers is represented by: (x
1
+iy
1
)(x
2
+iy
2
) = (x
1
x
2
- y
1
y
2
) +
i (x
1
y
2
+ x
2
y
1
).
The division of two complex numbers is accomplished by multiplying both
numerator and denominator by the complex conjugate of the denominator,
i.e.,
2
2
2
2
2112
2
2
2
2
2121
22
22
22
11
22
11
yx
yxyx
i
yx
yyxx
iyx
iyx
iyx
iyx
iyx
iyx
+
+
+
+
=
+
+
=
+
+
Thus, the inverse function INV (activated with the Y key) is defined as
2222
11
yx
y
i
yx
x
iyx
iyx
iyxiyx
+
+
+
=
+
=
+
Changing sign of a complex number
Changing the sign of a complex number can be accomplished by using the
\ key, e.g., -(5-3i) = -5 + 3i
Page 4-5
Entering the unit imaginary number
To enter the unit imaginary number type : „¥
Notice that the number i is entered as the ordered pair (0,1) if the CAS is set
to APPROX mode. In EXACT mode, the unit imaginary number is entered as i.
Other operations
Operations such as magnitude, argument, real and imaginary parts, and
complex conjugate are available through the CMPLX menus detailed later.
The CMPLX menus
There are two CMPLX (CoMPLeX numbers) menus available in the calculator.
One is available through the MTH menu (introduced in Chapter 3) and one
directly into the keyboard (‚ß). The two CMPLX menus are presented
next.
CMPLX menu through the MTH menu
Assuming that system flag 117 is set to CHOOSE boxes (see Chapter 2),
the CMPLX sub-menu within the MTH menu is accessed by using:
„´9 @@OK@@ . The following sequence of screen shots illustrates these
steps:
The first menu (options 1 through 6) shows the following functions:
Page 4-6
RE(z) : Real part of a complex number
IM(z) : Imaginary part of a complex number
CR(z) : Takes a complex number (x,y) and separates it into its real and
imaginary parts
RC(x,y): Forms the complex number (x,y) out of real numbers x and y
ABS(z) : Calculates the magnitude of a complex number or the absolute value
of a real number.
ARG(z): Calculates the argument of a complex number.
The remaining options (options 7 through 10) are the following:
SIGN(z) : Calculates a complex number of unit magnitude as z/|z|.
NEG : Changes the sign of z
CONJ(z): Produces the complex conjugate of z
Examples of applications of these functions are shown next. Recall that, for
ALG mode, the function must precede the argument, while in RPN mode, you
enter the argument first, and then select the function. Also, recall that you can
get these functions as soft menus by changing the setting of system flag 117
(See Chapter 3).
This first screen shows functions RE, IM, and CR. Notice that the last
function returns a list {3. 5.} representing the real and imaginary components
of the complex number:
The following screen shows functions RC, ABS, and ARG. Notice that the
ABS function gets translated to |3.+5.i|, the notation of the absolute value.
Page 4-7
Also, the result of function ARG, which represents an angle, will be given in
the units of angle measure currently selected. In this example, ARG(3.+5.i) =
1.0303… is given in radians.
In the next screen we present examples of functions SIGN, NEG (which shows
up as the negative sign - ), and CONJ.
CMPLX menu in keyboard
A second CMPLX menu is accessible by using the right-shift option associated
with the 1 key, i.e., ‚ß. With system flag 117 set to CHOOSE
boxes, the keyboard CMPLX menu shows up as the following screens:
The resulting menu include some of the functions already introduced in the
previous section, namely, ARG, ABS, CONJ, IM, NEG, RE, and SIGN. It also
includes function i which serves the same purpose as the keystroke
combination „¥, i.e., to enter the unit imaginary number i in an
expression.
The keyboard-base CMPLX menu is an alternative to the MTH-based CMPLX
menu containing the basic complex number functions. Try the examples
shown earlier using the keyboard-based CMPLX menu for practice.
Page 4-8
Functions applied to complex numbers
Many of the keyboard-based functions defined in Chapter 3 for real numbers,
e.g., SQ, ,LN, e
x
, LOG, 10
X
, SIN, COS, TAN, ASIN, ACOS, ATAN, can be
applied to complex numbers. The result is another complex number, as
illustrated in the following examples. To apply this functions use the same
procedure as presented for real numbers (see Chapter 3).
Note: When using trigonometric functions and their inverses with complex
numbers the arguments are no longer angles. Therefore, the angular measure
selected for the calculator has no bearing in the calculation of these functions
with complex arguments. To understand the way that trigonometric functions,
and other functions, are defined for complex numbers consult a book on
complex variables.
Functions from the MTH menu
The hyperbolic functions and their inverses, as well as the Gamma, PSI, and
Psi functions (special functions) were introduced and applied to real numbers
in Chapter 3. These functions can also be applied to complex numbers by
following the procedures presented in Chapter 3. Some examples are shown
below:
Page 4-9
The following screen shows that functions EXPM and LNP1 do not apply to
complex numbers. However, functions GAMMA, PSI, and Psi accept complex
numbers:
Function DROITE: equation of a straight line
Function DROITE takes as argument two complex numbers, say, x
1
+iy
1
and
x
2
+iy
2
, and returns the equation of the straight line, say, y = a+bx, that
contains the points (x
1
,y
1
) and (x
2
,y
2
). For example, the line between points
A(5,-3) and B(6,2) can be found as follows (example in Algebraic mode):
Function DROITE is found in the command catalog (‚N).
Using EVAL(ANS(1)) simplifies the result to:
Page 5-1
Chapter 5
Algebraic and arithmetic operations
An algebraic object, or simply, algebraic, is any number, variable name or
algebraic expression that can be operated upon, manipulated, and combined
according to the rules of algebra. Examples of algebraic objects are the
following:
A number: 12.3, 15.2_m, ‘π’, ‘e’, ‘i’
A variable name: ‘a’, ‘ux’, ‘width’, etc.
An expression: ‘p*D^2/4’,’f*(L/D)*(V^2/(2*g))’
An equation: ‘Q=(Cu/n)*A(y)*R(y)^(2/3)*So^0.5’
Entering algebraic objects
Algebraic objects can be created by typing the object between single quotes
directly into stack level 1 or by using the equation writer ‚O. For
example, to enter the algebraic object ‘π*D^2/4’ directly into stack level 1
use:³„ì*~dQ2/4`. The resulting screen is
shown next for both the ALG mode (left-hand side) and the RPN mode (right-
hand side):
An algebraic object can also be built in the Equation Writer and then sent to
the stack. The operation of the Equation Writer was described in Chapter 2.
As an exercise, build the following algebraic object in the Equation Writer:
After building the object, press to show it in the stack (ALG and RPN modes
shown below):
Page 5-4
We notice that, at the bottom of the screen, the line See: EXPAND FACTOR
suggests links to other help facility entries, the functions EXPAND and
FACTOR. To move directly to those entries, press the soft menu key @SEE1! for
EXPAND, and @SEE2! for FACTOR. Pressing @SEE1!, for example, shows the
following information for EXPAND:
The help facility provides not only information on each command, but also
provides an example of its application. This example can be copied onto
your stack by pressing the @ECHO! soft menu key. For example, for the EXPAND
entry shown above, press the @ECHO! soft menu key to get the following example
copied to the stack (press ` to execute the command):
Thus, we leave for the user to explore the applications of the functions in the
ALG (or ALGB) menu. This is a list of the commands:
Page 5-29
Function NUM has the same effect as the keystroke combination ‚ï
(associated with the ` key). Function NUM converts a symbolic result
into its floating-point value. Function Q converts a floating-point value into
a fraction. Function Qπ converts a floating-point value into a fraction of π,
if a fraction of π can be found for the number; otherwise, it converts the
number to a fraction. Examples are of these three functions are shown next.
Out of the functions in the REWRITE menu, functions DISTRIB, EXPLN,
EXP2POW, FDISTRIB, LIN, LNCOLLECT, POWEREXPAND, and SIMPLIFY
apply to algebraic expressions. Many of these functions are presented in this
Chapter. However, for the sake of completeness we present here the help-
facility entries for these functions.
DISTRIB EXPLN
EXP2POW FDISTRIB
Page 5-30
LIN LNCOLLECT
POWEREXPAND SIMPLIFY
Page 6-1
Chapter 6
Solution to single equations
In this chapter we feature those functions that the calculator provides for
solving single equations of the form f(X) = 0. Associated with the 7 key
there are two menus of equation-solving functions, the Symbolic SOLVer
(„Î), and the NUMerical SoLVer (‚Ï). Following, we present
some of the functions contained in these menus. Change CAS mode to
Complex for these exercises (see Chapter 2).
Symbolic solution of algebraic equations
Here we describe some of the functions from the Symbolic Solver menu.
Activate the menu by using the keystroke combination . With system flag 117
set to CHOOSE boxes, the following menu lists will be available:
Functions DESOLVE and LDEC are used for the solution of differential
equations, the subject of a different chapter, and therefore will not be
presented here. Similarly, function LINSOLVE relates to the solution of multiple
linear equations, and it will be presented in a different chapter. Functions
ISOL and SOLVE can be used to solve for any unknown in a polynomial
equation. Function SOLVEVX solves a polynomial equation where the
unknown is the default CAS variable VX (typically set to ‘X’). Finally, function
ZEROS provides the zeros, or roots, of a polynomial. Entries for all the
functions in the S.SLV menu, except ISOL, are available through the CAS help
facility (IL@HELP ).
Function ISOL
Function ISOL(Equation, variable) will produce the solution(s) to Equation by
isolating variable. For example, with the calculator set to ALG mode, to solve
for t in the equation at
3
-bt = 0 we can use the following:
Page 6-2
Using the RPN mode, the solution is accomplished by entering the equation in
the stack, followed by the variable, before entering function ISOL. Right
before the execution of ISOL, the RPN stack should look as in the figure to the
left. After applying ISOL, the result is shown in the figure to the right:
The first argument in ISOL can be an expression, as shown above, or an
equation. For example, in ALG mode, try:
Note: To type the equal sign (=) in an equation, use ‚Å (associated
with the \ key).
The same problem can be solved in RPN mode as illustrated below (figures
show the RPN stack before and after the application of function ISOL):
Function SOLVE
Function SOLVE has the same syntax as function ISOL, except that SOLVE can
also be used to solve a set of polynomial equations. The help-facility entry for
function SOLVE, with the solution to equation X^4 – 1 = 3 , is shown next:
Page 6-3
The following examples show the use of function SOLVE in ALG and RPN
modes:
The screen shot shown above displays two solutions. In the first one, β
4
-5β
=125, SOLVE produces no solutions { }. In the second one, β
4
- 5β = 6,
SOLVE produces four solutions, shown in the last output line. The very last
solution is not visible because the result occupies more characters than the
width of the calculator’s screen. However, you can still see all the solutions by
using the down arrow key (˜), which triggers the line editor (this operation
can be used to access any output line that is wider than the calculator’s
screen):
The corresponding RPN screens for these two examples, before and after the
application of function SOLVE, are shown next:
Use of the down-arrow key (˜) in this mode will launch the line editor:
Page 6-4
Function SOLVEVX
The function SOLVEVX solves an equation for the default CAS variable
contained in the reserved variable name VX. By default, this variable is set to
‘X’. Examples, using the ALG mode with VX = ‘X’, are shown below:
In the first case SOLVEVX could not find a solution. In the second case,
SOLVEVX found a single solution, X = 2.
The following screens show the RPN stack for solving the two examples shown
above (before and after application of SOLVEVX):
The equation used as argument for function SOLVEVX must be reducible to a
rational expression. For example, the following equation will not processed
by SOLVEVX:
Function ZEROS
The function ZEROS finds the solutions of a polynomial equation, without
showing their multiplicity. The function requires having as input the
expression for the equation and the name of the variable to solve for.
Examples in ALG mode are shown next:
Page 6-5
To use function ZEROS in RPN mode, enter first the polynomial expression,
then the variable to solve for, and then function ZEROS. The following screen
shots show the RPN stack before and after the application of ZEROS to the
two examples above:
The Symbolic Solver functions presented above produce solutions to rational
equations (mainly, polynomial equations). If the equation to be solved for has
all numerical coefficients, a numerical solution is possible through the use of
the Numerical Solver features of the calculator.
Numerical solver menu
The calculator provides a very powerful environment for the solution of single
algebraic or transcendental equations. To access this environment we start
the numerical solver (NUM.SLV) by using ‚Ï. This produces a drop-
down menu that includes the following options:
Item
2. Solve diff eq.. is to be discussed in a later chapter on differential
equations. Item 4. Solve lin sys.. will be discussed in a later Chapter on
matrices. Item 6. MSLV (Multiple equation SoLVer) will be presented in the
next chapter. Following, we present applications of items 3. Solve poly.., 5.
Solve finance, and 1. Solve equation.., in that order. Appendix 1-A, at the
end of Chapter 1, contains instructions on how to use input forms with
examples for the numerical solver applications.
Page 6-6
Notes:
1. Whenever you solve for a value in the NUM.SLV applications, the value
solved for will be placed in the stack. This is useful if you need to keep that
value available for other operations.
2. There will be one or more variables created whenever you activate some of
the applications in the NUM.SLV menu.
Polynomial Equations
Using the Solve poly… option in the calculator’s SOLVE environment you can:
(1) find the solutions to a polynomial equation;
(2) obtain the coefficients of the polynomial having a number of given roots;
(3) obtain an algebraic expression for the polynomial as a function of X.
Finding the solutions to a polynomial equation
A polynomial equation is an equation of the form: a
n
x
n
+ a
n-1
x
n-1
+ …+ a
1
x +
a
0
= 0. The fundamental theorem of algebra indicates that there are n
solutions to any polynomial equation of order n. Some of the solutions could
be complex numbers, nevertheless. As an example, solve the equation: 3s
4
+
2s
3
- s + 1 = 0.
We want to place the coefficients of the equation in a vector [a
n
,a
n-1
,a
1
a
0
].
For this example, let's use the vector [3,2,0,-1,1]. To solve for this polynomial
equation using the calculator, try the following:
‚Ϙ˜@@OK@@ Select Solve poly…
„Ô3‚í2‚í 0
‚í 1\‚í1@@OK@@ Enter vector of coefficients
@SOLVE@ Solve equation
The screen will show the solution as follows:
Page 6-7
Press ` to return to stack. The stack will show the following results in ALG
mode (the same result would be shown in RPN mode):
To see all the solutions, press the down-arrow key (˜) to trigger the line
editor:
All the solutions are complex numbers: (0.432,-0.389), (0.432,0.389), (-
0.766, 0.632), (-0.766, -0.632).
Note: Recall that complex numbers in the calculator are represented as
ordered pairs, with the first number in the pair being the real part, and the
second number, the imaginary part. For example, the number (0.432,-0.389),
a complex number, will be written normally as 0.432 - 0.389i, where i is the
imaginary unit, i.e., i
2
= -1.
Note: The fundamental theorem of algebra indicates that there are n solutions
for any polynomial equation of order n. There is another theorem of algebra
that indicates that if one of the solutions to a polynomial equation with real
coefficients is a complex number, then the conjugate of that number is also a
solution. In other words, complex solutions to a polynomial equation with real
coefficients come in pairs. That means that polynomial equations with real
coefficients of odd order will have at least one real solution.
Generating polynomial coefficients given the polynomial's roots
Suppose you want to generate the polynomial whose roots are the numbers
[1, 5, -2, 4]. To use the calculator for this purpose, follow these steps:
‚Ϙ˜@@OK@@ Select Solve poly…
˜„Ô1‚í5
‚í2\‚í 4@@OK@@ Enter vector of roots
@SOLVE@ Solve for coefficients
Page 6-8
Press ` to return to stack, the coefficients will be shown in the stack.
Press ˜ to trigger the line editor to see all the coefficients.
Note: If you want to get a polynomial with real coefficients, but having
complex roots, you must include the complex roots in pairs of conjugate
numbers. To illustrate the point, generate a polynomial having the roots [1
(1,2) (1,-2)]. Verify that the resulting polynomial has only real coefficients.
Also, try generating a polynomial with roots [1 (1,2) (-1,2)], and verify that
the resulting polynomial will have complex coefficients.
Generating an algebraic expression for the polynomial
You can use the calculator to generate an algebraic expression for a
polynomial given the coefficients or the roots of the polynomial. The resulting
expression will be given in terms of the default CAS variable X. (The
examples below shows how you can replace X with any other variable by
using the function |.)
To generate the algebraic expression using the coefficients, try the following
example. Assume that the polynomial coefficients are [1,5,-2,4]. Use the
following keystrokes:
‚Ϙ˜@@OK@@ Select Solve poly…
„Ô1‚í5 Enter vector of coefficients
‚í2\‚í 4@@OK@@
@SYMB@ Generate symbolic expression
` Return to stack.
The expression thus generated is shown in the stack as:
'X^3+5*X^2+-2*X+4'.
Page 6-9
To generate the algebraic expression using the roots, try the following
example. Assume that the polynomial roots are [1,3,-2,1]. Use the following
keystrokes:
‚Ϙ˜@@OK@@ Select Solve poly…
˜„Ô1‚í3 Enter vector of roots
‚í2\‚í 1@@OK@@
˜@SYMB@ Generate symbolic expression
` Return to stack.
The expression thus generated is shown in the stack as:'
(X-1)*(X-3)*(X+2)*(X-1)'.
To expand the products, you can use the EXPAND command. The resulting
expression is: '
X^4+-3*X^3+ -3*X^2+11*X-6'.
A different approach to obtaining an expression for the polynomial is to
generate the coefficients first, then generate the algebraic expression with the
coefficients highlighted. For example, for this case try:
‚Ϙ˜@@OK@@ Select Solve poly…
˜„Ô1‚í3 Enter vector of roots
‚í2\‚í 1@@OK@@
@SOLVE@ Solve for coefficients
˜@SYMB@ Generate symbolic expression
` Return to stack.
The expression thus generated is shown in the stack as: '
X^4+-3*X^3+ -
3*X^2+11*X+-6*X^0'
. The coefficients are listed in stack level 2.
Financial calculations
The calculations in item 5. Solve finance.. in the Numerical Solver (NUM.SLV)
are used for calculations of time value of money of interest in the discipline of
engineering economics and other financial applications. This application can
also be started by using the keystroke combination „sÒ (associated
with the 9 key). Before discussing in detail the operation of this solving
environment, we present some definitions needed to understand financial
operations in the calculator.
Page 6-10
Definitions
Often, to develop projects, it is necessary to borrow money from a financial
institution or from public funds. The amount of money borrowed is referred to
as the Present Value (PV). This money is to be repaid through n periods
(typically multiples or sub-multiples of a month) subject to an annual interest
rate of I%YR. The number of periods per year (P/YR) is an integer number of
periods in which the year will be divided for the purpose of repaying the loan
money. Typical values of P/YR are 12 (one payment per month), 24
(payment twice a month), or 52 (weekly payments). The payment(PMT) is
the amount that the borrower must pay to the lender at the beginning or end
of each of the n periods of the loan. The future value of the money (FV) is the
value that the borrowed amount of money will be worth at the end of n
periods. Typically payment occurs at the end of each period, so that the
borrower starts paying at the end of the first period, and pays the same fixed
amount at the end of the second, third, etc., up to the end of the n-th period.
Example 1 – Calculating payment on a loan
If $2 million are borrowed at an annual interest rate of 6.5% to be repaid in
60 monthly payments, what should be the monthly payment? For the debt to
be totally repaid in 60 months, the future values of the loan should be zero.
So, for the purpose of using the financial calculation feature of the calculator
we will use the following values: n = 60, I%YR = 6.5, PV = 2000000, FV =
0, P/YR = 12. To enter the data and solve for the payment, PMT, use:
„Ò Start the financial calculation input form
60 @@OK@@ Enter n = 60
6.5 @@OK@@ Enter I%YR = 6.5 %
2000000 @@OK@@ Enter PV = 2,000,000 US$
˜ Skip PMT, since we will be solving for it
0 @@OK@@ Enter FV = 0, the option
End is highlighted
— š @@SOLVE! Highlight PMT and solve for it
The solution screen will look like this:
Page 6-11
The screen now shows the value of PMT as –39,132.30, i.e., the borrower
must pay the lender US $ 39,132.30 at the end of each month for the next
60 months to repay the entire amount. The reason why the value of PMT
turned out to be negative is because the calculator is looking at the money
amounts from the point of view of the borrower. The borrower has + US $
2,000,000.00 at time period t = 0, then he starts paying, i.e., adding -US $
39132.30 at times t = 1, 2, …, 60. At t = 60, the net value in the hands of
the borrower is zero. Now, if you take the value US $ 39,132.30 and
multiply it by the 60 payments, the total paid back by the borrower is US $
2,347,937.79. Thus, the lender makes a net profit of $ 347,937.79 in the 5
years that his money is used to finance the borrower’s project.
Example 2 – Calculating amortization of a loan
The same solution to the problem in Example 1 can be found by pressing
@)@AMOR!!, which is stands for AMORTIZATION. This option is used to calculate
how much of the loan has been amortized at the end of a certain number of
payments. Suppose that we use 24 periods in the first line of the
amortization screen, i.e., 24 @@OK@@. Then, press @@AMOR@@. You will get the
following result:
This screen is interpreted as indicating that after 24 months of paying back
the debt, the borrower has paid up US $ 723,211.43 into the principal
amount borrowed, and US $ 215,963.68 of interest. The borrower still has
to pay a balance of US $1,276,788.57 in the next 36 months.
Check what happens if you replace 60 in the Payments: entry in the
amortization screen, then press @@OK@@ @@AMOR@@. The screen now looks like this:
Page 6-12
This means that at the end of 60 months the US $ 2,000,000.00 principal
amount has been paid, together with US $ 347,937.79 of interest, with the
balance being that the lender owes the borrower US $ 0.000316. Of
course, the balance should be zero. The value shown in the screen above is
simply round-off error resulting from the numerical solution.
Press $or `, twice, to return to normal calculator display.
Example 3 – Calculating payment with payments at beginning of period
Let’s solve the same problem as in Examples 1 and 2, but using the option
that payment occurs at the beginning of the payment period. Use:
„Ò Start the financial calculation input form
60 @@OK@@ Enter n = 60
6.5 @@OK@@ Enter I%YR = 6.5 %
2000000 @@OK@@ Enter PV = 2,000,000 US$
˜ Skip PMT, since we will be solving for it
0 @@OK@@ Enter FV = 0, the option
End is highlighted
@@CHOOS !@@OK@@ Change payment option to Begin
— š @@SOLVE! Highlight PMT and solve for it
The screen now shows the value of PMT as –38,921.47, i.e., the borrower
must pay the lender US $ 38,921.48 at the beginning
of each month for the
next 60 months to repay the entire amount. Notice that the amount the
borrower pays monthly, if paying at the beginning of each payment period, is
slightly smaller than that paid at the end of each payment period. The reason
for that difference is that the lender gets interest earnings from the payments
from the beginning of the period, thus alleviating the burden on the lender.
Notes:
1. The financial calculator environment allows you to solve for any of the
terms involved, i.e., n, I%YR, PV, FV, P/Y, given the remaining terms in the
loan calculation. Just highlight the value you want to solve for, and press
@@SOLVE!. The result will be shown in the highlighted field.
Page 6-13
2. The values calculated in the financial calculator environment are copied to
the stack with their corresponding tag (identifying label).
Deleting the variables
When you use the financial calculator environment for the first time within the
HOME directory, or any sub-directory, it will generate the variables @@@N@@ @I©YR@
@@PV@@ @@PMT@@ @@PYR@@ @@FV@@ to store the corresponding terms in the calculations..
You can see the contents of these variables by using:
@@ @n@@@I©YR@@@PV@@@@PMT@@@@PYR@@@@FV@@.
You can either keep these variables for future use, or use the PURGE function
to erase them from your directory. To erase all of the variables at once
, if
using ALG mode, try the following:
I@PURGE J „ä Enter PURGE, prepare list of variables
³‚@@@n@@ Enter name of variable N
™ ‚í Enter a comma
³ ‚@I©YR@ Enter name of variable I%YR
™ ‚í Enter a comma
³ ‚@@PV@@ Enter name of variable PV
™ ‚í Enter a comma
³ ‚@@PMT@@ Enter name of variable PMT
™ ‚í Enter a comma
³ ‚@@PYR@@ Enter name of variable PYR
™ ‚í Enter a comma
³ ‚@@FV@@. Enter name of variable FV
` Execute PURGE command
The following two screen shots show the PURGE command for purging all the
variables in the directory, and the result after executing the command.
In RPN mode, the command is executed by using:
Page 6-14
J „ä Prepare a list of variables to be purged
@@@n@@ Enter name of variable N
@I©YR@ Enter name of variable I%YR
@@PV@@ Enter name of variable PV
@@PMT@@ Enter name of variable PMT
@@PYR@@ Enter name of variable PYR
@@FV@@ Enter name of variable FV
` Enter list of variables in stack
I@PURGE Purge variables in list
Before the command PURGE is entered, the RPN stack will look like this:
Solving equations with one unknown through NUM.SLV
The calculator's NUM.SLV menu provides item 1. Solve equation.. solve
different types of equations in a single variable, including non-linear algebraic
and transcendental equations. For example, let's solve the equation: e
x
-
sin(πx/3) = 0.
Simply enter the expression as an algebraic object and store it into variable
EQ. The required keystrokes in ALG mode are the following:
³„¸~„x™-S„ì
*~„x/3™‚Å 0™
K~e~q`
Function STEQ
Function STEQ, available through the command catalog, ‚N, will store
its argument into variable EQ, e.g., in ALG mode:
In RPN mode, enter the equation between apostrophes and activate command
STEQ. Thus, function STEQ can be used as a shortcut to store an expression
into variable EQ.
Page 6-15
Press J to see the newly created EQ variable:
Then, enter the SOLVE environment and select Solve equation…, by using:
‚Ï@@OK@@. The corresponding screen will be shown as:
The equation we stored in variable EQ is already loaded in the Eq field in the
SOLVE EQUATION input form. Also, a field labeled x is provided. To solve
the equation all you need to do is highlight the field in front of X: by using
˜, and press @SOLVE@. The solution shown is X: 4.5006E-2:
This, however, is not the only possible solution for this equation. To obtain a
negative solution, for example, enter a negative number in the X: field before
solving the equation. Try 3\@@@OK@@˜@SOLVE@. The solution is now X: -
3.045.
Solution procedure for Equation Solve...
The numerical solver for single-unknown equations works as follows:
It lets the user type in or @CHOOS an equation to solve.
It creates an input form with input fields corresponding to all variables
involved in equation stored in variable EQ.
The user needs to enter values for all variables involved, except one.
Page 6-16
The user then highlights the field corresponding to the unknown for
which to solve the equation, and presses @SOLVE@
The user may force a solution by providing an initial guess for the
solution in the appropriate input field before solving the equation.
The calculator uses a search algorithm to pinpoint an interval for which the
function changes sign, which indicates the existence of a root or solution. It
then utilizes a numerical method to converge into the solution.
The solution the calculator seeks is determined by the initial value present in
the unknown input field. If no value is present, the calculator uses a default
value of zero. Thus, you can search for more than one solution to an
equation by changing the initial value in the unknown input field. Examples
of the equations solutions are shown following.
Example 1 – Hooke’s law for stress and strain
The equation to use is Hooke’s law for the normal strain in the x-direction for a
solid particle subjected to a state of stress given by
zzzyzx
yzyyyx
xzxyxx
σσσ
σσσ
σσσ
The equation is
,)]([
1
Tn
E
e
zzyyxxxx
++= ασσσ here e
xx
is the unit
strain in the x-direction, σ
xx
, σ
yy
, and σ
zz
, are the normal stresses on the
particle in the directions of the x-, y-, and z-axes, E is Young’s modulus or
modulus of elasticity of the material, n is the Poisson ratio of the material, α is
the thermal expansion coefficient of the material, and T is a temperature
increase.
Suppose that you are given the following data: σ
xx
= 2500 psi, σ
yy
=1200 psi,
and σ
zz
= 500 psi, E = 1200000 psi, n = 0.15, α = 0.00001/
o
F, T = 60
o
F.
To calculate the strain e
xx
use the following:
‚Ï@@OK@@ Access numerical solver to solve equations
‚O Access the equation writer to enter equation
Page 6-17
At this point follow the instructions from Chapter 2 on how to use the Equation
Writer to build an equation. The equation to enter in the Eq field should look
like this (notice that we use only one sub-index to refer to the variables, i.e.,
e
xx
is translated as ex, etc. -- this is done to save typing time):
Use the following shortcuts for special characters:
σ: ~‚s α: ~‚a ∆: ~‚c
and recall that lower-case letters are entered by using ~„ before the
letter key, thus, x is typed as ~„x.
Press `to return to the solver screen. Enter the values proposed above into
the corresponding fields, so that the solver screen looks like this:
With the ex: field highlighted, press @SOLVE@ to solve for ex:
Page 6-18
The solution can be seen from within the SOLVE EQUATION input form by
pressing @EDIT while the ex: field is highlighted. The resulting value is
2.470833333333E-3. Press @@@OK@@ to exit the EDIT feature.
Suppose that you now, want to determine the Young’s modulus that will
produce a strain of e
xx
= 0.005 under the same state of stress, neglecting
thermal expansion. In this case, you should enter a value of 0.005 in the ex:
field, and a zero in the T: field (with T = 0, no thermal effects are
included). To solve for E, highlight the E: field and press @SOLVE@. The result,
seeing with the @EDIT feature is, E = 449000 psi. Press @SOLVE@ ` to return
to normal display.
Notice that the results of the calculations performed within the numerical
solver environment have been copied to the stack:
Also, you will see in your soft-menu key labels variables corresponding to
those variables in the equation stored in EQ (press L to see all variables in
your directory), i.e., variables ex, T, α, σz, σy, n, σx, and E.
Example 2 – Specific energy in open channel flow
Specific energy in an open channel is defined as the energy per unit weight
measured with respect to the channel bottom. Let E = specific energy, y =
channel depth, V = flow velocity, g = acceleration of gravity, then we write
The flow velocity, in turn, is given by V = Q/A, where Q = water discharge,
A = cross-sectional area. The area depends on the cross-section used, for
example, for a trapezoidal cross-section, as shown in the figure below, A =
(b+my) y, where b = bottom width, and m = side slope of cross section.
.
2
2
g
V
yE +=
Page 6-19
y
b
1
m
We can type in the equation for E as shown above and use auxiliary
variables for A and V, so that the resulting input form will have fields for the
fundamental variables y, Q, g, m, and b, as follows:
First, create a sub-directory called SPEN (SPecific ENergy) and work
within that sub-directory.
Next, define the following variables:
Launch the numerical solver for solving equations: ‚Ï@@OK@@.
Notice that the input form contains entries for the variables y, Q, b, m,
and g:
Try the following input data: E = 10 ft, Q = 10 cfs (cubic feet per
second), b = 2.5 ft, m = 1.0, g = 32.2 ft/s
2
:
Solve for y.
Page 6-20
The result is 0.149836.., i.e., y = 0.149836.
It is known, however, that there are actually two solutions available
for y in the specific energy equation. The solution we just found
corresponds to a numerical solution with an initial value of 0 (the
default value for y, i.e., whenever the solution field is empty, the
initial value is zero). To find the other solution, we need to enter a
larger value of y, say 15, highlight the y input field and solve for y
once more:
The result is now 9.99990, i.e., y = 9.99990 ft.
This example illustrates the use of auxiliary variables to write complicated
equations. When NUM.SLV is activated, the substitutions implied by the
auxiliary variables are implemented, and the input screen for the equation
provides input field for the primitive or fundamental variables resulting from
the substitutions. The example also illustrates an equation that has more than
one solution, and how choosing the initial guess for the solution may produce
those different solutions.
In the next example we will use the DARCY function for finding friction factors
in pipelines. Thus, we define the function in the following frame.
Special function for pipe flow: DARCY (ε/D,Re)
The Darcy-Weisbach equation is used to calculate the energy loss (per unit
weight), h
f
, in a pipe flow through a pipe of diameter D, absolute roughness
ε, and length L, when the flow velocity in the pipe is V. The equation is
Page 6-21
written as
g
V
D
L
fh
f
2
2
= . The quantity f is known as the friction factor of
the flow and it has been found to be a function of the relative roughness of the
pipe, ε/D, and a (dimensionless) Reynolds number, Re. The Reynolds number
is defined as Re = ρVD/µ = VD/ν, where ρ and µ are the density and
dynamic viscosity of the fluid, respectively, and ν = µ/ρ is the kinematic
viscosity of the fluid.
The calculator provides a function called DARCY that uses as input the relative
roughness ε/D and the Reynolds number, in that order, to calculate the friction
factor f. The function DARCY can be found through the command catalog:
For example, for ε/D = 0.0001, Re = 1000000, you can find the friction
factor by using: DARCY(0.0001,1000000). In the following screen, the
function NUM () was used to obtain a numerical value of the function:
The result is f = DARCY(0.0001,1000000) = 0.01341…
The function FANNING(ε/D,Re)
In aerodynamics applications a different friction factor, the Fanning friction
factor, is used. The Fanning friction factor, f
F
, is defined as 4 times the Darcy-
Weisbach friction factor, f. The calculator also provides a function called
FANNING that uses the same input as DARCY, i.e., ε/D and Re, and
provides the FANNING friction factor. Check that
FANNING(0.0001,1000000) = 0.0033603589181s.
Page 6-22
Example 3 – Flow in a pipe
You may want to create a separate sub-directory (PIPES) to try this example.
The main equation governing flow
in a pipe is, of course, the Darcy-Weisbach
equation. Thus, type in the following equation into EQ:
Also, enter the following variables (f, A, V, Re):
In this case we stored the main equation (Darcy-Weisbach equation) into EQ,
and then replaced several of its variables by other expressions through the
definition of variables f, A, V, and Re. To see the combined equation, use
EVAL(EQ). In this example we changed the display setting so that we can see
the entire equation in the screen:
Page 6-23
Thus, the equation we are solving, after combining the different variables in
the directory, is:
=
Nu
D
QD
D
DARCY
gD
LQ
h
f
4/
,
8
2
52
2
π
ε
π
The combined equation has primitive variables: h
f
, Q, L, g, D, ε, and Nu.
Launch the numerical solver (‚Ï@@OK@@) to see the primitive variables
listed in the SOLVE EQUATION input form:
Suppose that we use the values hf = 2 m, ε = 0.00001 m, Q = 0.05 m
3
/s,
Nu = 0.000001 m
2
/s, L = 20 m, and g = 9.806 m/s
2
, find the diameter D.
Enter the input values, and solve for D, The solution is: 0.12, i.e., D = 0.12
m.
If the equation is dimensionally consistent, you can add units to the input
values, as shown in the figure below. However, you must add those units to
the initial guess in the solution. Thus, in the example below we place 0_m in
the D: field before solving the problem. The solution is shown in the screen to
the right:
Press ` to return to normal calculator display. The solution for D will be
listed in the stack.
Page 6-24
Example 4 – Universal gravitation
Newton’s law of universal gravitation indicates that the magnitude of the
attractive force between two bodies of masses m
1
and m
2
separated by a
distance r is given by the equation
.
2
21
r
MM
GF
=
Here, G is the universal gravitational constant, whose value can be obtained
through the use of the function CONST in the calculator by using:
We can solve for any term in the equation (except G) by entering the
equation as:
This equation is then stored in EQ:
Launching the numerical solver for this equation results in an input form
containing input fields for F, G, m1, m2, and r.
Let’s solve this problem using units with the following values for the known
variables m1 = 1.0×10
6
kg, m2 = 1.0×10
12
kg, r = 1.0×10
11
m. Also, enter
a value of 0_N in field F to ensure the proper solution using units in the
calculator:
Page 6-25
Solve for F, and press to return to normal calculator display. The solution is F :
6.67259E-15_N, or F = 6.67259×10
-15
N.
Note: When using units in the numerical solver make sure that all the
variables have the proper units, that the units are compatible, and that the
equation is dimensionally homogeneous.
Different ways to enter equations into EQ
In all the examples shown above we have entered the equation to be solved
directly into variable EQ before activating the numerical solver. You can
actually type the equation to be solved directly into the solver after activating
it by editing the contents of the EQ field in the numerical solver input form. If
variable EQ has not been defined previously, when you launch the numerical
solver (‚Ï@@OK@@), the EQ field will be highlighted:
At this point you can either type a new equation by pressing @EDIT. You will
be provided with a set of apostrophes so that you can type the expression
between them:
Type an equation, say X^2 - 125 = 0, directly on the stack, and press @@@OK@@@ .
Page 6-26
At this point the equation is ready for solution.
Alternatively, you can activate the equation writer after pressing @EDIT to enter
your equation. Press ` to return to the numerical solver screen.
Another way to enter an equation into the EQ variable is to select a variable
already existing in your directory to be entered into EQ. This means that your
equation would have to have been stored in a variable name previously to
activating the numerical solver. For example, suppose that we have entered
the following equations into variables EQ1 and EQ2:
Now, launch the numerical solver (‚Ï@@OK@@, and highlight the EQ field.
At this point press the @CHOOS soft menu key. Use the up and down arrow keys
(—˜) to select, say, variable EQ1:
Press @@@OK@@@ after selecting EQ1 to load into variable EQ in the solver. The
new equation is ready to be solved.
Page 6-27
The SOLVE soft menu
The SOLVE soft menu allows access to some of the numerical solver functions
through the soft menu keys. To access this menu use in RPN mode: 74
MENU, or in ALG mode: MENU(74). Alternatively, you can use (hold)
7 to activate the SOLVE soft menu. The sub-menus provided by the SOLVE
soft menu are the following:
The ROOT sub-menu
The ROOT sub-menu include the following functions and sub-menus:
Function ROOT
Function ROOT is used to solve an equation for a given variable with a
starting guess value. In RPN mode the equation will be in stack level 3, while
the variable name will be located in level 2, and the initial guess in level 1.
The following figure shows the RPN stack before and after activating function
@ROOT:
In ALG mode, you would use ROOT(‘TAN(θ)=θ’,’θ’,5) to activate function
ROOT:
Variable EQ
The soft menu key @@EQ@@ in this sub-menu is used as a reference to the variable
EQ. Pressing this soft menu key is equivalent to using function RCEQ (ReCall
EQ).
Page 6-28
The SOLVR sub-menu
The SOLVR sub-menu activates the soft-menu solver for the equation currently
stored in EQ. Some examples are shown next:
Example 1
- Solving the equation t
2
-5t = -4
For example, if you store the equation ‘t^2-5*t=-4’ into EQ, and press @)SOLVR,
it will activate the following menu:
This result indicates that you can solve for a value of t for the equation listed at
the top of the display. If you try, for example, [ t ], it will give you the
result t: 1., after briefly flashing the message “Solving for t.” There is a
second root to this equation, which can be found by changing the value of t,
before solving for it again. Do the following: 10 [ t ], then press [ t ].
The result is now, t: 4.0000000003. To verify this result, press the soft menu
key labeled @EXPR=, which evaluates the expression in EQ for the current value
of t. The results in this case are:
To exit the SOLVR environment, press J. The access to the SOLVE menu is
lost at this point, so you have to activate it once more as indicated earlier, to
continue with the exercises below.
Example 2
- Solving the equation Q = at
2
+bt
It is possible to store in EQ, an equation involving more than one variable,
say, ‘Q = at^2 + bt’. In this case, after activating the SOLVE soft menu, and
pressing @)ROOT @)SOLVR, you will get the following screen:
Within this SOLVR environment you can provide values for any of the
variables listed by entering the value in the stack and pressing the
corresponding soft-menu keys. For example, say you enter the values Q = 14,
a = 2, and b = 3. You would use: 14 [ Q ], 2 [ a ], 3 [ b ].
Page 6-29
As variables Q, a, and b, get assigned numerical values, the assignments are
listed in the upper left corner of the display. At this point we can solve for t, by
using [ t ]. The result is t: 2. Pressing @EXPR= shows the results:
Example 3
- Solving two simultaneous equations, one at a time
You can also solve more than one equation by solving one equation at a time,
and repeating the process until a solution is found. For example, if you enter
the following list of equations into variable EQ: { ‘a*X+b*Y = c’, ‘k*X*Y=s’},
the keystroke sequence @)ROOT @)SOLVR, within the SOLVE soft menu, will produce
the following screen:
The first equation, namely, a*X + b*Y = c, will be listed in the top part of the
display. You can enter values for the variables a, b, and c, say:
2 [ a ] 5 [ b ] 19 [ c ]. Also, since we can only solve one equation at
a time, let’s enter a guess value for Y, say, 0 [ Y ], and solve for X, by using
[ X ]. This gives the value, X: 9.4999…. To check the value of the
equation at this point, press @EXPR=. The results are: Left: 19, Right: 19. To
solve the next equation, press L @NEXQ. The screen shows the soft menu keys as:
Say we enter the values k = 2, s = 12. Then solve for Y, and press
@EXPR=. The results are now, Y:
We then continue moving from the first to the second equation, back and forth,
solving the first equation for X and the second for Y, until the values of X and
Y converge to a solution. To move from equation to equation use @NEXQ. To
solve for X and Y use [ X ], and [ Y ], respectively. The following
sequence of solutions is produced:
Page 6-30
After solving the two equations, one at a time, we notice that, up to the third
decimal, X is converging to a value of 7.500, while Y is converging to a
value o 0.799.
Using units with the SOLVR sub-menu
These are some rules on the use of units with the SOLVR sub-menu:
Entering a guess with units for a given variable, will introduce the use
of those units in the solution.
If a new guess is given without units, the units previously saved for
that particular variable are used.
To remove units enter a number without units in a list as the new
guess, i.e., use the format { number }.
A list of numbers can be given as a guess for a variable. In this case,
the units takes the units used belong to the last number in the list. For
example, entering { 1.41_ft 1_cm 1_m } indicates that meters (m) will
be used for that variable.
The expression used in the solution must have consistent units, or an
error will result when trying to solve for a value.
The DIFFE sub-menu
The DIFFE sub-menu provides a number of functions for the numerical solution
of differential equations. The functions provided are the following:
These functions are presented in detail in Chapter 16.
The POLY sub-menu
The POLY sub-menu performs operations on polynomials. The functions
included are the following:
Page 6-31
Function PROOT
This function is used to find the roots of a polynomial given a vector
containing the polynomial coefficients in decreasing order of the powers of
the independent variable. In other words, if the polynomial is a
n
x
n
+ a
n-1
x
n-1
+ … + a
2
x
2
+ a
1
x + a
0
, the vector of coefficients should be entered as [a
n
, a
n-
1
, …
, a
2
, a
1
, a
0
]. For example, the roots of the polynomial whose
coefficients are [1, -5, 6] are [2, 3].
Function PCOEF
This function produces the coefficients [a
n
, a
n-1
, …
, a
2
, a
1
, a
0
] of a
polynomial a
n
x
n
+ a
n-1
x
n-1
+ … + a
2
x
2
+ a
1
x + a
0
, given a vector of its roots
[r
1
, r
2
, …, r
n
]. For example, a vector whose roots are given by
[-1, 2, 2, 1, 0], will produce the following coefficients: [1, -4, 3, 4, -4, 0].
The polynomial is x
5
- 4x
4
+ 3x
3
+ 4x
2
- 4x.
Function PEVAL
This function evaluates a polynomial, given a vector of its coefficients, [a
n
, a
n-
1
, …
, a
2
, a
1
, a
0
], and a value x
0
, i.e., PEVAL calculates a
n
x
0
n
+ a
n-1
x
0
n-1
+ …
+ a
2
x
0
2
+ a
1
x
0
+ a
0
. For example, for coefficients [2, 3, -1, 2] and a value of
2, PEVAL returns the value 28.
The SYS sub-menu
The SYS sub-menu contains a listing of functions used to solve linear systems.
The functions listed in this sub-menu are:
These functions are presented in detail in Chapter 11.
The TVM sub-menu
The TVM sub-menu contains functions for calculating Time Value of Money.
This is an alternative way to solve FINANCE problems (see Chapter 6). The
functions available are shown next:
Page 6-32
The SOLVR sub-menu
The SOLVR sub-menu in the TVM sub-menu will launch the solver for solving
TVM problems. For example, pressing @)SOLVR, at this point, will trigger the
following screen:
As an exercise, try using the values n = 10, I%YR = 5.6, PV = 10000, and FV
= 0, and enter [ PMT ] to find PMT = -1021.08…. Pressing L,
produces the following screen:
Press J to exit the SOLVR environment. Find your way back to the TVM
sub-menu within the SOLVE sub-menu to try the other functions available.
Function TVMROOT
This function requires as argument the name of one of the variables in the
TVM problem. The function returns the solution for that variable, given that
the other variables exist and have values stored previously. For example,
having solved a TVM problem above, we can solve for, say, ‘N’, as follows:
[ ‘ ] ~n` @TVMRO. The result is 10.
Function AMORT
This function takes a value representing a period of payment (between 0 and
n) and returns the principal, interest, and balance for the values currently
stored in the TVM variables. For example, with the data used earlier, if we
activate function AMORT for a value of 10, we get:
Page 6-33
Function BEG
If selected, the TMV calculations use payments at the beginning of each
period. If deselected, the TMV calculations use payments at the end of each
period.
Page 7-1
Chapter 7
Solving multiple equations
Many problems of science and engineering require the simultaneous solutions
of more than one equation. The calculator provides several procedures for
solving multiple equations as presented below. Please notice that no
discussion of solving systems of linear equations is presented in this chapter.
Linear systems solutions will be discussed in detail in subsequent chapters on
matrices and linear algebra.
Rational equation systems
Equations that can be re-written as polynomials or rational algebraic
expressions can be solved directly by the calculator by using the function
SOLVE. You need to provide the list of equations as elements of a vector.
The list of variables to solve for must also be provided as a vector. Make sure
that the CAS is set to mode Exact before attempting a solution using this
procedure. Also, the more complicated the expressions, the longer the CAS
takes in solving a particular system of equations. Examples of this
application follow:
Example 1 – Projectile motion
Use function SOLVE with the following vector arguments, the first being the list
of equations: [‘x = x0 + v0*COS(θ0)*t’ ‘y =y0+v0*SIN(θ0)*t –
g*t^2/2’]`, and the second being the variables to solve for, say t and y0,
i.e., [‘t’ ‘y0’].
The solution in this case will be provided using the RPN mode. The only
reason being that we can build the solution step by step. The solution in the
ALG mode is very similar. First, we store the first vector (equations) into
variable A2, and the vector of variables into variable A1. The following
screen shows the RPN stack before saving the variables.
Page 7-2
At this point, we need only press K twice to store these variables.
To solve, first change CAS mode to
Exact, then, list the contents of A2 and A1,
in that order: @@@A2@@@ @@@A1@@@ .
Use command SOLVE at this point (from the S.SLV menu: „Î) After
about 40 seconds, maybe more, you get as result a list:
{ ‘t = (x-x0)/(COS(θ0)*v0)’
‘y0 = (2*COS(θ0)^2*v0^2*y+(g*x^2(2*x0*g+2*SIN(θ0))*COS(θ0)*v0^2)*x+
(x0^2*g+2*SIN(θ0)*COS(θ0)*v0^2*x0)))/(2*COS(θ0)^2*v0^2)’]}
Press µ to remove the vector from the list, then use command OBJ, to get
the equations listed separately in the stack.
Note: This method worked fine in this example because the unknowns t and
y0 were algebraic terms in the equations. This method would not work for
solving for θ0, since θ0 belongs to a transcendental term.
Example 2 – Stresses in a thick wall cylinder
Consider a thick-wall cylinder for inner and outer radius a and b, respectively,
subject to an inner pressure P
i
and outer pressure P
o
. At any radial distance r
from the cylinder’s axis the normal stresses in the radial and transverse
directions, σ
rr
and σ
θθ
, respectively, are given by
,
)(
)(
222
22
22
22
abr
PPba
ab
PbPa
oioi
+
=
θθ
σ
.
)(
)(
222
22
22
22
abr
PPba
ab
PbPa
oioi
rr
=σ
Page 8-7
%({10, 20, 30},1) = {%(10,1),%(20,1),%(30,1)},
while
%(5,{10,20,30}) = {%(5,10),%(5,20),%(5,30)}
In the following example, both arguments of function % are lists of the same
size. In this case, a term-by-term distribution of the arguments is performed,
i.e.,
%({10,20,30},{1,2,3}) = {%(10,1),%(20,2),%(30,3)}
This description of function % for list arguments shows the general pattern of
evaluation of any function with two arguments when one or both arguments
are lists. Examples of applications of function RND are shown next:
Lists of complex numbers
The following exercise shows how to create a list of complex numbers given
two lists of the same length, one representing the real parts and one the
imaginary parts of the complex numbers. Use L1 ADD i*L2. The screen also
shows that the resulting complex-number list is stored into variable L5:
Functions such as LN, EXP, SQ, etc., can also be applied to a list of complex
numbers, e.g.,
Page 8-8
The following example shows applications of the functions RE(Real part),
IM(imaginary part), ABS(magnitude), and ARG(argument) of complex
numbers. The results are lists of real numbers:
Lists of algebraic objects
The following are examples of lists of algebraic objects with the function SIN
applied to them:
The MTH/LIST menu
The MTH menu provides a number of functions that exclusively to lists. With
flag 117 set to CHOOSE boxes:
Page 8-9
Next, with system flag 117 set to SOFT menus:
This menu contains the following functions:
LIST : Calculate increment among consecutive elements in list
ΣLIST : Calculate summation of elements in the list
ΠLIST : Calculate product of elements in the list
SORT : Sorts elements in increasing order
REVLIST : Reverses order of list
ADD : Operator for term-by-term addition of two lists of the same length
(examples of this operator were shown above)
Examples of application of these functions in ALG mode are shown next:
SORT and REVLIST can be combined to sort a list in decreasing order:
Page 8-10
Manipulating elements of a list
The PRG (programming) menu includes a LIST sub-menu with a number of
functions to manipulate elements of a list. With system flag 117 set to
CHOOSE boxes:
Item 1. ELEMENTS.. contains the following functions that can be used for the
manipulation of elements in lists:
List size
Function SIZE, from the PRG/LIST/ELEMENTS sub-menu, can be used to
obtain the size (also known as length) of the list, e.g.,
Extracting and inserting elements in a list
To extract elements of a list we use function GET, available in the
PRG/LIST/ELEMENTS sub-menu. The arguments of function GET are the list
and the number of the element you want to extract. To insert an element into
a list use function PUT (also available in the PRG/LST/ELEMENTS sub-menu).
The arguments of function PUT are the list, the position that one wants to
replace, and the value that will be replaced. Examples of applications of
functions GET and PUT are shown in the following screen:
Page 8-11
Functions GETI and PUTI, also available in sub-menu PRG/ ELEMENTS/, can
also be used to extract and place elements in a list. These two functions,
however, are useful mainly in programming. Function GETI uses the same
arguments as GET and returns the list, the element location plus one, and the
element at the location requested. Function PUTI uses the same arguments as
GET and returns the list and the list size.
Element position in the list
To determine the position of an element in a list use function POS having the
list and the element of interest as arguments. For example,
HEAD and TAIL functions
The HEAD function extracts the first element in the list. The TAIL function
removes the first element of a list, returning the remaining list. Some examples
are shown next:
The SEQ function
Item 2. PROCEDURES.. in the PRG/LIST menu contains the following functions
that can be used to operate on lists.
Functions REVLIST and SORT were introduced earlier as part of the MTH/LIST
menu. Functions DOLIST, DOSUBS, NSUB, ENDSUB, and STREAM, are
designed as programming functions for operating lists in RPN mode. Function
Page 8-12
SEQ is useful to produce a list of values given a particular expression and is
described in more detail here.
The SEQ function takes as arguments an expression in terms of an index, the
name of the index, and starting, ending, and increment values for the index,
and returns a list consisting of the evaluation of the expression for all possible
values of the index. The general form of the function is SEQ(expression, index,
start, end, increment).
In the following example, in ALG mode, we identify expression = n
2
, index =
n, start = 1, end = 4, and increment = 1:
The list produced corresponds to the values {1
2
, 2
2
, 3
2
, 4
2
}. In RPN mode,
you can list the different arguments of the function as follows:
before applying function SEQ.
The MAP function
The MAP function, available through the command catalog (‚N), takes
as arguments a list of numbers and a function f(X) or a program of the form
<< a … >>, and produces a list consisting of the application of function f
or the program to the list of numbers. For example, the following call to
function MAP applies the function SIN(X) to the list {1,2,3}:
The following call to function MAP uses a program instead of a function as
second argument:
Page 8-13
Defining functions that use lists
In Chapter 3 we introduced the use of the DEFINE function ( „à) to
create functions of real numbers with one or more arguments. A function
defined with DEF can also be used with list arguments, except that, any
function incorporating an addition must use the ADD operator rather than the
plus sign (+). For example, if we define the function F(X,Y) = (X-5)*(Y-2),
shown here in ALG mode:
we can use lists (e.g., variables L1 and L2, defined earlier in this Chapter) to
evaluate the function, resulting in:
Since the function statement includes no additions, the application of the
function to list arguments is straightforward. However, if we define the
function G(X,Y) = (X+3)*Y, an attempt to evaluate this function with list
arguments (L1, L2) will fail:
To fix this problem we can edit the contents of variable @@@G@@@ , which we can
list in the stack by using @@@G@@@,
to replace the plus sign (+) with ADD:
Page 8-14
Next, we store the edited expression into variable @@@G@@@:
Evaluating G(L1,L2) now produces the following result:
As an alternative, you can define the function with ADD rather than the plus
sign (+), from the start, i.e., use DEFINE('G(X,Y)=(X ADD 3)*Y') :
You can also define the function as G(X,Y) = (X--3)*Y.
Applications of lists
This section shows a couple of applications of lists to the calculation of
statistics of a sample. By a sample we understand a list of values, say, {s
1
,
s
2
, …, s
n
}. Suppose that the sample of interest is the list
{1, 5, 3, 1, 2, 1, 3, 4, 2, 1}
Page 8-15
and that we store it into a variable called S (The screen shot below shows this
action in ALG mode, however, the procedure in RPN mode is very similar.
Just keep in mind that in RPN mode you place the arguments of functions in
the stack before activating the function):
Harmonic mean of a list
This is a small enough sample that we can count on the screen the number of
elements (n=10). For a larger list, we can use function SIZE to obtain that
number, e.g.,
Suppose that we want to calculate the harmonic mean of the sample, defined
as
+++
==
=
n
n
k
n
h
sssn
sn
s
1111
1
11
1
21
1
L
.
To calculate this value we can follow this procedure:
1. Apply function INV () to list S:
2. Apply function ΣLIST() to the resulting list in1.
Page 8-16
3. Divide the result above by n = 10:
4. Apply the INV() function to the latest result:
Thus, the harmonic mean of list S is s
h
= 1.6348…
Geometric mean of a list
The geometric mean of a sample is defined as
n
n
n
n
k
kg
xxxxx L
21
1
==
=
To find the geometric mean of the list stored in S, we can use the
following procedure:
1. Apply function ΠLIST() to list S:
2. Apply function XROOT(x,y), i.e., keystrokes ‚», to the result in
1:
Thus, the geometric mean of list S is s
g
= 1.003203…
Page 8-18
3. Use function ΣLIST, once more, to calculate the denominator of s
w
:
4. Use the expression ANS(2)/ANS(1) to calculate the weighted
average:
Thus, the weighted average of list S with weights in list W is s
w
= 2.2.
Note: ANS(1) refers to the most recent result (55), while ANS(2) refers to
the previous to last result (121).
Statistics of grouped data
Grouped data is typically given by a table showing the frequency (w) of data
in data classes or bins. Each class or bin is represented by a class mark (s),
typically the midpoint of the class. An example of grouped data is shown
next:
Class Frequency
Class mark count
boundaries s
k
w
k
0 - 2 1 5
2 - 4 3 12
4 - 6 5 18
6 - 8 7 1
8 -10 9 3
The class mark data can be stored in variable S, while the frequency count
can be stored in variable W, as follows:
Page 8-19
Given the list of class marks S = {s
1
, s
2
, …, s
n
}, and the list of frequency
counts W = {w
1
, w
2
, …, w
n
}, the weighted average of the data in S with
weights W represents the mean value of the grouped data, that we call s, in
this context:
N
sw
w
sw
s
n
k
kk
n
k
k
n
k
kk
=
=
=
=
=
1
1
1
,
where
=
=
n
k
k
wN
1
represents the total frequency count.
The mean value for the data in lists S and W, therefore, can be calculated
using the procedure outlined above for the weighted average, i.e.,
We’ll store this value into a variable called XBAR:
The variance of this grouped data is defined as
N
ssw
w
ssw
V
n
k
kk
n
k
k
n
k
kk
=
=
=
=
=
1
2
1
1
2
)()(
Page 8-20
To calculate this last result, we can use the following:
The standard deviation of the grouped data is the square root of the variance:
Page 9-1
Chapter 9
Vectors
This Chapter provides examples of entering and operating with vectors, both
mathematical vectors of many elements, as well as physical vectors of 2 and 3
components.
Definitions
From a mathematical point of view, a vector is an array of 2 or more elements
arranged into a row or a column. These will be referred to as row and
column vectors. Examples are shown below:
]2,5,3,1[,
6
3
1
=
= uv
Physical vectors have two or three components and can be used to represent
physical quantities such as position, velocity, acceleration, forces, moments,
linear and angular momentum, angular velocity and acceleration, etc.
Referring to a Cartesian coordinate system (x,y,z), there exists unit vectors i, j,
k associated with each coordinate direction, such that a physical vector A can
be written in terms of its components A
x
, A
y
, A
z
, as A = A
x
i + A
y
j + A
z
k.
Alternative notation for this vector are: A = [A
x
, A
y
, A
z
], A = (A
x
, A
y
, A
z
), or A
= < A
x
, A
y
, A
z
>. A two dimensional version of this vector will be written as A
= A
x
i + A
y
j, A = [A
x
, A
y
], A = (A
x
, A
y
), or A = < A
x
, A
y
>. Since in the
calculator vectors are written between brackets [ ], we will choose the notation
A = [A
x
, A
y
, A
z
] or A = [A
x
, A
y
, A
z
], to refer to two- and three-dimensional
vectors from now on. The magnitude of a vector A is defined as |A| =
222
zyx
AAA ++ . A unit vector in the direction of vector A, is defined as e
A
=
A/|A|. Vectors can be multiplied by a scalar, e.g., kA = [kA
x
, kA
y
, kA
z
].
Physically, the vector kA is parallel to vector A, if k>0, or anti-parallel to
vector A, if k<0. The negative of a vector is defined as –A = (–1)A = [–A
x
, –
A
y
, –A
z
]. Division by as scalar can be interpreted as a multiplication, i.e.,
A/k = (1/k)A. Addition and subtraction of vectors are defined as A±B = [A
x
± B
x
, A
y
± B
y
, A
z
± B
y
], where B is the vector B = [B
x
, B
y
, B
z
].
Page 9-2
There are two definitions of products of physical vectors, a scalar or internal
product (the dot product) and a vector or external product (the cross product).
The dot product produces a scalar value defined as AB = |A||B|cos(θ),
where θ is the angle between the two vectors. The cross product produces a
vector A×B whose magnitude is |A×B| = |A||B|sin(θ), and its direction is
given by the so-called right-hand rule (consult a textbook on Math, Physics, or
Mechanics to see this operation illustrated graphically). In terms of Cartesian
components, AB = A
x
B
x
+A
y
B
y
+A
z
B
z
, and A×B = [A
y
B
z
-A
z
B
y
,A
z
B
x
-A
x
B
z
,A
x
B
y
-
A
y
B
x
]. The angle between two vectors can be found from the definition of the
dot product as cos(θ) = AB/|A||B|= e
A
e
B
. Thus, if two vectors A and B are
perpendicular (θ = 90
0
= π/2
rad
), AB = 0.
Entering vectors
In the calculator, vectors are represented by a sequence of numbers enclosed
between brackets, and typically entered as row vectors. The brackets are
generated in the calculator by the keystroke combination „Ô ,
associated with the * key. The following are examples of vectors in the
calculator:
[3.5, 2.2, -1.3, 5.6, 2.3] A general row vector
[1.5,-2.2] A 2-D vector
[3,-1,2] A 3-D vector
['t','t^2','SIN(t)'] A vector of algebraics
Typing vectors in the stack
With the calculator in ALG mode, a vector is typed into the stack by opening
a set of brackets („Ô) and typing the components or elements of the
vector separated by commas (‚í). The screen shots below show the
entering of a numerical vector followed by an algebraic vector. The figure to
the left shows the algebraic vector before pressing . The figure to the right
shows the calculator’s screen after entering the algebraic vector:
Page 9-3
In RPN mode, you can enter a vector in the stack by opening a set of brackets
and typing the vector components or elements separated by either commas
(‚í) or spaces (#). Notice that after pressing ` , in either mode,
the calculator shows the vector elements separated by spaces.
Storing vectors into variables
Vectors can be stored into variables. The screen shots below show the vectors
u
2
= [1, 2], u
3
= [-3, 2, -2], v
2
= [3,-1], v
3
= [1, -5, 2]
stored into variables @@@u2@@, @@@u3@@, @@@v2@@, and @@@v3@@, respectively. First, in ALG
mode:
Then, in RPN mode (before pressing K, repeatedly):
Using the Matrix Writer (MTRW) to enter vectors
Vectors can also be entered by using the Matrix Writer „²(third key in
the fourth row of keys from the top of the keyboard). This command generates
a species of spreadsheet corresponding to rows and columns of a matrix
(Details on using the Matrix Writer to enter matrices will be presented in a
subsequent chapter). For a vector we are interested in filling only elements in
the top row. By default, the cell in the top row and first column is selected.
At the bottom of the spreadsheet you will find the following soft menu keys:
@EDIT! @VEC
WID @WID @GO @GO
The @EDIT key is used to edit the contents of a selected cell in the
Matrix Writer.
The @VEC@@ key, when selected, will produce a vector, as opposite to a
matrix of one row and many columns.
Page 9-14
„Ô5 ‚í ~‚6 25 ‚í 2.3
Before pressing `, the screen will look as in the left-hand side of the
following figure. After pressing `, the screen will look as in the right-hand
side of the figure (For this example, the numerical format was changed to Fix,
with three decimals).
Notice that the vector is displayed in Cartesian coordinates , with components
x = r cos(θ), y = r sin(θ), z = z, even though we entered it in polar coordinates.
This is because the vector display will default to the current coordinate system.
For this case, we have x = 4.532, y = 2.112, and z = 2.300.
Suppose that we now enter a vector in spherical coordinates (i.e., in the form
(ρ,θ,φ), where ρ is the length of the vector, θ is the angle that the xy projection
of the vector forms with the positive side of the x-axis, and φ is the angle that ρ
forms with the positive side of the z axis), with ρ = 5, θ = 25
o
, and φ = 45
o
.
We will use:„Ô5 ‚í ~‚6 25 í
~‚6 45
The figure below shows the transformation of the vector from spherical to
Cartesian coordinates, with x = ρ sin(φ) cos(θ), y = ρ sin (φ) cos (θ), z = ρ
cos(φ). For this case, x = 3.204, y = 1.494, and z = 3.536.
If the CYLINdrical system is selected, the top line of the display will show an
RZ field, and a vector entered in cylindrical coordinates will be shown in its
cylindrical (or polar) coordinate form (r,θ,z). To see this in action, change
the coordinate system to CYLINdrical and watch how the vector displayed in
the last screen changes to its cylindrical (polar) coordinate form. The second
component is shown with the angle character in front to emphasize its angular
nature.
Page 9-15
The conversion from Cartesian to cylindrical coordinates is such that r =
(x
2
+y
2
)
1/2
, θ = tan
-1
(y/x), and z = z. For the case shown above the
transformation was such that (x,y,z) = (3.204, 2.112, 2.300), produced
(r,θ,z) = (3.536,25
o
,3.536).
At this point, change the angular measure to Radians. If we now enter a
vector of integers in Cartesian form, even if the CYLINdrical coordinate system
is active, it will be shown in Cartesian coordinates, e.g.,
This is because the integer numbers are intended for use with the CAS and,
therefore, the components of this vector are kept in Cartesian form. To force
the conversion to polar coordinates enter the vector components as real
numbers (i.e., add a decimal point), e.g., [2., 3., 5.].
With the cylindrical coordinate system selected, if we enter a vector in
spherical coordinates it will be automatically transformed to its cylindrical
(polar) equivalent (r,θ,z) with r = ρ sin φ, θ = θ, z = ρ cos φ. For example, the
following figure shows the vector entered in spherical coordinates, and
transformed to polar coordinates. For this case, ρ = 5, θ = 25
o
, and φ = 45
o
,
while the transformation shows that r = 3.563, and z = 3.536. (Change to
DEG):
Next, let’s change the coordinate system to spherical coordinates by using
function SPHERE from the VECTOR sub-menu in the MTH menu. When this
coordinate system is selected, the display will show the R∠∠ format in the top
line. The last screen will change to show the following:
Page 9-16
Notice that the vectors that were written in cylindrical polar coordinates have
now been changed to the spherical coordinate system. The transformation is
such that ρ = (r
2
+z
2
)
1/2
, θ = θ, and φ = tan
-1
(r/z). However, the vector that
originally was set to Cartesian coordinates remains in that form.
Application of vector operations
This section contains some examples of vector operations that you may
encounter in Physics or Mechanics applications.
Resultant of forces
Suppose that a particle is subject to the following forces (in N): F
1
= 3i+5j+2k,
F
2
= -2i+3j-5k, and F
3
= 2i-3k. To determine the resultant, i.e., the sum, of all
these forces, you can use the following approach in ALG mode:
Thus, the resultant is R = F
1
+ F
2
+ F
3
= (3i+8j-6k)N. RPN mode use:
[3,5,2] ` [-2,3,-5] ` [2,0,3] ` + +
Angle between vectors
The angle between two vectors A, B, can be found as θ =cos
-1
(AB/|A||B|)
Suppose that you want to find the angle between vectors A = 3i-5j+6k, B =
2i+j-3k, you could try the following operation (angular measure set to degrees)
in ALG mode:
1 - Enter vectors [3,-5,6], press `, [2,1,-3], press `.
2 - DOT(ANS(1),ANS(2)) calculates the dot product
3 - ABS(ANS(3))*ABS((ANS(2)) calculates product of magnitudes
4 - ANS(2)/ANS(1) calculates cos(θ)
5 - ACOS(ANS(1)), followed by ,NUM(ANS(1)), calculates θ
The steps are shown in the following screens (ALG mode, of course):
Page 9-17
Thus, the result is θ = 122.891
o
. In RPN mode use the following:
[3,-5,6] ` [2,1,-3] ` DOT
[3,-5,6] ` ABS [2,1,-3] ` ABS *
/ ACOS NUM
Moment of a force
The moment exerted by a force F about a point O is defined as the cross-
product M = r×F, where r, also known as the arm of the force, is the position
vector based at O and pointing towards the point of application of the force.
Suppose that a force F = (2i+5j-6k) N has an arm r = (3i-5j+4k)m. To
determine the moment exerted by the force with that arm, we use function
CROSS as shown next:
Thus, M = (10i+26j+25k) mN. We know that the magnitude of M is such
that |M| = |r||F|sin(θ), where θ is the angle between r and F. We can find
this angle as, θ = sin
-1
(|M| /|r||F|) by the following operations:
1 – ABS(ANS(1))/(ABS(ANS(2))*ABS(ANS(3)) calculates sin(θ)
2 – ASIN(ANS(1)), followed by NUM(ANS(1)) calculates θ
These operations are shown, in ALG mode, in the following screens:
Page 9-18
Thus the angle between vectors r and F is θ = 41.038
o
. RPN mode, we can
use: [3,-5,4] ` [2,5,-6] ` CROSS ABS [3,-5,4] `
ABS [2,5,-6] ` ABS * / ASIN NUM
Equation of a plane in space
Given a point in space P
0
(x
0
,y
0
,z
0
) and a vector N = N
x
i+N
y
j+N
z
k normal to a
plane containing point P
0
, the problem is to find the equation of the plane.
We can form a vector starting at point P
0
and ending at point P(x,y,z), a
generic point in the plane. Thus, this vector r = P
0
P = (x-x
0
)i+ (y-y
0
)j + (z-z
0
)k,
is perpendicular to the normal vector N, since r is contained entirely in the
plane. We learned that for two normal vectors N and r, Nr =0. Thus, we
can use this result to determine the equation of the plane.
To illustrate the use of this approach, consider the point P
0
(2,3,-1) and the
normal vector N = 4i+6j+2k, we can enter vector N and point P
0
as two
vectors, as shown below. We also enter the vector [x,y,z] last:
Next, we calculate vector P
0
P = r as ANS(1) – ANS(2), i.e.,
Finally, we take the dot product of ANS(1) and ANS(4) and make it equal to
zero to complete the operation Nr =0:
Page 9-19
We can now use function EXPAND (in the ALG menu) to expand this
expression:
Thus, the equation of the plane through point P
0
(2,3,-1) and having normal
vector N = 4i+6j+2k, is 4x + 6y + 2z – 24 = 0. In RPN mode, use:
[2,3,-1] ` ['x','y','z'] ` - [4,6,2] DOT EXPAND
Row vectors, column vectors, and lists
The vectors presented in this chapter are all row vectors. In some instances, it
is necessary to create a column vector (e.g., to use the pre-defined statistical
functions in the calculator). The simplest way to enter a column vector is by
enclosing each vector element within brackets, all contained within an
external set of brackets. For example, enter:
[[1.2],[2.5],[3.2],[4.5],[6.2]] `
This is represented as the following column vector:
In this section we will showing you ways to transform: a column vector into a
row vector, a row vector into a column vector, a list into a vector, and a
vector (or matrix) into a list.
We first demonstrate these transformations using the RPN mode. In this mode,
we will use functions OBJ, LIST, ARRY and DROP to perform the
transformation. To facilitate accessing these functions we will set system flag
117 to SOFT menus (see Chapter 1). With this flag set, functions OBJ,
ARRY, and LIST will be accessible by using „° @)TYPE!. Functions
Page 9-20
OBJ, ARRY, and LIST will be available in soft menu keys A, B,
and C. Function DROP is available by using „°@)STACK @DROP.
Following we introduce the operation of functions OBJ, LIST, ARRY, and
DROP with some examples.
Function OBJ
This function decomposes an object into its components. If the argument is a
list, function OBJ will list the list elements in the stack, with the number of
elements in stack level 1, for example: {1,2,3} ` „°@)TYPE! @OBJ@
results in:
When function OBJ is applied to a vector, it will list the elements of the
vector in the stack, with the number of elements in level 1: enclosed in braces
(a list). The following example illustrates this application: [1,2,3] `
„°@)TYPE! @OBJ@ results in:
If we now apply function OBJ once more, the list in stack level 1:, {3.}, will
be decomposed as follows:
Function LIST
This function is used to create a list given the elements of the list and the list
length or size. In RPN mode, the list size, say, n, should be placed in stack
level 1:. The elements of the list should be located in stack levels 2:, 3:, …,
Page 9-21
n+1:. For example, to create the list {1, 2, 3}, type: 1` 2`
3` 3` „°@)TYPE! !LIST@.
Function ARRY
This function is used to create a vector or a matrix. In this section, we will use
it to build a vector or a column vector (i.e., a matrix of n rows and 1 column).
To build a regular vector we enter the elements of the vector in the stack, and
in stack level 1: we enter the vector size as a list, e.g., 1` 2`
3` „ä 3` „°@)TYPE! !ARRY@.
To build a column vector of n elements, enter the elements of the vector in the
stack, and in stack level 1 enter the list {n 1}. For example,1` 2`
3` „ä 1‚í3` „°@)TYPE! !ARRY@.
Function DROP
This function has the same effect as the delete key (ƒ).
Transforming a row vector into a column vector
We illustrate the transformation with vector [1,2,3]. Enter this vector into
the RPN stack to follow the exercise. To transform a row vector into a column
vector, we need to carry on the following operations in the RPN stack:
1 - Decompose the vector with function OBJ
2 - Press 1+ to transform the list in stack level 1: from {3} to {3,1}
3 - Use function ARRY to build the column vector
These three steps can be put together into a UserRPL program, entered as
follows (in RPN mode, still): ‚å„°@)TYPE! @OBJ@ 1 + !ARRY@
`³~~rxc` K
Page 9-22
A new variable, @@RXC@@, will be available in the soft menu labels after pressing
J:
Press @@RXC@@ to see the program contained in the variable RXC:
<< OBJ 1 + ARRY >>
This variable, @@RXC@@, can now be used to directly transform a row vector to a
column vector. In RPN mode, enter the row vector, and then press @@RXC@@. Try,
for example: [1,2,3] ` @@RXC@@.
After having defined this variable , we can use it in ALG mode to transform a
row vector into a column vector. Thus, change your calculator’s mode to ALG
and try the following procedure: [1,2,3] ` J @@RXC@@ „ Ü
î, resulting in:
Transforming a column vector into a row vector
To illustrate this transformation, we’ll enter the column vector
[[1],[2],[3]] in RPN mode. Then, follow the next exercise to
transform a row vector into a column vector:
1 - Use function OBJ to decompose the column vector
2 - Use function OBJ to decompose the list in stack level 1:
Page 9-23
3 - Press the delete key ƒ (also known as function DROP) to eliminate the
number in stack level 1:
4 - Use function LIST to create a list
5 - Use function ARRY to create the row vector
These five steps can be put together into a UserRPL program, entered as
follows (in RPN mode, still):
‚å„°@)TYPE! @OBJ@ @OBJ@
„°@)STACK @DROP „°@)TYPE! !LIST@ !ARRY@ `
³~~cxr ` K
A new variable, @@CXR@@, will be available in the soft menu labels after pressing
J:
Press @@CXR@@ to see the program contained in the variable CXR:
<< OBJ OBJ DROP ARRY >>
This variable, @@CXR@@, can now be used to directly transform a column vector to
a row vector. In RPN mode, enter the column vector, and then press @@CXR@@.
Try, for example: [[1],[2],[3]] ` @@CXR@@.
After having defined variable @@CXR@@, we can use it in ALG mode to transform a
row vector into a column vector. Thus, change your calculator’s mode to ALG
and try the following procedure:
[[1],[2],[3]] ` J @@CXR@@ „Ü „î
Page 9-24
resulting in:
Transforming a list into a vector
To illustrate this transformation, we’ll enter the list {1,2,3} in RPN mode.
Then, follow the next exercise to transform a list into a vector:
1 - Use function OBJ to decompose the column vector
2 - Type a 1 and use function LIST to create a list in stack level 1:
3 - Use function ARRY to create the vector
These three steps can be put together into a UserRPL program, entered as
follows (in RPN mode):
‚å„°@)TYPE! @OBJ@ 1 !LIST@ !ARRY@ `
³~~lxv ` K
A new variable, @@LXV@@, will be available in the soft menu labels after pressing
J:
Press @@LXV@@ to see the program contained in the variable LXV:
<< OBJ 1 LIST ARRY >>
This variable, @@LXV@@, can now be used to directly transform a list into a vector.
In RPN mode, enter the list, and then press @@LXV@@. Try, for example:
{1,2,3} ` @@LXV@@.
Page 9-25
After having defined variable @@LXV@@, we can use it in ALG mode to transform a
list into a vector. Thus, change your calculator’s mode to ALG and try the
following procedure: {1,2,3} ` J @@LXV@@ „Ü „î, resulting
in:
Transforming a vector (or matrix) into a list
To transform a vector into a list, the calculator provides function AXL. You can
find this function through the command catalog, as follows:
‚N~~axl~@@OK@@
As an example, apply function AXL to the vector [1,2,3] in RPN mode by
using:[1,2,3] ` AXL. The following screen shot shows the application
of function AXL to the same vector in ALG mode.
Page 10-1
Chapter 10
Creating and manipulating matrices
This chapter shows a number of examples aimed at creating matrices in the
calculator and demonstrating manipulation of matrix elements.
Definitions
A matrix is simply a rectangular array of objects (e.g., numbers, algebraics)
having a number of rows and columns. A matrix A having n rows and m
columns will have, therefore, n×m elements. A generic element of the matrix
is represented by the indexed variable a
ij
, corresponding to row i and column
j. With this notation we can write matrix A as A = [a
ij
]
n
×
m
. The full matrix is
shown next:
.][
21
22221
11211
==
×
nmnn
m
m
mnij
aaa
aaa
aaa
a
L
OMM
L
L
A
A matrix is square if m = n. The transpose
of a matrix is constructed by
swapping rows for columns and vice versa. Thus, the transpose of matrix A, is
A
T
= [(a
T
)
ij
]
m
×
n
= [a
ji
]
m
×
n
. The main diagonal of a square matrix is the collection
of elements a
ii
. An identity matrix, I
n
×
n
, is a square matrix whose main
diagonal elements are all equal to 1, and all off-diagonal elements are zero.
For example, a 3×3 identity matrix is written as
=
100
010
001
I
An identity matrix can be written as I
n
×
n
= [δ
ij
], where δ
ij
is a function known
as Kronecker’s delta
, and defined as
=
=
jiif
jiif
ij
,0
,1
δ
.
Page 10-2
Entering matrices in the stack
In this section we present two different methods to enter matrices in the
calculator stack: (1) using the Matrix Writer, and (2) typing the matrix directly
into the stack.
Using the Matrix Writer
As with the case of vectors, discussed in Chapter 9, matrices can be entered
into the stack by using the Matrix Writer. For example, to enter the matrix:
first, start the matrix writer by using „². Make sure that the option
@GO
is selected. Then use the following keystrokes:
2.5\` 4.2` 2`˜ššš
.3` 1.9` 2.8 `
2` .1\` .5`
At this point, the Matrix Writer screen may look like this:
Press ` once more to place the matrix on the stack. The ALG mode stack is
shown next, before and after pressing , once more:
,
5.01.02
8.29.13.0
0.22.45.2
Page 10-3
If you have selected the textbook display option (using H@)DISP! and checking
off
Textbook), the matrix will look like the one shown above. Otherwise,
the display will show:
The display in RPN mode will look very similar to these.
Note: Details on the use of the matrix writer were presented in Chapter 9.
Typing in the matrix directly into the stack
The same result as above can be achieved by entering the following directly
into the stack:
„Ô
„Ô 2.5\ ‚í 4.2 ‚í 2 ™
‚í
„Ô .3 ‚í 1.9 ‚í 2.8 ™
‚í
„Ô 2 ‚í .1\ ‚í .5
Thus, to enter a matrix directly into the stack open a set of brackets („Ô)
and enclose each row of the matrix with an additional set of brackets
(„Ô). Commas (‚í .) should separate the elements of each
row, as well as the brackets between rows. (Note: In RPN mode, you can
omit the inner brackets after the first set has been entered, thus, instead of
typing, for example, [[1 2 3] [4 5 6] [7 8 9]], type [[1 2 3] 4 5 6 7 8 9].)
For future exercises, let’s save this matrix under the name A. In ALG mode
use K~a. In RPN mode, use ³~a K.
Creating matrices with calculator functions
Some matrices can be created by using the calculator functions available in
either the MTH/MATRIX/MAKE sub-menu within the MTH menu („´),
Page 10-4
or in the MATRICES/CREATE menu available through „Ø:
The MTH/MATRIX/MAKE sub menu (let’s call it the MAKE menu) contains the
following functions:
while the MATRICES/CREATE sub-menu (let’s call it the CREATE menu) has the
following functions:
Page 10-5
As you can see from exploring these menus (MAKE and CREATE), they both
have the same functions GET, GETI, PUT, PUTI, SUB, REPL, RDM, RANM,
HILBERT, VANDERMONDE, IDN, CON,
DIAG, and DIAG. The CREATE
menu includes the COLUMN and ROW sub-menus, that are also available
under the MTH/MATRIX menu. The MAKE menu includes the functions SIZE,
that the CREATE menu does not include. Basically, however, both menus,
MAKE and CREATE, provide the user with the same set of functions. In the
examples that follow, we will show how to access functions through use of the
matrix MAKE menu. At the end of this section we present a table with the
keystrokes required to obtain the same functions with the CREATE menu when
system flag 117 is set to SOFT menus.
If you have set that system flag (flag 117) to SOFT menu, the MAKE menu will
be available through the keystroke sequence: „´!)MATRX !)MAKE!
The functions available will be shown as soft-menu key labels as follows (press
L to move to the next set of functions):
With system flag 117 set to SOFT menus, the functions of the CREATE menu,
triggered by „Ø)@CREAT ,will show as follows:
In the next sections we present applications of the matrix functions in the
MAKE and CREATE menu.
Page 10-6
Functions GET and PUT
Functions GET, GETI, PUT, and PUTI, operate with matrices in a similar
manner as with lists or vectors, i.e., you need to provide the location of the
element that you want to GET or PUT. However, while in lists and vectors only
one index is required to identify an element, in matrices we need a list of two
indices {row, column} to identify matrix elements. Examples of the use of
GET and PUT follow.
Let’s use the matrix we stored above into variable A to demonstrate the use of
the GET and PUT functions. For example, to extract element a
23
from matrix A,
in ALG mode, can be performed as follows:
Notice that we achieve the same result by simply typing A(2,3) and
pressing `. In RPN mode, this exercise is performed by entering @@@A@@@ `
3 ` GET, or by using A(2,3) `.
Suppose that we want to place the value ‘π’ into element a
31
of the matrix.
We can use function PUT for that purpose, e.g.,
In RPN mode you can use: J @@@A@@@ {3,1} ` „ì PUT.
Alternatively, in RPN mode you can use: „ì³A(2,3) ` K .
To see the contents of variable A after this operation, use @@@A@@@.
Functions GETI and PUTI
Functions PUTI and GETI are used in UserRPL programs since they keep track
of an index for repeated application of the PUT and GET functions. The
index list in matrices varies by columns first. To illustrate its use, we propose
the following exercise in RPN mode: @@@A@@@ {2,2}` GETI. Screen shots
showing the RPN stack before and after the application of function GETI are
shown below:
Page 10-7
Notice that the screen is prepared for a subsequent application of GETI or
GET, by increasing the column index of the original reference by 1, (i.e., from
{2,2} to {2,3}), while showing the extracted value, namely A(2,2) = 1.9, in
stack level 1.
Now, suppose that you want to insert the value 2 in element {3 1} using PUTI.
Still in RPN mode, try the following keystrokes: ƒ ƒ{3 1} ` 2
` PUTI. The screen shots below show the RPN stack before and after the
application of function PUTI:
In this case, the 2 was replaced in position {3 1}, i.e., now A(3,1) = 2, and
the index list was increased by 1 (by column first), i.e., from {3,1} to {3,2}.
The matrix is in level 2, and the incremented index list is in level 1.
Function SIZE
Function SIZE provides a list showing the number of rows and columns of the
matrix in stack level 1. The following screen shows a couple of applications of
function SIZE in ALG mode:
In RPN mode, these exercises are performed by using @@@A@@@ SIZE, and
[[1,2],[3,4]] ` SIZE .
Page 10-23
In RPN mode, you need to list the matrix in the stack, and the activate function
ROW, i.e., @@@A@@@ ROW. The figure below shows the RPN stack before
and after the application of function ROW.
In this result, the first row occupies the highest stack level after decomposition,
and stack level 1 is occupied by the number of rows of the original matrix.
The matrix does not survive decomposition, i.e., it is no longer available in the
stack.
Function ROW
Function ROW has the opposite effect of the function ROW, i.e., given n
vectors of the same length, and the number n, function ROW builds a
matrix by placing the input vectors as rows of the resulting matrix. Here is an
example in ALG mode. The command used was:
ROW([1,2,3],[4,5,6],[7,8,9],3)
In RPN mode, place the n vectors in stack levels n+1, n, n-1,…,2, and the
number n in stack level 1. With this set up, function ROW places the
vectors as rows in the resulting matrix. The following figure shows the RPN
stack before and after using function ROW.
Page 10-24
Function ROW+
Function ROW+ takes as argument a matrix, a vector with the same length as
the number of rows in the matrix, and an integer number n representing the
location of a row. Function ROW+ inserts the vector in row n of the matrix.
For example, in ALG mode, we’ll insert the second row in matrix A with the
vector [-1,-2,-3], i.e.,
In RPN mode, enter the matrix first, then the vector, and the row number,
before applying function ROW+. The figure below shows the RPN stack
before and after applying function ROW+.
Function ROW-
Function ROW- takes as argument a matrix and an integer number
representing the position of a row in the matrix. The function returns the
original matrix, minus a row, as well as the extracted row shown as a vector.
Here is an example in the ALG mode using the matrix stored in A:
In RPN mode, place the matrix in the stack first, then enter the number
representing a row location before applying function ROW-. The following
figure shows the RPN stack before and after applying function ROW-.
Page 10-25
Function RSWP
Function RSWP (Row SWaP) takes as arguments two indices, say, i and j,
(representing two distinct rows in a matrix), and a matrix, and produces a
new matrix with rows i and j swapped. The following example, in ALG
mode, shows an application of this function. We use the matrix stored in
variable A for the example. This matrix is listed first.
In RPN mode, function CSWP lets you swap the rows of a matrix listed in
stack level 3, whose indices are listed in stack levels 1 and 2. For example,
the following figure shows the RPN stack before and after applying function
CSWP to matrix A in order to swap rows 2 and 3:
As you can see, the columns that originally occupied positions 2 and 3 have
been swapped.
Function RCI
Function RCI stands for multiplying Row I by a Constant value and replace the
resulting row at the same location. The following example, written in ALG
mode, takes the matrix stored in A, and multiplies the constant value 5 into
row number 3, replacing the row with this product.
Page 10-26
This same exercise done in RPN mode is shown in the next figure. The left-
hand side figure shows the setting up of the matrix, the factor and the row
number, in stack levels 3, 2, and 1. The right-hand side figure shows the
resulting matrix after function RCI is activated.
Function RCIJ
Function RCIJ stands for “take Row I and multiplying it by a constant C and
then add that multiplied row to row J, replacing row J with the resulting sum.”
This type of row operation is very common in the process of Gaussian or
Gauss-Jordan elimination (more details on this procedure are presented in a
subsequent Chapter). The arguments of the function are: (1) the matrix, (2)
the constant value, (3) the row to be multiplied by the constant in(2), and (4)
the row to be replaced by the resulting sum as described above. For example,
taking the matrix stored in variable A, we are going to multiply column 3
times 1.5, and add it to column 2. The following example is performed in
ALG mode:
In RPN mode, enter the matrix first, followed by the constant value, then by
the row to be multiplied by the constant value, and finally enter the row that
will be replaced. The following figure shows the RPN stack before and after
applying function RCIJ under the same conditions as in the ALG example
shown above:
Page 11-4
Vector-matrix multiplication, on the other hand, is not defined. This
multiplication can be performed, however, as a special case of matrix
multiplication as defined next.
Matrix multiplication
Matrix multiplication is defined by C
m
×
n
= A
m
×
p
B
p
×
n
, where A = [a
ij
]
m
×
p
, B =
[b
ij
]
p
×
n
, and C = [c
ij
]
m
×
n
. Notice that matrix multiplication is only possible if the
number of columns in the first operand is equal to the number of rows of the
second operand. The general term in the product, c
ij
, is defined as
.,,2,1;,,2,1,
1
njmiforbac
p
k
kjikij
KK ===
=
This is the same as saying that the element in the i-th row and j-th column of
the product, C, results from multiplying term-by-term the i-th row of A with the j-
th column of B, and adding the products together. Matrix multiplication is not
commutative, i.e., in general, AB BA. Furthermore, one of the
multiplications may not even exist. The following screen shots show the results
of multiplications of the matrices that we stored earlier:
The matrix-vector multiplication introduced in the previous section can be
thought of as the product of a matrix m×n with a matrix n×1 (i.e., a column
vector) resulting in an m×1 matrix (i.e., another vector). To verify this
assertion check the examples presented in the previous section. Thus, the
vectors defined in Chapter 9 are basically column vectors for the purpose of
matrix multiplication.
Page 11-5
The product of a vector with a matrix is possible if the vector is a row vector,
i.e., a 1×m matrix, which multiplied with a matrix m×n produces a 1xn matrix
(another row vector). For the calculator to identify a row vector, you must use
double brackets to enter it, e.g.,
Term-by-term multiplication
Term-by-term multiplication of two matrices of the same dimensions is possible
through the use of function HADAMARD. The result is, of course, another
matrix of the same dimensions. This function is available through Function
catalog (‚N), or through the MATRICES/OPERATIONS sub-menu
(„Ø). Applications of function HADAMARD are presented next:
The identity matrix
In Chapter 9 we introduce the identity matrix as the matrix I = [δ
ij
]
n
×
n
, where δ
ij
is the Kronecker’s delta function. Identity matrices can be obtained by using
function IDN described in Chapter 9. The identity matrix has the property that
AI = IA = A. To verify this property we present the following examples
using the matrices stored earlier on:
Page 11-6
The inverse matrix
The inverse of a square matrix A is the matrix A
-1
such that AA
-1
= A
-1
A = I,
where I is the identity matrix of the same dimensions as A. The inverse of a
matrix is obtained in the calculator by using the inverse function, INV (i.e., the
Y key). An example of the inverse of one of the matrices stored earlier is
presented next:
To verify the properties of the inverse matrix, we present the following
multiplications:
Characterizing a matrix (The matrix NORM menu)
The matrix NORM (NORMALIZE) menu is accessed through the keystroke
sequence „´ (system flag 117 set to CHOOSE boxes):
This menu contains the following functions:
Page 11-7
These functions are described next. Because many of these functions use
concepts of matrix theory, such as singular values, rank, etc., we will include
short descriptions of these concepts intermingled with the description of
functions.
Function ABS
Function ABS calculates what is known as the Frobenius norm of a matrix. For
a matrix A = [a
ij
]
m
×
n
, the Frobenius norm of the matrix is defined as
∑∑
==
=
n
i
m
j
ij
F
aA
11
2
If the matrix under consideration in a row vector or a column vector, then the
Frobenius norm , ||A||
F
, is simply the vector’s magnitude. Function ABS is
accessible directly in the keyboard as „Ê.
Try the following exercises in ALG mode (using the matrices stored earlier for
matrix operations):
Function SNRM
Function SNRM calculates the Spectral NoRM of a matrix, which is defined as
the matrix’s largest singular value, also known as the Euclidean norm of the
matrix. For example,
Page 11-8
Singular value decomposition
To understand the operation of Function SNRM, we need to introduce the
concept of matrix decomposition. Basically, matrix decomposition involves
the determination of two or more matrices that, when multiplied in a certain
order (and, perhaps, with some matrix inversion or transposition thrown in),
produce the original matrix. The Singular Value Decomposition (SVD) is such
that a rectangular matrix A
m
×
n
is written as A
m
×
n
= U
m
×
m
S
m
×
n
V
T
n
×
n
,
Where U and V are orthogonal matrices, and S is a diagonal matrix. The
diagonal elements of S are called the singular values of A and are usually
ordered so that s
i
s
i+1
, for i = 1, 2, …, n-1. The columns [u
j
] of U and [v
j
] of
V are the corresponding singular vectors. (Orthogonal matrices are such that
U U
T
= I. A diagonal matrix has non-zero elements only along its main
diagonal).
The rank of a matrix can be determined from its SVD by counting the number
of non-singular values. Examples of SVD will be presented in a subsequent
section.
Functions RNRM and CNRM
Function RNRM returns the Row NoRM of a matrix, while function CNRM
returns the Column NoRM of a matrix. Examples,
Row norm and column norm of a matrix
The row norm of a matrix is calculated by taking the sums of the absolute
values of all elements in each row, and then, selecting the maximum of these
sums. The column norm of a matrix is calculated by taking the sums of the
absolute values of all elements in each column, and then, selecting the
maximum of these sums.
Page 11-9
Function SRAD
Function SRAD determines the Spectral RADius of a matrix, defined as the
largest of the absolute values of its eigenvalues. For example,
Definition of eigenvalues and eigenvectors of a matrix
The eigenvalues of a square matrix result from the matrix equation Ax = λ⋅x.
The values of λ that satisfy the equation are known as the eigenvalues of the
matrix A. The values of x that result from the equation for each value of l are
known as the eigenvectors of the matrix. Further details on calculating
eigenvalues and eigenvectors are presented later in the chapter.
Function COND
Function COND determines the condition number of a matrix. Examples,
Condition number of a matrix
The condition number of a square non-singular matrix is defined as the
product of the matrix norm times the norm of its inverse, i.e.,
cond(A) = ||A||×||A
-1
||. We will choose as the matrix norm, ||A||, the
maximum of its row norm (RNRM) and column norm (CNRM), while the norm
of the inverse, ||A
-1
||, will be selected as the minimum of its row norm and
column norm. Thus, ||A|| = max(RNRM(A),CNRM(A)), and ||A
-1
|| =
min(RNRM(A
-1
), CNRM(A
-1
)).
Page 11-10
The condition number of a singular matrix is infinity. The condition number of
a non-singular matrix is a measure of how close the matrix is to being
singular. The larger the value of the condition number, the closer it is to
singularity. (A singular matrix is one for which the inverse does not exist).
Try the following exercise for matrix condition number on matrix A33. The
condition number is COND(A33) , row norm, and column norm for A33 are
shown to the left. The corresponding numbers for the inverse matrix,
INV(A33), are shown to the right:
Since RNRM(A33) > CNRM(A33), then we take ||A33|| = RNRM(A33) =
21. Also, since CNRM(INV(A33)) < RNRM(INV(A33)), then we take
||INV(A33)|| = CNRM(INV(A33)) = 0.261044... Thus, the condition
number is also calculated as CNRM(A33)*CNRM(INV(A33)) = COND(A33)
= 6.7871485…
Function RANK
Function RANK determines the rank of a square matrix. Try the following
examples:
The rank of a matrix
The rank of a square matrix is the maximum number of linearly independent
rows or columns that the matrix contains. Suppose that you write a square
matrix A
n
×
n
as A = [c
1
c
2
c
n
], where c
i
(i = 1, 2, …, n) are vectors
representing the columns of the matrix A, then, if any of those columns, say c
k
,
can be written as ,
},...,2,1{,
=
njkj
jjk
d cc
Page 11-11
where the values d
j
are constant, we say that c
k
is linearly dependent on the
columns included in the summation. (Notice that the values of j include any
value in the set {1, 2, …, n}, in any combination, as long as jk.) If the
expression shown above cannot be written for any of the column vectors then
we say that all the columns are linearly independent. A similar definition for
the linear independence of rows can be developed by writing the matrix as a
column of row vectors. Thus, if we find that rank(A) = n, then the matrix has
an inverse and it is a non-singular matrix. If, on the other hand, rank(A) < n,
then the matrix is singular and no inverse exist.
For example, try finding the rank for the matrix:
You will find that the rank is 2. That is because the second row [2,4,6] is
equal to the first row [1,2,3] multiplied by 2, thus, row two is linearly
dependent of row 1 and the maximum number of linearly independent rows is
2. You can check that the maximum number of linearly independent columns
is 3. The rank being the maximum number of linearly independent rows or
columns becomes 2 for this case.
Function DET
Function DET calculates the determinant of a square matrix. For example,
Page 11-12
The determinant of a matrix
The determinant of a 2x2 and or a 3x3 matrix are represented by the same
arrangement of elements of the matrices, but enclosed between vertical lines,
i.e.,
333231
232221
131211
2221
1211
,
aaa
aaa
aaa
aa
aa
A 2×2 determinant is calculated by multiplying the elements in its diagonal
and adding those products accompanied by the positive or negative sign as
indicated in the diagram shown below.
The 2×2 determinant is, therefore,
21122211
2221
1211
aaaa
aa
aa
=
A 3×3 determinant is calculated by augmenting the determinant, an operation
that consists on copying the first two columns of the determinant, and placing
them to the right of column 3, as shown in the diagram below. The diagram
also shows the elements to be multiplied with the corresponding sign to attach
to their product, in a similar fashion as done earlier for a 2×2 determinant.
After multiplication the results are added together to obtain the determinant.
Page 11-13
For square matrices of higher order determinants can be calculated by using
smaller order determinant called cofactors. The general idea is to “expand” a
determinant of a n×n matrix (also referred to as a n×n determinant) into a sum
of the cofactors, which are (n-1)×(n-1) determinants, multiplied by the elements
of a single row or column, with alternating positive and negative signs. This
“expansion” is then carried to the next (lower) level, with cofactors of order (n-
2)×(n-2), and so on, until we are left only with a long sum of 2×2
determinants. The 2×2 determinants are then calculated through the method
shown above.
The method of calculating a determinant by cofactor expansion is very
inefficient in the sense that it involves a number of operations that grows very
fast as the size of the determinant increases. A more efficient method, and
the one preferred in numerical applications, is to use a result from Gaussian
elimination. The method of Gaussian elimination is used to solve systems of
linear equations. Details of this method are presented in a later part of this
chapter.
To refer to the determinant of a matrix A, we write det(A). A singular matrix
has a determinant equal to zero.
Function TRACE
Function TRACE calculates the trace of square matrix, defined as the sum of
the elements in its main diagonal, or
=
=
n
i
ii
atr
1
)(A .
Examples:
Page 11-14
Function TRAN
Function TRAN returns the transpose of a real or the conjugate transpose of a
complex matrix. TRAN is equivalent to TRN. The operation of function TRN
was presented in Chapter 10.
Additional matrix operations (The matrix OPER menu)
The matrix OPER (OPERATIONS) is available through the keystroke sequence
„Ø (system flag 117 set to CHOOSE boxes):
The OPERATIONS menu includes the following functions:
Functions ABS, CNRM, COND, DET, RANK, RNRM, SNRM, TRACE, and
TRAN are also found in the MTH/MATRIX/NORM menu (the subject of the
previous section). Function SIZE was presented in Chapter 10. Function
HADAMARD was presented earlier in the context of matrix multiplication.
Functions LSQ , MAD and RSD are related to the solution of systems of linear
equations and will be presented in a subsequent section in this Chapter. In
this section we’ll discuss only functions AXL and AXM
Page 11-15
Function AXL
Function AXL converts an array (matrix) into a list, and vice versa. For
examples,
Note: the latter operation is similar to that of the program CRMR presented in
Chapter 10.
Function AXM
Function AXM converts an array containing integer or fraction elements into its
corresponding decimal, or approximate, form. For example,
Function LCXM
Function LCXM can be used to generate matrices such that the element aij is a
function of i and j. The input to this function consists of two integers, n and m,
representing the number of rows and columns of the matrix to be generated,
and a program that takes i and j as input. The numbers n, m, and the
program occupy stack levels 3, 2, and 1, respectively. Function LCXM is
accessible through the command catalog ‚N.
For example, to generate a 2´3 matrix whose elements are given by a
ij
=
(i+j)
2
, first, store the following program into variable P1 in RPN mode. This is
the way that the RPN stack looks before pressing K.
Page 11-16
The implementation of function LCXM for this case requires you to enter:
2`3`‚@@P1@@ LCXM `
The following figure shows the RPN stack before and after applying function
LCXM:
In ALG mode, this example can be obtained by using:
The program P1 must still have been created and stored in RPN mode.
Solution of linear systems
A system of n linear equations in m variables can be written as
a
11
x
1
+ a
12
x
2
+ a
13
x
3
+ …+ a
1,m-1
x
m-1
+ a
1,m
x
m
= b
1
,
a
21
x
1
+ a
22
x
2
+ a
23
x
3
+ …+ a
2,m-1
x
m-1
+ a
2,m
x
m
= b
2
,
a
31
x
1
+ a
32
x
2
+ a
33
x
3
+ …+ a
3,m-1
x
m-1
+ a
3,m
x
m
= b
3
,
. . . … . . .
. . . … . . .
a
n-1,1
x
1
+ a
n-1,2
x
2
+ a
n-1,3
x
3
+ …+ a
n-1,m-1
x
m-1
+ a
n-1,m
x
m
= b
n-1
,
a
n1
x
1
+ a
n2
x
2
+ a
n3
x
3
+ …+ a
n,m-1
x
m-1
+ a
n,m
x
m
= b
n
.
This system of linear equations can be written as a matrix equation, A
n
×
m
x
m
×
1
= b
n
×
1
, if we define the following matrix and vectors:
mn
nmnn
m
m
aaa
aaa
aaa
A
×
=
L
MOMM
L
L
21
22221
11211
,
1
2
1
×
=
m
m
x
x
x
x
M
,
1
2
1
×
=
n
n
b
b
b
b
M
Page 11-17
Using the numerical solver for linear systems
There are many ways to solve a system of linear equations with the calculator.
One possibility is through the numerical solver ‚Ï. From the numerical
solver screen, shown below (left), select the option 4. Solve lin sys.., and
press @@@OK@@@. The following input form will be provide (right):
To solve the linear system Ax = b, enter the matrix A, in the format [[ a
11
,
a
12,
… ], … [….]] in the A: field. Also, enter the vector b in the B: field.
When the X: field is highlighted, press [SOLVE]. If a solution is available, the
solution vector x will be shown in the X: field. The solution is also copied to
stack level 1. Some examples follow.
A square system
The system of linear equations
2x
1
+ 3x
2
–5x
3
= 13,
x
1
– 3x
2
+ 8x
3
= -13,
2x
1
– 2x
2
+ 4x
3
= -6,
can be written as the matrix equation Ax = b, if
.
6
13
13
,,
422
831
532
3
2
1
=
=
= bxA and
x
x
x
This system has the same number of equations as of unknowns, and will be
referred to as a square system. In general, there should be a unique solution
to the system. The solution will be the point of intersection of the three planes
in the coordinate system (x
1
, x
2
, x
3
) represented by the three equations.
Page 12-1
Chapter 12
Graphics
In this chapter we introduce some of the graphics capabilities of the calculator.
We will present graphics of functions in Cartesian coordinates and polar
coordinates, parametric plots, graphics of conics, bar plots, scatterplots, and
a variety of three-dimensional graphs.
Graphs options in the calculator
To access the list of graphic formats available in the calculator, use the
keystroke sequence „ô(D) Please notice that if you are using the
RPN mode these two keys must be pressed simultaneously
to activate any of
the graph functions. After activating the 2D/3D function, the calculator will
produce
the PLOT SETUP window, which includes the TYPE field as illustrated
below.
Right in front of the TYPE field you will, most likely, see the option
Function
highlighted. This is the default type of graph for the calculator. To see the
list of available graph types, press the soft menu key labeled @CHOOS. This will
produce a drop down menu with the following options (use the up- and down-
arrow keys to see all the options):
Page 12-2
These graph options are described briefly next.
Function: for equations of the form y = f(x) in plane Cartesian coordinates
Polar: for equations of the from r = f(θ) in polar coordinates in the plane
Parametric: for plotting equations of the form x = x(t), y = y(t) in the plane
Diff Eq: for plotting the numerical solution of a linear differential equation
Conic: for plotting conic equations (circles, ellipses, hyperbolas, parabolas)
Truth: for plotting inequalities in the plane
Histogram: for plotting frequency histograms (statistical applications)
Bar: for plotting simple bar charts
Scatter: for plotting scatter plots of discrete data sets (statistical applications)
Slopefield: for plotting traces of the slopes of a function f(x,y) = 0.
Fast3D: for plotting curved surfaces in space
Wireframe: for plotting curved surfaces in space showing wireframe grids
Ps-Contour: for plotting contour plots of surfaces
Y- Slice: for plotting a slicing view of a function f(x,y).
Gridmap: for plotting real and imaginary part traces of a complex function
Pr-Surface: for parametric surfaces given by x = x(u,v), y = y(u,v), z = z(u,v).
Plotting an expression of the form y = f(x)
In this section we present an example of a plot of a function of the form y =
f(x). In order to proceed with the plot, first, purge the variable x, if it is
defined in the current directory (x will be the independent variable in the
calculator's PLOT feature, therefore, you don't want to have it pre-defined).
Create a sub-directory called 'TPLOT' (for test plot), or other meaningful name,
to perform the following exercise.
As an example, let's plot the function,
)
2
exp(
2
1
)(
2
x
xf =
π
First, enter the PLOT SETUP environment by pressing, „ô. Make
sure that the option Function is selected as the TYPE, and that ‘X’ is
selected as the independent variable (INDEP). Press L@@@OK@@@ to
Page 12-40
Press „ô, simultaneously if in RPN mode, to access to the PLOT
SETUP window.
Change
TYPE to Ps-Contour.
Press ˜ and type ‘X^2+Y^2’ @@@OK@@@.
Make sure that ‘X’ is selected as the
Indep: and ‘Y’ as the Depnd:
variables.
Press L@@@OK@@@ to return to normal calculator display.
Press „ò, simultaneously if in RPN mode, to access the PLOT
WINDOW screen.
Keep the default plot window ranges to read:
X-Left:-2, X-Right:2, Y-Near:-1
Y-Far: 1, Step Indep: 10, Depnd: 8
Press @ERASE @DRAW to draw the contour plot. This operation will take some
time, so, be patient. The result is a contour plot of the surface. Notice
that the contour are not necessarily continuous, however, they do provide
a good picture of the level surfaces of the function.
Press @EDITL @LABEL @MENU to see the graph with labels and ranges.
Press LL@)PICT@CANCL to return to the PLOT WINDOW environment.
Press $ , or L@@@OK@@@, to return to normal calculator display.
Try also a Ps-Contour plot for the surface z = f(x,y) = sin x cos y.
Press „ô, simultaneously if in RPN mode, to access the PLOT SETUP
window.
Press ˜ and type ‘SIN(X)*COS(Y)’ @@@OK@@@.
Press @ERASE @DRAW to draw the slope field plot. Press @EDIT L@)LABEL @MENU
to see the plot unencumbered by the menu and with identifying labels.
Page 12-41
Press LL@)PICT to leave the EDIT environment.
Press @CANCL to return to the PLOT WINDOW environment. Then, press
$ , or L@@@OK@@@, to return to normal calculator display.
Y-Slice plots
Y-Slice plots are animated plots of z-vs.-y for different values of x from the
function z = f(x,y). For example, to produce a Y-Slice plot for the surface z =
x
3
-xy
3
, use the following:
Press „ô, simultaneously if in RPN mode, to access to the PLOT
SETUP window.
Change
TYPE to Y-Slice.
Press ˜ and type ‘X^3+X*Y^3’ @@@OK@@@.
Make sure that ‘X’ is selected as the
Indep: and ‘Y’ as the Depnd: variables.
Press L@@@OK@@@ to return to normal calculator display.
Press „ò, simultaneously if in RPN mode, to access the PLOT
WINDOW screen.
Keep the default plot window ranges to read:
X-Left:-1, X-Right:1, Y-Near:-1,
Y-Far: 1, Z-Low:-1, Z-High:1,
Step Indep: 10 Depnd: 8
Press @ERASE @DRAW to draw the three-dimensional surface. You will see the
calculator produce a series of curves on the screen, that will immediately
disappear. When the calculator finishes producing all the y-slice curves,
then it will automatically go into animating the different curves. One of
the curves is shown below.
Press $ to stop the animation. Press @CANCL to return to the PLOT
WINDOW environment.
Press $ , or L@@@OK@@@, to return to normal calculator display.
Try also a Ps-Contour plot for the surface z = f(x,y) = (x+y) sin y.
Page 12-42
Press „ô, simultaneously if in RPN mode, to access the PLOT SETUP
window.
Press ˜ and type ‘(X+Y)*SIN(Y)’ @@@OK@@@.
Press @ERASE @DRAW to produce the Y-Slice animation.
Press $ to stop the animation.
Press @CANCL to return to the PLOT WINDOW environment. Then, press
$ , or L@@@OK@@@, to return to normal calculator display.
Gridmap plots
Gridmap plots produce a grid of orthogonal curves describing a function of a
complex variable of the form w =f(z) = f(x+iy), where z = x+iy is a complex
variable. The functions plotted correspond to the real and imaginary part of
w = Φ(x,y) + iΨ(x,y), i.e., they represent curves Φ(x,y) =constant, and Ψ(x,y)
= constant. For example, to produce a Gridmap plot for the function w =
sin(z), use the following:
Press „ô, simultaneously if in RPN mode, to access to the PLOT
SETUP window.
Change
TYPE to Gridmap.
Press ˜ and type ‘SIN(X+i*Y)’ @@@OK@@@.
Make sure that ‘X’ is selected as the
Indep: and ‘Y’ as the Depnd: variables.
Press L@@@OK@@@ to return to normal calculator display.
Press „ò, simultaneously if in RPN mode, to access the PLOT
WINDOW screen.
Keep the default plot window ranges to read:
X-Left:-1, X-Right:1, Y-Near:-1
Y-Far: 1, XXLeft:-1 XXRight:1, YYNear:-1, yyFar: 1,
Step Indep: 10 Depnd: 8
Press @ERASE @DRAW to draw the gridmap plot. The result is a grid of
functions corresponding to the real and imaginary parts of the complex
function.
Press @EDIT L@LABEL @MENU to see the graph with labels and ranges.
Press LL@)PICT @CANCL to return to the PLOT WINDOW environment.
Page 12-43
Press $ , or L@@@OK@@@, to return to normal calculator display.
Other functions of a complex variable worth trying for Gridmap plots are:
(1) SIN((X,Y)) i.e., F(z) = sin(z) (2)(X,Y)^2 i.e., F(z) = z
2
(3) EXP((X,Y)) i.e., F(z) = e
z
(4) SINH((X,Y)) i.e., F(z) = sinh(z)
(5) TAN((X,Y)) i.e., F(z) = tan(z) (6) ATAN((X,Y)) i.e., F(z) = tan
-1
(z)
(7) (X,Y)^3 i.e., F(z) = z
3
(8) 1/(X,Y) i.e., F(z) = 1/z
(9) (X,Y) i.e., F(z) = z
1/2
Pr-Surface plots
Pr-Surface (parametric surface) plots are used to plot a three-dimensional
surface whose coordinates (x,y,z) are described by x = x(X,Y), y = y(X,Y),
z=z(X,Y), where X and Y are independent parameters.
Note: The equations x = x(X,Y), y = y(X,Y), z=z(X,Y) represent a parametric
description of a surface. X and Y are the independent parameters. Most
textbooks will use (u,v) as the parameters, rather than (X,Y). Thus, the
parametric description of a surface is given as x = x(u,v), y = y(u,v), z=z(u,v).
For example, to produce a Pr-Surface plot for the surface x = x(X,Y) = X sin Y,
y = y(X,Y) = x cos Y, z=z(X,Y)=X, use the following:
Press „ô, simultaneously if in RPN mode, to access to the PLOT
SETUP window.
Change
TYPE to Pr-Surface.
Press ˜ and type ‘{X*SIN(Y), X*COS(Y), X}’ @@@OK@@@.
Make sure that ‘X’ is selected as the
Indep: and ‘Y’ as the Depnd:
variables.
Press L@@@OK@@@ to return to normal calculator display.
Press „ò, simultaneously if in RPN mode, to access the PLOT
WINDOW screen.
Keep the default plot window ranges to read:
X-Left:-1, X-Right:1, Y-Near:-1,
Y-Far: 1, Z-Low: -1, Z-High:1, XE: 0, YE:-3, zE:0,
Step Indep: 10, Depnd: 8
Press @ERASE @DRAW to draw the three-dimensional surface.
Press @EDITL @LABEL @MENU to see the graph with labels and ranges.
Page 12-46
MARK
This command allows the user to set a mark point which can be used for a
number of purposes, such as:
Start of line with the LINE or TLINE command
Corner for a BOX command
Center for a CIRCLE command
Using the MARK command by itself simply leaves an x in the location of the
mark (Press L@MARK to see it in action).
LINE
This command is used to draw a line between two points in the graph. To see
it in action, position the cursor somewhere in the first quadrant, and press
„«@LINE. A MARK is placed over the cursor indicating the origin of the
line. Use the key to move the cursor to the right of the current position,
say about 1 cm to the right, and press @LINE. A line is draw between the first
and the last points.
Notice that the cursor at the end of this line is still active indicating that the
calculator is ready to plot a line starting at that point. Press ˜ to move the
cursor downwards, say about another cm, and press @LINE again. Now you
should have a straight angle traced by a horizontal and a vertical segments.
The cursor is still active. To deactivate it, without moving it at all, press @LINE.
The cursor returns to its normal shape (a cross) and the LINE function is no
longer active.
TLINE
(Toggle LINE) Move the cursor to the second quadrant to see this function in
action. Press @TLINE. A MARK is placed at the start of the toggle line. Move
the cursor with the arrow keys away from this point, and press @TLINE. A line
is drawn from the current cursor position to the reference point selected earlier.
Pixels that are on in the line path will be turned off, and vice versa. To
remove the most recent line traced, press @TLINE again. To deactivate TLINE,
move the cursor to the original point where TLINE was activated, and press
@LINE @LINE.
Page 12-47
BOX
This command is used to draw a box in the graph. Move the cursor to a
clear area of the graph, and press @BOX@. This highlights the cursor. Move the
cursor with the arrow keys to a point away, and in a diagonal direction, from
the current cursor position. Press @BOX@ again. A rectangle is drawn whose
diagonal joins the initial and ending cursor positions. The initial position of
the box is still marked with and x. Moving the cursor to another position and
pressing @BOX@ will generate a new box containing the initial point. To deselect
BOX, move the cursor to the original point where BOX was activated, then
press @LINE @LINE.
CIRCL
This command produces a circle. Mark the center of the circle with a MARK
command, then move the cursor to a point that will be part of the periphery of
the circle, and press @CIRCL. To deactivate CIRCL, return the cursor to the
MARK position and press @LINE.
Try this command by moving the cursor to a clear part of the graph, press
@MARK. Move the cursor to another point, then press @CIRCL. A circle centered
at the MARK, and passing through the last point will be drawn.
LABEL
Pressing @LABEL places the labels in the x- and y-axes of the current plot. This
feature has been used extensively through this chapter.
DEL
This command is used to remove parts of the graph between two MARK
positions. Move the cursor to a point in the graph, and press @MARK. Move
the cursor to a different point, press @MARK again. Then, press @@DEL@. The
section of the graph boxed between the two marks will be deleted.
Page 12-48
ERASE
The function ERASE clears the entire graphics window. This command is
available in the PLOT menu, as well as in the plotting windows accessible
through the soft menu keys.
MENU
Pressing @MENU will remove the soft key menu labels to show the graphic
unencumbered by those labels. To recover the labels, press L.
SUB
REPL
This command places the contents of a graphic object currently in stack level
1 at the cursor location in the graphics window. The upper left corner of the
graphic object being inserted in the graph will be placed at the cursor
position. Thus, if you want a graph from the stack to completely fill the
graphic window, make sure that the cursor is placed at the upper left corner
of the display.
PICT
This command places a copy of the graph currently in the graphics window
on to the stack as a graphic object. The graphic object placed in the stack
can be saved into a variable name for storage or other type of manipulation.
X,Y
This command copies the coordinates of the current cursor position, in user
coordinates, in the stack.
Use this command to extract a subset of a graphics object. The extracted
object is automatically placed in the stack. Select the subset you want to
extract by placing a MARK at a point in the graph, moving the cursor to the
diagonal corner of the rectangle enclosing the graphics subset, and press
@@SUB@. This feature can be used to move parts of a graphics object around the
graph.
Page 12-49
Zooming in and out in the graphics display
Whenever you produce a two-dimensional FUNCTION graphic interactively,
the first soft-menu key, labeled @)ZOOM, lets you access functions that can be
used to zoom in and out in the current graphics display. The ZOOM menu
includes the following functions (press Lto move to the next menu):
We present each of these functions following. You just need to produce a
graph as indicated in Chapter 12, or with one of the programs listed earlier
in this Chapter.
ZFACT, ZIN, ZOUT, and ZLAST
Pressing @)ZFACT produces an input screen that allows you to change the current
X- and Y-Factors. The X- and Y-Factors relate the horizontal and vertical user-
defined unit ranges to their corresponding pixel ranges. Change the H-
Factor to read 8., and press @@@OK@@@, then change the V-Factor to read 2., and
press @@@OK@@. Check off the option
Recenter on cursor, and press @@@OK@@.
Back in the graphics display, press @@ZIN@ . The graphic is re-drawn with the
new vertical and horizontal scale factors, centered at the position where the
cursor was located, while maintaining the original PICT size (i.e., the original
number of pixels in both directions). Using the arrow keys, scroll
horizontally or vertically as far as you can of the zoomed-in graph.
To zoom out, subjected to the H- and V-Factors set with ZFACT, press @)ZOOM
@ZOUT. The resulting graph will provide more detail than the zoomed-in graph.
You can always return to the very last zoom window by using @ZLAST.
Page 12-50
BOXZ
Zooming in and out of a given graph can be performed by using the soft-
menu key BOXZ. With BOXZ you select the rectangular sector (the “box”)
that you want to zoom in into. Move the cursor to one of the corners of the
box (using the arrow keys), and press @)ZOOM @BOXZ. Using the arrow keys once
more, move the cursor to the opposite corner of the desired zoom box. The
cursor will trace the zoom box in the screen. When desired zoom box is
selected, press @ZOOM. The calculator will zoom in the contents of the zoom
box that you selected to fill the entire screen.
If you now press @ZOUT, the calculator will zoom out of the current box using
the H- and V-Factors, which may not recover the graph view from which you
started the zoom box operation.
ZDFLT, ZAUTO
Pressing @ZDFLT re-draws the current plot using the default x- and y-ranges, i.e.,
-6.5 to 6.5 in x, and –3.1 to 3.1 in y. The command @ZAUTO, on the other
hand, creates a zoom window using the current independent variable (x)
range, but adjusting the dependent variable (y) range to fit the curve (as when
you use the function @AUTO in the PLOT WINDOW input form („ò,
simultaneously in RPN mode).
HZIN, HZOUT, VZIN and VZOUT
These functions zoom in and out the graphics screen in the horizontal or
vertical direction according to the current H- and V-Factors.
CNTR
Zooms in with the center of the zoom window in the current cursor location.
The zooming factors used are the current H- and V-Factors.
ZDECI
Zooms the graph so as to round off the limits of the x-interval to a decimal
value.
Page 13-7
Notice that in the expressions where the derivative sign () or function DERIV
was used, the equal sign is preserved in the equation, but not in the cases
where function DERVX was used. In these cases, the equation was re-written
with all its terms moved to the left-hand side of the equal sign. Also, the equal
sign was removed, but it is understood that the resulting expression is equal to
zero.
Implicit derivatives
Implicit derivatives are possible in expressions such as:
Application of derivatives
Derivatives can be used for analyzing the graphs of functions and for
optimizing functions of one variable (i.e., finding maxima and minima).
Some applications of derivatives are shown next.
Analyzing graphics of functions
In Chapter 11 we presented some functions that are available in the graphics
screen for analyzing graphics of functions of the form y = f(x). These
functions include (X,Y) and TRACE for determining points on the graph, as
well as functions in the ZOOM and FCN menu. The functions in the ZOOM
menu allow the user to zoom in into a graph to analyze it in more detail.
These functions are described in detail in Chapter 12. Within the functions of
the FCN menu, we can use the functions SLOPE, EXTR, F’, and TANL to
determine the slope of a tangent to the graph, the extrema (minima and
Page 13-8
maxima) of the function, to plot the derivative, and to find the equation of the
tangent line.
Try the following example for the function y = tan(x).
Press „ô, simultaneously in RPN mode, to access to the PLOT
SETUP window.
Change TYPE to FUNCTION, if needed, by using [@CHOOS].
Press ˜ and type in the equation ‘TAN(X)’.
Make sure the independent variable is set to ‘X’.
Press L @@@OK@@@ to return to normal calculator display.
Press „ò, simultaneously, to access the PLOT window
Change H-VIEW range to –2 to 2, and V-VIEW range to –5 to 5.
Press @ERASE @DRAW to plot the function in polar coordinates.
The resulting plot looks as follows:
Notice that there are vertical lines that represent asymptotes. These
are not part of the graph, but show points where TAN(X) goes to ±
at certain values of X.
Press @TRACE @(X,Y)@, and move the cursor to the point X: 1.08E0, Y:
1.86E0. Next, press L@)@FCN@ @SLOPE. The result is Slope:
4.45010547846.
Press LL@TANL. This operation produces the equation of the
tangent line, and plots its graph in the same figure. The result is
shown in the figure below:
Page 13-9
Press L @PICT @CANCL $ to return to normal calculator display.
Notice that the slope and tangent line that you requested are listed in
the stack.
Function DOMAIN
Function DOMAIN, available through the command catalog (‚N),
provides the domain of definition of a function as a list of numbers and
specifications. For example,
indicates that between – and 0, the function LN(X) is not defined (?), while
from 0 to +, the function is defined (+). On the other hand,
indicates that the function is not defined between – and -1, nor between 1
and +. The domain of this function is, therefore, -1<X<1.
Function TABVAL
This function is accessed through the command catalog or through the GRAPH
sub-menu in the CALC menu. Function TABVAL takes as arguments a function
of the CAS variable, f(X), and a list of two numbers representing a domain of
interest for the function f(X). Function TABVAL returns the input values plus the
range of the function corresponding to the domain used as input. For
example,
Page 13-10
This result indicates that the range of the function
1
1
)(
2
+
=
X
Xf
corresponding to the domain D = { -1,5 } is R =
26
26
,
2
2
.
Function SIGNTAB
Function SIGNTAB, available through the command catalog (‚N),
provides information on the sign of a function through its domain. For
example, for the TAN(X) function,
SIGNTAB indicates that TAN(X) is negative between –π/2 and 0, and positive
between 0 and π /2. For this case, SIGNTAB does not provide information
(?) in the intervals between – and -π /2, nor between +π /2 and . Thus,
SIGNTAB, for this case, provides information only on the main domain of
TAN(X), namely -π /2 < X < +π /2.
A second example of function SIGNTAB is shown below:
For this case, the function is negative for X<-1 and positive for X> -1.
Function TABVAR
This function is accessed through the command catalog or through the GRAPH
sub-menu in the CALC menu. It uses as input the function f(VX), where VX is
the default CAS variable. The function returns the following, in RPN mode:
Level 3: the function f(VX)
Page 13-11
Two lists, the first one indicates the variation of the function (i.e.,
where it increases or decreases) in terms of the independent variable
VX, the second one indicates the variation of the function in terms of
the dependent variable.
A graphic object showing how the variation table was computed.
Example: Analyze the function Y = X
3
-4X
2
-11X+30, using the function
TABVAR. Use the following keystrokes, in RPN mode:
'X^3-4*X^2-11*X+30' `‚N ~t(select TABVAR) @@OK@@
This is what the calculator shows in stack level 1:
This is a graphic object. To be able to the result in its entirety, press ˜.
The variation table of the function is shown as follows:
Press $ to recover normal calculator display. Press ƒ to drop this last
result from the stack.
Two lists, corresponding to the top and bottom rows of the graphics matrix
shown earlier, now occupy level 1. These lists may be useful for
programming purposes. Press ƒ to drop this last result from the stack.
Page 13-22
If you enter the integral with the CAS set to Exact mode, you will be asked to
change to Approx mode, however, the limits of the integral will be shown in a
different format as shown here:
These limits represent 1×1_mm and 0×1_mm, which is the same as 1_mm and
0_mm, as before. Just be aware of the different formats in the output.
Some notes in the use of units in the limits of integrations:
1 – The units of the lower limit of integration will be the ones used in the final
result, as illustrated in the two examples below:
2 - Upper limit units must be consistent with lower limit units. Otherwise, the
calculator simply returns the unevaluated integral. For example,
3 – The integrand may have units too. For example:
4 – If both the limits of integration and the integrand have units, the resulting
units are combined according to the rules of integration. For example,
Page 13-23
Infinite series
An infinite series has the form
n
n
axnh )()(
1,0
=
. The infinite series typically
starts with indices n = 0 or n = 1. Each term in the series has a coefficient
h(n) that depends on the index n.
Taylor and Maclaurin’s series
A function f(x) can be expanded into an infinite series around a point x=x
0
by
using a Taylor’s series, namely,
=
=
0
)(
)(
!
)(
)(
n
n
o
o
n
xx
n
xf
xf
,
where f
(n)
(x) represents the n-th derivative of f(x) with respect to x, f
(0)
(x) = f(x).
If the value x
0
is zero, the series is referred to as a Maclaurin’s series, i.e.,
=
=
0
)(
!
)0(
)(
n
n
n
x
n
f
xf
Taylor polynomial and reminder
In practice, we cannot evaluate all terms in an infinite series, instead, we
approximate the series by a polynomial of order k, P
k
(x), and estimate the
order of a residual, R
k
(x), such that
Page 13-24
+==
+=
1
)(
0
)(
)(
!
)(
)(
!
)(
)(
kn
n
o
o
n
k
n
n
o
o
n
xx
n
xf
xx
n
xf
xf
,
i.e.,
).()()( xRxPxf
kk
+=
The polynomial P
k
(x) is referred to as Taylor’s polynomial. The order of the
residual is estimated in terms of a small quantity h = x-x
0
, i.e., evaluating the
polynomial at a value of x very close to x
0
. The residual if given by
1
)1(
!
)(
)(
+
+
=
k
k
k
h
k
f
xR
ξ
,
where ξ is a number near x = x
0
. Since ξ is typically unknown, instead of an
estimate of the residual, we provide an estimate of the order of the residual in
reference to h, i.e., we say that R
k
(x) has an error of order h
n+1
, or R O(h
k+1
).
If h is a small number, say, h<<1, then h
k+1
will be typically very small, i.e.,
h
k+1
<<h
k
<< …<< h << 1. Thus, for x close to x
0
, the larger the number of
elements in the Taylor polynomial, the smaller the order of the residual.
Functions TAYLR, TAYLR0, and SERIES
Functions TAYLR, TAYLR0, and SERIES are used to generate Taylor
polynomials, as well as Taylor series with residuals. These functions are
available in the CALC/LIMITS&SERIES menu described earlier in this Chapter.
Function TAYLOR0 performs a Maclaurin series expansion, i.e., about X = 0,
of an expression in the default independent variable, VX (typically ‘X’). The
expansion uses a 4-th order relative power, i.e., the difference between the
highest and lowest power in the expansion is 4. For example,
Page 13-25
Function TAYLR produces a Taylor series expansion of a function of any
variable x about a point x = a for the order k specified by the user. Thus, the
function has the format TAYLR(f(x-a),x,k). For example,
Function SERIES produces
a Taylor polynomial using as arguments the function
f(x) to be expanded, a variable name alone (for Maclaurin’s series) or an
expression of the form ‘variable = value’ indicating the point of expansion of
a Taylor series, and the order of the series to be produced. Function SERIES
returns two output items a list with four items, and an expression for h = x - a,
if the second argument in the function call is ‘x=a’, i.e., an expression for the
increment h. The list returned as the first output object includes the following
items:
1 - Bi-directional limit of the function at point of expansion, i.e.,
)(lim xf
ax
2 - An equivalent value of the function near x = a
3 - Expression for the Taylor polynomial
4 - Order of the residual or remainder
Because of the relatively large amount of output, this function is easier to
handle in RPN mode. For example:
Drop the contents of stack level 1 by pressing ƒ, and then enter µ, to
decompose the list. The results are as follows:
Page 13-26
In the right-hand side figure above, we are using the line editor to see the
series expansion in detail.
Page 14-1
Chapter 14
Multi-variate Calculus Applications
Multi-variate calculus refers to functions of two or more variables. In this
Chapter we discuss the basic concepts of multi-variate calculus including
partial derivatives and multiple integrals.
Multi-variate functions
A function of two or more variables can be defined in the calculator by using
the DEFINE function („à). To illustrate the concept of partial derivative,
we will define a couple of multi-variate functions, f(x,y) = x cos(y), and g(x,y,z)
= (x
2
+y
2
)
1/2
sin(z), as follows:
We can evaluate the functions as we would evaluate any other calculator
function, e.g.,
Graphics of two-dimensional functions are possible using Fast3D, Wireframe,
Ps-Contour, Y-Slice, Gridmap, and Pr-Surface plots as described in Chapter
12.
Partial derivatives
Consider the function of two variables z = f(x,y), the partial derivative of the
function with respect to x is defined by the limit
Page 14-2
h
yxfyhxf
x
f
h
),(),(
lim
0
+
=
.
Similarly,
k
yxfkyxf
y
f
k
),(),(
lim
0
+
=
.
We will use the multi-variate functions defined earlier to calculate partial
derivatives using these definitions. Here are the derivatives of f(x,y) with
respect to x and y, respectively:
Notice that the definition of partial derivative with respect to x, for example,
requires that we keep y fixed while taking the limit as h0. This suggest a
way to quickly calculate partial derivatives of multi-variate functions: use the
rules of ordinary derivatives with respect to the variable of interest, while
considering all other variables as constant. Thus, for example,
() ()
)sin()cos(),cos()cos( yxyx
y
yyx
x
=
=
,
which are the same results as found with the limits calculated earlier.
Consider another example,
()
xyyxyyx
x
202
22
=+=+
In this calculation we treat y as a constant and take derivatives of the
expression with respect to x.
Similarly, you can use the derivative functions in the calculator, e.g., DERVX,
DERIV, (described in detail in Chapter 13) to calculate partial derivatives.
Recall that function DERVX uses the CAS default variable VX (typically, ‘X’),
Page 14-3
therefore, with DERVX you can only calculate derivatives with respect to X.
Some examples of first-order partial derivatives are shown next:
Higher-order derivatives
The following second-order derivatives can be defined
,,
2
2
2
2
=
=
y
f
y
y
f
x
f
x
x
f
=
=
y
f
xyx
f
x
f
yxy
f
22
,
The last two expressions represent cross-derivatives, the partial derivatives
signs in the denominator shows the order of derivation. In the left-hand side,
the derivation is taking first with respect to x and then with respect to y, and in
the right-hand side, the opposite is true. It is important to indicate that, if a
function is continuous and differentiable, then
yx
f
xy
f
=
22
.
Page 14-4
Third-, fourth-, and higher order derivatives are defined in a similar manner.
To calculate higher order derivatives in the calculator, simply repeat the
derivative function as many times as needed. Some examples are shown
below:
The chain rule for partial derivatives
Consider the function z = f(x,y), such that x = x(t), y = y(t). The function z
actually represents a composite function of t if we write it as z = f[x(t),y(t)].
The chain rule for the derivative dz/dt for this case is written as
v
y
y
z
v
x
x
z
v
z
+
=
To see the expression that the calculator produces for this version of the chain
rule use:
The result is given by d1y(t)d2z(x(t),y(t))+d1x(t)d1z(x(y),y(t)). The term d1y(t)
is to be interpreted as “the derivative of y(t) with respect to the 1
st
independent
variable, i.e., t”, or d1y(t) = dy/dt. Similarly, d1x(t) = dx/dt. On the other
hand, d1z(x(t),y(t)) means “the first derivative of z(x,y) with respect to the first
independent variable, i.e., x”, or d1z(x(t),y(t)) = z/x. Similarly,
d2z(x(t),y(t)) = z/y. Thus, the expression above is to be interpreted as:
dz/dt = (dy/dt)
(z/y) + (dx/dt)(z/x).
Page 14-5
Total differential of a function z = z(x,y)
From the last equation, if we multiply by dt, we get the total differential of the
function z = z(x,y), i.e., dz = (z/x)dx + (z/y)dy.
A different version of the chain rule applies to the case in which z = f(x,y), x
= x(u,v), y = y(u,v), so that z = f[x(u,v), y(u,v)]. The following formulas
represent the chain rule for this situation:
v
y
y
z
v
x
x
z
v
z
u
y
y
z
u
x
x
z
u
z
+
=
+
=
,
Determining extrema in functions of two variables
In order for the function z = f(x,y) to have an extreme point (extrema) at (x
o
,y
o
),
its derivatives f/x and f/y must vanish at that point. These are necessary
conditions. The sufficient conditions for the function to have an extreme at
point (x
o
,y
o
) are f/x = 0, f/y = 0, and = (
2
f/x
2
) (
2
f/y
2
)-[
2
f/xy]
2
> 0. The point (x
o
,y
o
) is a relative maximum if
2
f/x
2
< 0, or a relative
minimum if
2
f/x
2
> 0. The value is referred to as the discriminant.
If = (
2
f/x
2
) (
2
f/y
2
)-[
2
f/xy]
2
< 0, we have a condition known as a
saddle point, where the function would attain a maximum in x if we were to
hold y constant, while, at the same time, attaining a minimum if we were to
hold x constant, or vice versa.
Example 1 – Determine the extreme points (if any) of the function f(X,Y) = X
3
-
3X-Y
2
+5. First, we define the function f(X,Y), and its derivatives fX(X,Y) =
f/X, fY(X,Y) = f/Y. Then, we solve the equations fX(X,Y) = 0 and fY(X,Y)
= 0, simultaneously:
Page 16-4
The CALC/DIFF menu
The DIFFERENTIAL EQNS.. sub-menu within the CALC („Ö) menu
provides functions for the solution of differential equations. The menu is listed
below with system flag 117 set to CHOOSE boxes:
These functions are briefly described next. They will be described in more
detail in later parts of this Chapter.
DESOLVE: Differential Equation SOLVEr, provides a solution if possible
ILAP: Inverse LAPlace transform, L
-1
[F(s)] = f(t)
LAP: LAPlace transform, L[f(t)]=F(s)
LDEC: solves Linear Differential Equations with Constant coefficients, including
systems of differential equations with constant coefficients
Solution to linear and non-linear equations
An equation in which the dependent variable and all its pertinent derivatives
are of the first degree is referred to as a linear differential equation
.
Otherwise, the equation is said to be non-linear
. Examples of linear
differential equations are: d
2
x/dt
2
+ β⋅(dx/dt) + ω
o
x = A sin ω
f
t, and C/t
+ u(C/x) = D(
2
C/x
2
).
An equation whose right-hand side (not involving the function or its derivatives)
is equal to zero is called a homogeneous equation. Otherwise, it is called
non-homogeneous. The solution to the homogeneous equation is known as a
general solution. A particular solution is one that satisfies the non-
homogeneous equation.
Page 16-5
Function LDEC
The calculator provides function LDEC (Linear Differential Equation Command)
to find the general solution to a linear ODE of any order with constant
coefficients, whether it is homogeneous or not. This function requires you to
provide two pieces of input:
the right-hand side of the ODE
the characteristic equation of the ODE
Both of these inputs must be given in terms of the default independent variable
for the calculator’s CAS (typically ‘X’). The output from the function is the
general solution of the ODE. The function LDEC is available through in the
CALC/DIFF menu. The examples are shown in the RPN mode, however,
translating them to the ALG mode is straightforward.
Example 1
– To solve the homogeneous ODE: d
3
y/dx
3
-4(d
2
y/dx
2
)-
11(dy/dx)+30y = 0, enter: 0 ` 'X^3-4*X^2-11*X+30' `
LDEC. The solution is:
where cC0, cC1, and cC2 are constants of integration. While this result
seems very complicated, it can be simplified if we take
K1 = (10*cC0-(7+cC1-cC2))/40, K2 = -(6*cC0-(cC1+cC2))/24,
and
K3 = (15*cC0+(2*cC1-cC2))/15.
Then, the solution is
y = K
1
e
–3x
+ K
2
e
5x
+ K
3
e
2x
.
The reason why the result provided by LDEC shows such complicated
combination of constants is because, internally, to produce the solution, LDEC
utilizes Laplace transforms (to be presented later in this chapter), which
transform the solution of an ODE into an algebraic solution. The combination
Page 16-6
of constants result from factoring out the exponential terms after the Laplace
transform solution is obtained.
Example 2
– Using the function LDEC, solve the non-homogeneous ODE:
d
3
y/dx
3
-4(d
2
y/dx
2
)-11(dy/dx)+30y = x
2
.
Enter:
'X^2' ` 'X^3-4*X^2-11*X+30' ` LDEC
The solution, shown partially here in the Equation Writer, is:
Replacing the combination of constants accompanying the exponential terms
with simpler values, the expression can be simplified to y = K
1
e
–3x
+ K
2
e
5x
+
K
3
e
2x
+ (450x
2
+330x+241)/13500.
We recognize the first three terms as the general solution of the homogeneous
equation (see Example 1, above). If y
h
represents the solution to the
homogeneous equation, i.e., y
h
= K
1
e
–3x
+ K
2
e
5x
+ K
3
e
2x
. You can prove
that the remaining terms in the solution shown above, i.e., y
p
=
(450x
2
+330x+241)/13500, constitute a particular solution of the ODE.
Note: This result is general for all non-homogeneous linear ODEs, i.e., given
the solution of the homogeneous equation, y
h
(x), the solution of the
corresponding non-homogeneous equation, y(x), can be written as
y(x) = y
h
(x) + y
p
(x),
where y
p
(x) is a particular solution to the ODE.
To verify that y
p
= (450x
2
+330x+241)/13500, is indeed a particular
solution of the ODE, use the following:
'd1d1d1Y(X)-4*d1d1Y(X)-11*d1Y(X)+30*Y(X) = X^2'`
'Y(X)=(450*X^2+330*X+241)/13500' `
SUBST EVAL
Page 16-7
Allow the calculator about ten seconds to produce the result: ‘X^2 = X^2’.
Example 3
- Solving a system of linear differential equations with constant
coefficients.
Consider the system of linear differential equations:
x
1
’(t) + 2x
2
’(t) = 0,
2x
1
’(t) + x
2
’(t) = 0.
In algebraic form, this is written as: Ax’(t) = 0, where
=
12
21
A
. The
system can be solved by using function LDEC with arguments [0,0] and matrix
A, as shown in the following screen using ALG mode:
The solution is given as a vector containing the functions [x
1
(t), x
2
(t)]. Pressing
˜ will trigger the Matrix Writer allowing the user to see the two
components of the vector. To see all the details of each component, press the
@EDIT! soft menu key. Verify that the components are:
Function DESOLVE
The calculator provides function DESOLVE (Differential Equation SOLVEr) to
solve certain types of differential equations. The function requires as input the
differential equation and the unknown function, and returns the solution to the
equation if available. You can also provide a vector containing the
differential equation and the initial conditions, instead of only a differential
equation, as input to DESOLVE. The function DESOLVE is available in the
CALC/DIFF menu. Examples of DESOLVE applications are shown below
using RPN mode.
Example 1
– Solve the first-order ODE:
Page 16-12
function LAP you get back a function of X, which is the Laplace transform of
f(X).
Example 2
– Determine the Laplace transform of f(t) = e
2t
sin(t). Use:
‘EXP(2*X)*SIN(X)’ ` LAP The calculator returns the result: 1/(SQ(X-2)+1).
Press µ to obtain, 1/(X
2
-4X+5).
When you translate this result in paper you would write
54
1
}sin{)(
2
2
+
==
ss
tesF
t
L
Example 3
– Determine the inverse Laplace transform of F(s) = sin(s). Use:
‘SIN(X)’ ` ILAP. The calculator takes a few seconds to return the result:
‘ILAP(SIN(X))’, meaning that there is no closed-form expression f(t), such that f(t)
= L
-1
{sin(s)}.
Example 4
– Determine the inverse Laplace transform of F(s) = 1/s
3
. Use:
‘1/X^3’ ` ILAP µ. The calculator returns the result: ‘X^2/2’, which is
interpreted as L
-1
{1/s
3
} = t
2
/2.
Example 5
– Determine the Laplace transform of the function f(t) = cos (at+b).
Use: ‘COS(a*X+b)’ ` LAP . The calculator returns the result:
Press µ to obtain –(a sin(b) – X cos(b))/(X
2
+a
2
). The transform is
interpreted as follows: L {cos(at+b)} = (scos b – asin b)/(s
2
+a
2
).
Laplace transform theorems
To help you determine the Laplace transform of functions you can use a
number of theorems, some of which are listed below. A few examples of the
theorem applications are also included.
Differentiation theorem for the first derivative
. Let f
o
be the initial condition
for f(t), i.e., f(0) = f
o
, then
Page 16-13
L{df/dt} = sF(s) - f
o
.
Example 1 – The velocity of a moving particle v(t) is defined as v(t) = dr/dt,
where r = r(t) is the position of the particle. Let r
o
= r(0), and R(s) =L{r(t)}, then,
the transform of the velocity can be written as V(s) = L{v(t)}=L{dr/dt}= sR(s)-r
o
.
Differentiation theorem for the second derivative
. Let f
o
= f(0), and
(df/dt)
o
= df/dt|
t=0
, then L{d
2
f/dt
2
} = s
2
F(s) - sf
o
– (df/dt)
o
.
Example 2 – As a follow up to Example 1, the acceleration a(t) is defined as
a(t) = d
2
r/dt
2
. If the initial velocity is v
o
= v(0) = dr/dt|
t=0
, then the Laplace
transform of the acceleration can be written as:
A(s) = L{a(t)} = L{d
2
r/dt
2
}= s
2
R(s) - sr
o
– v
o
.
Differentiation theorem for the n-th derivative
.
Let f
(k)
o
= d
k
f/dx
k
|
t = 0
, and f
o
= f(0), then
L{d
n
f/dt
n
} = s
n
F(s) – s
n-1
f
o
…– sf
(n-2)
o
– f
(n-1)
o
.
Linearity theorem
. L{af(t)+bg(t)} = aL{f(t)} + bL{g(t)}.
Differentiation theorem for the image function
. Let F(s) = L{f(t)}, then
d
n
F/ds
n
= L{(-t)
n
f(t)}.
Example 3 – Let f(t) = e
–at
, using the calculator with ‘EXP(-a*X)’ ` LAP, you
get ‘1/(X+a)’, or F(s) = 1/(s+a). The third derivative of this expression can
be calculated by using:
‘X’ ` ‚¿ ‘X’ `‚¿ ‘X’ ` ‚¿ µ
The result is
‘-6/(X^4+4*a*X^3+6*a^2*X^2+4*a^3*X+a^4)’, or
d
3
F/ds
3
= -6/(s
4
+4as
3
+6a
2
s
2
+4a
3
s+a
4
).
Page 16-14
Now, use ‘(-X)^3*EXP(-a*X)’ ` LAP µ. The result is exactly the same.
Integration theorem
. Let F(s) = L{f(t)}, then
Convolution theorem
. Let F(s) = L{f(t)} and G(s) = L{g(t)}, then
{
}
==
)})(*{()()(
0
tgfduutguf
t
LL
)()()}({)}({ sGsFtgtf = LL
Example 4
– Using the convolution theorem, find the Laplace transform of
(f*g)(t), if f(t) = sin(t), and g(t) = exp(t). To find F(s) = L{f(t)}, and G(s) = L{g(t)},
use: ‘SIN(X)’ ` LAP µ. Result, ‘1/(X^2+1)’, i.e., F(s) = 1/(s
2
+1).
Also, ‘EXP(X)’ ` LAP. Result, ‘1/(X-1)’, i.e., G(s) = 1/(s-1). Thus, L{(f*g)(t)}
= F(s)G(s) = 1/(s
2
+1)1/(s-1) = 1/((s-1)(s
2
+1)) = 1/(s
3
-s
2
+s-1).
Shift theorem for a shift to the right
. Let F(s) = L{f(t)}, then
L{f(t-a)}=e
–as
L{f(t)} = e
–as
F(s).
Shift theorem for a shift to the left
. Let F(s) = L{f(t)}, and a >0, then
Similarity theorem
. Let F(s) = L{f(t)}, and a>0, then L{f(at)} =
(1/a)F(s/a).
Damping theorem
. Let F(s) = L{f(t)}, then L{e
–bt
f(t)} = F(s+b).
Division theorem
. Let F(s) = L{f(t)}, then
{
}
).(
1
)(
0
sF
s
duuf
t
=
L
.)()()}({
0
=+
a
stas
dtetfsFeatfL
Page 16-15
Laplace transform of a periodic function of period T
:
Limit theorem for the initial value
: Let F(s) = L{f(t)}, then
Limit theorem for the final value
: Let F(s) = L{f(t)}, then
Dirac’s delta function and Heaviside’s step function
In the analysis of control systems it is customary to utilize a type of functions
that represent certain physical occurrences such as the sudden activation of a
switch (Heaviside’s step function, H(t)) or a sudden, instantaneous, peak in an
input to the system (Dirac’s delta function, δ(t)). These belong to a class of
functions known as generalized or symbolic functions [e.g., see Friedman, B.,
1956, Principles and Techniques of Applied Mathematics, Dover Publications
Inc., New York (1990 reprint) ].
The formal definition of Dirac’s delta function
, δ(x), is δ(x) = 0, for x 0, and
Also, if f(x) is a continuous function, then
= ).()()(
00
xfdxxxxf δ
=
s
duuF
t
tf
.)(
)(
L
=
T
st
sT
dtetf
e
tf
0
.)(
1
1
)}({L
)].([lim)(lim
0
0
sFstff
st
==
)].([lim)(lim
0
sFstff
st
==
= .0.1)( dxxδ
Page 16-16
An interpretation for the integral above, paraphrased from Friedman (1990),
is that the δ-function “picks out” the value of the function f(x) at x = x
0
. Dirac’s
delta function is typically represented by an upward arrow at the point x = x0,
indicating that the function has a non-zero value only at that particular value
of x
0
.
Heaviside’s step function
, H(x), is defined as
<
>
=
0,0
0,1
)(
x
x
xH
Also, for a continuous function f(x),
Dirac’s delta function and Heaviside’s step function are related by dH/dx =
δ(x). The two functions are illustrated in the figure below.
You can prove that L{H(t)} = 1/s,
from which it follows that L{U
o
H(t)} = U
o
/s,
where U
o
is a constant. Also, L
-1
{1/s}=H(t),
and L
-1
{ U
o
/s}= U
o
H(t).
Also, using the shift theorem for a shift to the right, L{f(t-a)}=e
–as
L{f(t)} =
e
–as
F(s), we can write L{H(t-k)}=e
–ks
L{H(t)} = e
–ks
(1/s) = (1/s)e
–ks
.
∫∫
=
0
.)()()(
0
x
dxxfdxxxHxf
Page 16-17
Another important result, known as the second shift theorem for a shift to the
right, is that L
-1
{e
–as
F(s)}=f(t-a)H(t-a), with F(s) = L{f(t)}.
In the calculator the Heaviside step function H(t) is simply referred to as ‘1’.
To check the transform in the calculator use: 1 ` LAP. The result is ‘1/X’,
i.e., L{1} = 1/s. Similarly, ‘U0’ ` LAP , produces the result ‘U0/X’, i.e.,
L{U
0
} = U
0
/s.
You can obtain Dirac’s delta function in the calculator by using: 1` ILAP
The result is Delta(X).
This result is simply symbolic, i.e., you cannot find a numerical value for, say
Delta(5)’.
This result can be defined the Laplace transform for Dirac’s delta function,
because from L
-1
{1.0}= δ(t), it follows that L{δ(t)} = 1.0
Also, using the shift theorem for a shift to the right, L{f(t-a)}=e
–as
L{f(t)} =
e
–as
F(s), we can write L{δ(t-k)}=e
–ks
L{δ(t)} = e
–ks
1.0 = e
–ks
.
Applications of Laplace transform in the solution of linear ODEs
At the beginning of the section on Laplace transforms we indicated that you
could use these transforms to convert a linear ODE in the time domain into an
algebraic equation in the image domain. The resulting equation is then
solved for a function F(s) through algebraic methods, and the solution to the
ODE is found by using the inverse Laplace transform on F(s).
The theorems on derivatives of a function, i.e.,
L{df/dt} = sF(s) - f
o
,
L{d
2
f/dt
2
} = s
2
F(s) - sf
o
– (df/dt)
o
,
and, in general,
L{d
n
f/dt
n
} = s
n
F(s) – s
n-1
f
o
…– sf
(n-2)
o
– f
(n-1)
o
,
are particularly useful in transforming an ODE into an algebraic equation.
Page 16-18
Example 1 – To solve the first order equation,
dh/dt + kh(t) = ae
–t
,
by using Laplace transforms, we can write:
L{dh/dt + kh(t)} = L{ae
–t
},
L{dh/dt} + kL{h(t)} = aL{e
–t
}.
Note: ‘EXP(-X)’ ` LAP , produces ‘1/(X+1)’, i.e., L{e
–t
}=1/(s+1).
With H(s) = L{h(t)}, and L{dh/dt} = sH(s) - h
o
, where h
o
= h(0), the transformed
equation is sH(s)-h
o
+kH(s) = a/(s+1).
Use the calculator to solve for H(s), by writing:
‘X*H-h0+k*H=a/(X+1)’ ` ‘H’ ISOL
The result is ‘H=((X+1)*h0+a)/(X^2+(k+1)*X+k)’.
To find the solution to the ODE, h(t), we need to use the inverse Laplace
transform, as follows:
OBJ ƒ ƒµ Isolates right-hand side of last expression
ILAP Obtains the inverse Laplace transform
The result is
. Replacing X with t in this expression
and simplifying, results in h(t) = a/(k-1)e
-t
+((k-1)h
o
-a)/(k-1)e
-kt
.
Check what the solution to the ODE would be if you use the function LDEC:
‘a*EXP(-X)’ ` ‘X+k’ ` LDEC µ
Page 16-19
The result is:
, i.e.,
h(t) = a/(k-1)e
-t
+((k-1)cC
o
-a)/(k-1)e
-kt
.
Thus, cC0 in the results from LDEC represents the initial condition h(0).
Note: When using the function LDEC to solve a linear ODE of order n in f(X),
the result will be given in terms of n constants cC0, cC1, cC2, …, cC(n-1),
representing the initial conditions f(0), f’(0), f”(0), …, f
(n-1)
(0).
Example 2
– Use Laplace transforms to solve the second-order linear equation,
d
2
y/dt
2
+2y = sin 3t.
Using Laplace transforms, we can write:
L{d
2
y/dt
2
+2y} = L{sin 3t},
L{d
2
y/dt
2
} + 2L{y(t)} = L{sin 3t}.
Note: ‘SIN(3*X)’ ` LAP µ produces ‘3/(X^2+9)’, i.e.,
L{sin 3t}=3/(s
2
+9).
With Y(s) = L{y(t)}, and L{d
2
y/dt
2
} = s
2
Y(s) - sy
o
– y
1
, where y
o
= h(0) and y
1
=
h’(0), the transformed equation is
s
2
Y(s) – sy
o
– y
1
+ 2Y(s) = 3/(s
2
+9).
Use the calculator to solve for Y(s), by writing:
‘X^2*Y-X*y0-y1+2*Y=3/(X^2+9)’ ` ‘Y’ ISOL
The result is
‘Y=((X^2+9)*y1+(y0*X^3+9*y0*X+3))/(X^4+11*X^2+18)’.
Page 16-20
To find the solution to the ODE, y(t), we need to use the inverse Laplace
transform, as follows:
OBJ ƒ ƒ Isolates right-hand side of last expression
ILAPµ Obtains the inverse Laplace transform
The result is
i.e.,
y(t) = -(1/7) sin 3x + y
o
cos 2x + (2 (7y
1
+3)/14) sin 2x.
Check what the solution to the ODE would be if you use the function LDEC:
‘SIN(3*X)’ ` ‘X^2+2’ ` LDEC µ
The result is:
i.e., the same as before with cC0 = y0 and cC1 = y1.
Note: Using the two examples shown here, we can confirm what we
indicated earlier, i.e., that function ILAP uses Laplace transforms and inverse
transforms to solve linear ODEs given the right-hand side of the equation and
the characteristic equation of the corresponding homogeneous ODE.
Example 3
– Consider the equation
d
2
y/dt
2
+y = δ(t-3),
where δ(t) is Dirac’s delta function.
Using Laplace transforms, we can write:
L{d
2
y/dt
2
+y} = L{δ(t-3)},
Page 16-37
Press `` to copy this result to the screen. Then, reactivate the Equation
Writer to calculate the second integral defining the coefficient c
n
, namely,
Once again, replacing e
in
π
= (-1)
n
, and using e
2in
π
= 1, we get:
Press `` to copy this second result to the screen. Now, add ANS(1)
and ANS(2) to get the full expression for c
n
:
Pressing ˜ will place this result in the Equation Writer, where we can
simplify (@SIMP@) it to read:
Page 16-38
Once again, replacing e
in
π
= (-1)
n
, results in
This result is used to define the function c(n) as follows:
DEFINE(‘c(n) = - (((-1)^n-1)/(n^2*π^2*(-1)^n)’)
i.e.,
Next, we define function F(X,k,c0) to calculate the Fourier series (if you
completed example 1, you already have this function stored):
DEFINE(‘F(X,k,c0) = c0+Σ(n=1,k,c(n)*EXP(2*i*π*n*X/T)+
c(-n)*EXP(-(2*i*π*n*X/T))’),
To compare the original function and the Fourier series we can produce the
simultaneous plot of both functions. The details are similar to those of
example 1, except that here we use a horizontal range of 0 to 2 and a
vertical range from 0 to 1, and adjust the equations to plot as shown here:
Page 16-39
The resulting graph is shown below for k = 5 (the number of elements in the
series is 2k+1, i.e., 11, in this case):
From the plot it is very difficult to distinguish the original function from the
Fourier series approximation. Using k = 2, or 5 terms in the series, shows not
so good a fitting:
The Fourier series can be used to generate a periodic triangular wave (or saw
tooth wave) by changing the horizontal axis range, for example, from –2 to 4.
The graph shown below uses k = 5:
Fourier series for a square wave
A square wave can be generated by using the function
<<
<<
<<
=
43,0
31,1
10,0
)(
xif
xif
xif
xg
Page 16-40
In this case, the period T, is 4. Make sure to change the value of variable
@@@T@@@ to 4 (use: 4 K @@@T@@ `). Function g(X) can be defined in the
calculator by using
DEFINE(‘g(X) = IFTE((X>1) AND (X<3),1,0)’)
The function plotted as follows (horizontal range: 0 to 4, vertical range:0 to
1.2 ):
Using a procedure similar to that of the triangular shape in example 2, above,
you can find that
5.01
1
3
1
0
=
=
dX
T
c ,
and
We can simplify this expression by using e
in
π
/2
= i
n
and e
3in
π
/2
= (-i)
n
to get:
Page 16-41
The simplification of the right-hand side of c(n), above, is easier done on
paper (i.e., by hand). Then, retype the expression for c(n) as shown in the
figure to the left above, to define function c(n). The Fourier series is calculated
with F(X,k,c0), as in examples 1 and 2 above, with c0 = 0.5. For example,
for k = 5, i.e., with 11 components, the approximation is shown below:
A better approximation is obtained by using k = 10, i.e.,
For k = 20, the fitting is even better, but it takes longer to produce the graph:
Page 16-42
Fourier series applications in differential equations
Suppose we want to use the periodic square wave defined in the previous
example as the excitation of an undamped spring-mass system whose
homogeneous equation is: d
2
y/dX
2
+ 0.25y = 0.
We can generate the excitation force by obtaining an approximation with k
=10 out of the Fourier series by using SW(X) = F(X,10,0.5):
We can use this result as the first input to the function LDEC when used to
obtain a solution to the system d
2
y/dX
2
+ 0.25y = SW(X), where SW(X)
stands for Square Wave function of X. The second input item will be the
characteristic equation corresponding to the homogeneous ODE shown above,
i.e., ‘X^2+0.25’ .
With these two inputs, function LDEC produces the following result (decimal
format changed to Fix with 3 decimals).
Pressing ˜ allows you to see the entire expression in the Equation writer.
Exploring the equation in the Equation Writer reveals the existence of two
constants of integration, cC0 and cC1. These values would be calculated
using initial conditions. Suppose that we use the values cC0 = 0.5 and cC1
= -0.5, we can replace those values in the solution above by using function
SUBST (see Chapter 5). For this case, use SUBST(ANS(1),cC0=0.5) `,
followed by SUBST(ANS(1),cC1=-0.5) `. Back into normal calculator
display we can use:
Page 16-43
The latter result can be defined as a function, FW(X), as follows (cutting and
pasting the last result into the command):
We can now plot the real part of this function. Change the decimal mode to
Standard, and use the following:
The solution is shown below:
Fourier Transforms
Before presenting the concept of Fourier transforms, we’ll discuss the general
definition of an integral transform. In general, an integral transform
is a
transformation that relates a function f(t) to a new function F(s) by an
Page 16-44
integration of the form
=
b
a
dttftssF .)(),()( κ
The function κ(s,t) is
known as the kernel of the transformation
.
The use of an integral transform allows us to resolve a function into a given
spectrum of components
. To understand the concept of a spectrum, consider
the Fourier series
()
,sincos)(
1
0
=
++=
n
nnnn
xbxaatf ωω
representing a periodic function with a period T. This Fourier series can be
re-written as
=
++=
1
0
),cos()(
n
nnn
xAaxf φϖ where
,tan,
122
=+=
n
n
nnnn
a
b
baA φ
for n =1,2, …
The amplitudes A
n
will be referred to as the spectrum of the function and will
be a measure of the magnitude of the component of f(x) with frequency f
n
=
n/T. The basic or fundamental frequency in the Fourier series is f
0
= 1/T, thus,
all other frequencies are multiples of this basic frequency, i.e., f
n
= nf
0
. Also,
we can define an angular frequency, ω
n
= 2nπ/T = 2π⋅f
n
= 2π⋅ nf
0
= n⋅ω
0
,
where ω
0
is the basic or fundamental angular frequency of the Fourier series.
Using the angular frequency notation, the Fourier series expansion is written
as
=
++=
1
0
).cos()(
n
nnn
xAaxf φω
()
=
++=
1
0
sincos
n
nnnn
xbxaa ωω
Page 16-57
With these definitions, a general solution of Bessel’s equation for all values of
ν is given by y(x) = K
1
J
ν
(x)+K
2
Y
ν
(x).
In some instances, it is necessary to provide complex solutions to Bessel’s
equations by defining the Bessel functions of the third kind of order ν
as
H
n
(1)
(x) = J
ν
(x)+iY
ν
(x), and H
n
(2)
(x) = J
ν
(x)iY
ν
(x),
These functions are also known as the first and second Hankel functions of
order ν.
In some applications you may also have to utilize the so-called modified
Bessel functions of the first kind of order ν defined as I
ν
(x)= i
-
ν
J
ν
(ix), where i is
the unit imaginary number. These functions are solutions to the differential
equation x
2
(d
2
y/dx
2
) + x (dy/dx)- (x
2
+ν
2
) y = 0.
The modified Bessel functions of the second kind,
K
ν
(x) = (π/2)[I
-
ν
(x)I
ν
(x)]/sin νπ,
are also solutions of this ODE.
You can implement functions representing Bessel’s functions in the calculator
in a similar manner to that used to define Bessel’s functions of the first kind,
but keeping in mind that the infinite series in the calculator need to be
translated into a finite series.
Chebyshev or Tchebycheff polynomials
The functions T
n
(x) = cos(ncos
-1
x), and U
n
(x) = sin[(n+1) cos
-1
x]/(1-x
2
)
1/2
, n
= 0, 1, … are called Chebyshev or Tchebycheff polynomials of the first and
second kind, respectively. The polynomials Tn(x) are solutions of the
differential equation (1-x
2
)(d
2
y/dx
2
) x (dy/dx) + n
2
y = 0.
In the calculator the function TCHEBYCHEFF generates the Chebyshev or
Tchebycheff polynomial of the first kind of order n, given a value of n > 0. If
the integer n is negative (n < 0), the function TCHEBYCHEFF generates a
Tchebycheff polynomial of the second kind of order n whose definition is
Page 16-58
U
n
(x) = sin(narccos(x))/sin(arccos(x)).
You can access the function TCHEBYCHEFF through the command catalog
(‚N).
The first four Chebyshev or Tchebycheff polynomials of the first and second
kind are obtained as follows:
0 TCHEBYCHEFF, result: 1, i.e., T
0
(x) = 1.0.
-0 TCHEBYCHEFF, result: 1, i.e., U
0
(x) = 1.0.
1 TCHEBYCHEFF, result: ‘X’, i.e., T
1
(x) = x.
-1 TCHEBYCHEFF, result: 1, i.e., U
1
(x) =1.0.
2 TCHEBYCHEFF, result: ‘2*X^2-1, i.e., T
2
(x) =2x
2
-1.
-2 TCHEBYCHEFF, result: ‘2*X’, i.e., U
2
(x) =2x.
3 TCHEBYCHEFF, result: ‘4*X^3-3*X’, i.e., T
3
(x) = 4x
3
-3x.
-3 TCHEBYCHEFF, result: ‘4*X^2-1’, i.e., U
3
(x) = 4x
2
-1.
Laguerre’s equation
Laguerre’s equation is the second-order, linear ODE of the form x(d
2
y/dx
2
)
+(1x) (dy/dx) + ny = 0. Laguerre polynomials, defined as
,...2,1,
)(
!
)(,1)(
0
=
==
n
dx
exd
n
e
xLxL
n
xnnx
n
,
are solutions to Laguerre’s equation. Laguerre’s polynomials can also be
calculated with:
.
!
)1(
)(
0
m
n
m
m
n
x
m
n
m
xL
=
=
The term
),(
)!(!
!
mnC
mnm
n
m
n
=
=
n
n
x
n
x
nn
xn
++
+=
!
)1(
.......
4
)1(
1
2
Page 16-59
is the m-th coefficient of the binomial expansion (x+y)
n
. It also represents the
number of combinations of n elements taken m at a time. This function is
available in the calculator as function COMB in the MTH/PROB menu (see
also Chapter 17).
You can define the following function to calculate Laguerre’s polynomials:
When done typing it in the equation writer press use function DEFINE to
create the function L(x,n) into variable @@@L@@@ .
To generate the first four Laguerre polynomials use, L(x,0), L(x,1), L(x,2), L(x,3).
The results are:
L
0
(x) = .
L
1
(x) = 1-x.
L
2
(x) = 1-2x+ 0.5x
2
L
3
(x) = 1-3x+1.5x
2
-0.16666…x
3
.
Weber’s equation and Hermite polynomials
Weber’s equation is defined as d
2
y/dx
2
+(n+1/2-x
2
/4)y = 0, for n = 0, 1,
2, … A particular solution of this equation is given by the function , y(x) =
exp(-x
2
/4)H
*
(x/2), where the function H
*
(x) is the Hermite polynomial:
,..2,1),()1()(*,1*
22
0
===
ne
dx
d
exHH
x
n
n
xn
n
In the calculator, the function HERMITE, available through the menu
ARITHMETIC/POLYNOMIAL. Function HERMITE takes as argument an integer
number, n, and returns the Hermite polynomial of n-th degree. For example,
the first four Hermite polynomials are obtained by using:
Page 16-60
0 HERMITE, result: 1, i.e., H
0
*
= 1.
1 HERMITE, result: ’2*X’, i.e., H
1
*
= 2x.
2 HERMITE, result: ’4*X^2-2’, i.e., H
2
*
= 4x
2
-2.
3 HERMITE, result: ’8*X^3-12*X’, i.e., H
3
*
= 8x
3
-12x.
Numerical and graphical solutions to ODEs
Differential equations that cannot be solved analytically can be solved
numerically or graphically as illustrated below.
Numerical solution of first-order ODE
Through the use of the numerical solver (‚Ï), you can access an input
form that lets you solve first-order, linear ordinary differential equations. The
use of this feature is presented using the following example. The method used
in the solution is a fourth-order Runge-Kutta algorithm preprogrammed in the
calculator.
Example 1
-- Suppose we want to solve the differential equation, dv/dt = -1.5
v
1/2
, with v = 4 at t = 0. We are asked to find v for t = 2.
First, create the expression defining the derivative and store it into variable
EQ. The figure to the left shows the ALG mode command, while the right-
hand side figure shows the RPN stack before pressing K.
Then, enter the NUMERICAL SOLVER environment and select the differential
equation solver: ‚Ϙ @@@OK@@@ . Enter the following parameters:
Page 16-61
To solve, press: @SOLVE (wait) @EDIT@. The result is 0.2499 0.25. Press @@@OK@@@.
Solution presented as a table of values
Suppose we wanted to produce a table of values of v, for t = 0.00, 0.25, …,
2.00, we will proceed as follows:
First, prepare a table to write down your results. Write down in your table the
step-by-step results:
t v
0.00 0.00
0.25
… …
2.00
Next, within the SOLVE environment, change the final value of the
independent variable to 0.25, use :
.25 @@OK@@ ™™ @SOLVE (wait) @EDIT
(Solves for v at t = 0.25, v = 3.285 …. )
@@OK@@ INIT+ . 5 @@OK@@ ™™@SOLVE (wait) @EDIT
(Changes initial value of t to 0.25, and final value of t to 0.5, solve for v(0.5)
= 2.640…)
@@OK@@ @INIT+.75 @@OK@@ ™™@SOLVE (wait) @EDIT
(Changes initial value of t to 0.5, and final value of t to 0.75, solve for v(0.75)
= 2.066…)
@@OK@@ @INIT+1 @@OK@@ ™ ™ @SOLVE (wait) @EDIT
(Changes initial value of t to 0.75, and final value of t to 1, solve for v(1) =
1.562…)
Repeat for t = 1.25, 1.50, 1.75, 2.00. Press @@OK@@ after viewing the last result
in @EDIT. To return to normal calculator display, press $ or L@@OK@@. The
different solutions will be shown in the stack, with the latest result in level 1.
The final results look as follows (rounded to the third decimal):
Page 16-62
0.00 4.000
0.25 3.285
0.50 2.640
0.75 2.066
1.00 1.562
1.25 1.129
1.50 0.766
1.75 0.473
2.00 0.250
Graphical solution of first-order ODE
When we can not obtain a closed-form solution for the integral, we can
always plot the integral by selecting Diff Eq in the TYPE field of the PLOT
environment as follows: suppose that we want to plot the position x(t) for a
velocity function v(t) = exp(-t
2
), with x = 0 at t = 0. We know there is no
closed-form expression for the integral, however, we know that the definition
of v(t) is dx/dt = exp(-t
2
).
The calculator allows for the plotting of the solution of differential equations of
the form Y'(T) = F(T,Y). For our case, we let Y = x and T = t, therefore, F(T,Y)
= f(t, x) = exp(-t
2
). Let's plot the solution, x(t), for t = 0 to 5, by using the
following keystroke sequence:
„ô (simultaneously, if in RPN mode) to enter PLOT environment
Highlight the field in front of TYPE, using the —˜keys. Then, press
@CHOOS, and highlight Diff Eq, using the —˜keys. Press @@OK@@.
Change field F: to ‘EXP(- t^2)’
Make sure that the following parameters are set to: H-VAR: 0, V-VAR:
1
Change the independent variable to t .
Accept changes to PLOT SETUP: L @@OK@@
„ò (simultaneously, if in RPN mode). To enter PLOT WINDOW
environment
Change the horizontal and vertical view window to the following settings:
H-VIEW: -1 5; V-VIEW: -1 1.5
t v
Page 16-63
Also, use the following values for the remaining parameters: Init: 0, Final:
5, Step: Default, Tol: 0.0001, Init-Soln: 0
To plot the graph use: @ERASE @DRAW
When you observe the graph being plotted, you'll notice that the graph is not
very smooth. That is because the plotter is using a time step that may be a bit
large for a smooth graph. To refine the graph and make it smoother, use a
step of 0.1. Press @CANCL and change the Step : value to 0.1, then use
@ERASE @DRAW once more to repeat the graph. The plot will take longer to be
completed, but the shape is definitely smoother than before. Try the following:
@EDIT L @LABEL @MENU to see axes labels and range.
Notice that the labels for the axes are shown as 0 (horizontal, for t) and 1
(vertical, for x). These are the definitions for the axes as given in the PLOT
SETUP window („ô) i.e., H-VAR: 0, and V-VAR: 1. To see the graphical
solution in detail use the following:
LL@)PICT To recover menu and return to PICT environment.
@(X,Y)@ To determine coordinates of any point on the graph.
Use the š™ keys to move the cursor around the plot area. At the bottom
of the screen you will see the coordinates of the cursor as (X,Y), i.e., the
calculator uses X and Y as the default names for the horizontal and vertical
axes, respectively. Press L@CANCL to recover the menu and return to the
PLOT WINDOW environment. Finally, press $ to return to normal display.
Page 16-64
Numerical solution of second-order ODE
Integration of second-order ODEs can be accomplished by defining the
solution as a vector. As an example, suppose that a spring-mass system is
subject to a damping force proportional to its speed, so that the resulting
differential equation is:
dt
dx
x
d
t
xd
= 962.175.18
2
2
or, x" = - 18.75 x - 1.962 x',
subject to the initial conditions, v = x' = 6, x = 0, at t = 0. We want to find x,
x' at t = 2.
Re-write the ODE as: w' = Aw, where w = [ x x' ]
T
, and A is the 2 x 2
matrix shown below.
=
'962.175.18
10
'
'
x
x
x
x
The initial conditions are now written as w = [0 6]
T
, for t = 0. (Note: The
symbol [ ]
T
means the transpose of the vector or matrix).
To solve this problem, first, create and store the matrix A, e.g., in ALG mode:
Then, activate the numerical differential equation solver by using: ‚ Ï
˜ @@@OK@@@ . To solve the differential equation with starting time t = 0 and
final time t = 2, the input form for the differential equation solver should look
as follows (notice that the Init: value for the Soln: is a vector [0, 6]):
Page 16-65
Press @SOLVE (wait) @EDIT to solve for w(t=2). The solution reads [.16716… -
.6271…], i.e., x(2) = 0.16716, and x'(2) = v(2) = -0.6271. Press @CANCL to
return to SOLVE environment.
Solution presented as a table of values
In the previous example we were interested only in finding the values of the
position and velocity at a given time t. If we wanted to produce a table of
values of x and x', for t = 0.00, 0.25, …, 2.00, we will proceed as follows:
First, prepare a table to write down your results:
Next, within the SOLVE environment, change the final value of the
independent variable to 0.25, use:
.25 @@OK@@ ™™ @SOLVE (wait) @EDIT
(Solves for w at t = 0.25, w = [0.968 1.368]. )
@@OK@@ INIT+ . 5 @@OK@@ ™™@SOLVE (wait) @EDIT
(Changes initial value of t to 0.25, and final value of t to 0.5, solve again for
w(0.5) = [0.748 -2.616])
@@OK@@ @INIT+ .75 @@OK@@™™@SOLVE (wait) @EDIT
(Changes initial value of t to 0.5, and final value of t to 0.75, solve again for
w(0.75) = [0.0147 -2.859])
@@OK@@ @INIT+ 1 @@OK@@ ™ ™ @SOLVE (wait) @EDIT
(Changes initial value of t to 0.75, and final value of t to 1, solve again for
w(1) = [-0.469 -0.607])
t x x'
0.00 0.00 6.00
0.25
… … …
2.00
Page 16-66
Repeat for t = 1.25, 1.50, 1.75, 2.00. Press @@OK@@ after viewing the last result
in @EDIT. To return to normal calculator display, press $ or L@@OK@@. The
different solutions will be shown in the stack, with the latest result in level 1.
The final results look as follows:
t x x' t x x'
0.00 0.000 6.000 1.25 -0.354 1.281
0.25 0.968 1.368 1.50 0.141 1.362
0.50 0.748 -2.616 1.75 0.227 0.268
0.75 -0.015 -2.859 2.00 0.167 -0.627
1.00 -0.469 -0.607
Graphical solution for a second-order ODE
Start by activating the differential equation numerical solver, ‚ Ï
˜ @@@OK@@@ . The SOLVE screen should look like this:
Notice that the initial condition for the solution (Soln: w Init:[0., …) includes
the vector [0, 6]. Press L @@OK@@.
Next, press „ô (simultaneously, if in RPN mode) to enter the PLOT
environment. Highlight the field in front of TYPE, using the —˜keys.
Then, press @CHOOS, and highlight Diff Eq, using the —˜keys. Press
@@OK@@. Modify the rest of the PLOT SETUP screen to look like this:
Page 16-67
Notice that the option V-Var: is set to 1, indicating that the first element in the
vector solution, namely, x’, is to be plotted against the independent variable t.
Accept changes to PLOT SETUP by pressing L @@OK@@.
Press „ò (simultaneously, if in RPN mode) to enter the PLOT WINDOW
environment. Modify this input form to look like this:
To plot the x’ vs. t graph use: @ERASE @DRAW . The plot of x’ vs. t looks like this:
To plot the second curve we need to use the PLOT SETUP input form once,
more. To reach this form from the graph above use: @CANCL
L @@OK@@ „ô(simultaneously, if in RPN mode) . Change the value of the
V-Var: field to 2, and press @DRAW (do not press @ERASE or you would loose the
graph produced above). Use: @EDIT L @LABEL @MENU to see axes labels and
range. Notice that the x axis label is the number 0 (indicating the
independent variable), while the y-axis label is the number 2 (indicating the
second variable, i.e., the last variable plotted). The combined graph looks
like this:
Press LL @PICT @CANCL $ to return to normal calculator display.
Page 16-68
Numerical solution for stiff first-order ODE
Consider the ODE: dy/dt = -100y+100t+101, subject to the initial condition
y(0) = 1.
Exact solution
This equation can be written as
dy/dt + 100 y = 100 t + 101, and solved
using an integrating factor, IF(t) = exp(100t), as follows (RPN mode, with CAS
set to Exact mode):
‘(100*t+101)*EXP(100*t)’ ` ‘t’ ` RISCH
The result is ‘(t+1)*EXP(100*t)’.
Next, we add an integration constant, by using: ‘C’ `+
Then, we divide by FI(x), by using: ‘EXP(100*t)’ `/.
The result is: ‘
((t+1)*EXP(100*t)+C)/EXP(100*t)’, i.e., y(t) = 1+ t +Ce
100t
. Use
of the initial condition y(0) = 1, results in 1 = 1 + 0 + Ce
0
, or C = 0, the
particular solution being y(t) = 1+t.
Numerical solution
If we attempt a direct numerical solution of the original equation dy/dt = -
100y+100t+101, using the calculator’s own numerical solver, we find that
the calculator takes longer to produce a solution that in the previous first-order
example. To check this out, set your differential equation numerical solver
(‚ Ϙ @@@OK@@@) to:
Page 16-69
Here we are trying to obtain the value of y(2) given y(0) = 1. With the
Soln:
Final
field highlighted, press @SOLVE. You can check that a solution takes
about 6 seconds, while in the previous first-order example the solution was
almost instantaneous. Press $ to cancel the calculation.
This is an example of a stiff ordinary differential equation
. A stiff ODE is
one whose general solution contains components that vary at widely different
rates under the same increment in the independent variable. In this particular
case, the general solution, y(t) = 1+ t +Ce
100t
, contains the components ‘t’
and ‘Ce
100t
’, which vary at very different rates, except for the cases C=0 or
C0 (e.g., for C = 1, t =0.1, Ce
100t
=22026).
The calculator’s ODE numerical solver allows for the solution of stiff ODEs by
selecting the option
_Stiff in the SOLVE Y’(T) = F(T,Y) screen. With this
option selected you need to provide the values of f/y and f/t. For the
case under consideration f/y = -100 and f/t = 100.
Enter those values in the corresponding fields of the
SOLVE Y’(T) = F(T,Y)
screen:
When done, move the cursor to the
Soln:Final field and press @SOLVE. This
time, the solution in produced in about 1 second. Press @EDIT to see the
solution: 2.9999999999, i.e., 3.0.
Note: The option
Stiff is also available for graphical solutions of differential
equations.
Numerical solution to ODEs with the SOLVE/DIFF menu
The SOLVE soft menu is activated by using 74 MENU in RPN mode. This
menu is presented in detail in Chapter 6. One of the sub-menus, DIFF,
Page 16-70
contains functions for the numerical solution of ordinary differential equations
for use in programming. These functions are described next using RPN mode
and system flag 117 set to SOFT menus.
The functions provided by the SOLVE/DIFF menu are the following:
Function RKF
This function is used to compute the solution to an initial value problem for a
first-order differential equation using the Runge-Kutta-Fehlbert 4
th
-5
th
order
solution scheme. Suppose that the differential equation to be solved is given
by dy/dx = f(x,y), with y = 0 at x = 0, and that you will allow a convergence
criteria ε for the solution. You can also specify an increment in the
independent variable, x, to be used by the function. To run this function you
will prepare your stack as follows:
3: {‘x’, ‘y’, ‘f(x,y)’}
2: { ε x }
1: x
final
The value in the first stack level is the value of the independent variable where
you want to find your solution, i.e., you want to find, y
final
= f
s
(x
final
), where f
s
(x)
represents the solution to the differential equation. The second stack level may
contain only the value of ε, and the step x will be taken as a small default
value. After running function @@RKF@@, the stack will show the lines:
2: {‘x’, ‘y’, ‘f(x,y)’}
1: ε
The value of the solution, y
final
, will be available in variable @@@y@@@. This
function is appropriate for programming since it leaves the differential
equation specifications and the tolerance in the stack ready for a new solution.
Notice that the solution uses the initial conditions x = 0 at y = 0. If, your
actual initial solutions are x = x
init
at y = y
init
, you can always add these values
to the solution provided by RKF, keeping in mind the following relationship:
Page 16-71
The following screens show the RPN stack before and after applying function
RKF for the differential equation dy/dx = x+y, ε = 0.001, x = 0.1.
After applying function RKF, variable @@@y@@@ contains the value 4.3880...
Function RRK
This function is similar to the RKF function, except that RRK (Rosenbrock and
Runge-Kutta methods) requires as the list in stack level 3 for input not only the
names of the independent and dependent variables and the function defining
the differential equation, but also the expressions for the first and second
derivatives of the expression. Thus, the input stack for this function will look as
follows:
3: {‘x’, ‘y’, ‘f(x,y)’ ‘f/x’ ‘f/y’ }
2: { ε x }
1: x
final
The value in the first stack level is the value of the independent variable where
you want to find your solution, i.e., you want to find, y
final
= f
s
(x
final
), where f
s
(x)
represents the solution to the differential equation. The second stack level may
contain only the value of ε, and the step x will be taken as a small default
value. After running function @@RKF@@, the stack will show the lines:
2: {‘x’, ‘y’, ‘f(x,y)’ ‘f/x’ ‘f/vy’ }
1: { ε x }
The value of the solution, y
final
, will be available in variable @@@y@@@.
This function can be used to solve so-called “stiff” differential equations.
RKF solution Actual solution
x y x y
0 0 x
init
y
init
x
final
y
final
x
init
+ x
final
y
init
+ y
final
Page 17-13
)
2
(
1
22
)1()
2
()
2
(
)()
2
(
)(
DN
NN
D
FNDN
F
D
NDN
xf
νν
νν
ν
ννν
ν
ννν
+
ΓΓ
+
Γ
=
The calculator provides for values of the upper-tail (cumulative) distribution
function for the F distribution, function UTPF, given the parameters νN and νD,
and the value of F. The definition of this function is, therefore,
===
t
t
FPdFFfdFFfFDNUTPF )(1)(1)(),,( νν
For example, to calculate UTPF(10,5, 2.5) = 0.161834…
Different probability calculations for the F distribution can be defined using the
function UTPF, as follows:
P(F<a) = 1 - UTPF(νN, νD,a)
P(a<F<b) = P(F<b) - P(F<a) = 1 -UTPF(νN, νD,b)- (1 - UTPF(νN, νD,a))
= UTPF(νN, νD,a) - UTPF(νN, νD,b)
P(F>c) = UTPF(νN, νD,a)
Example: Given νN = 10, νD = 5, find:
P(F<2) = 1-UTPF(10,5,2) = 0.7700…
P(5<F<10) = UTPF(10,5,5) – UTPF(10,5,10) = 3.4693..E-2
P(F>5) = UTPF(10,5,5) = 4.4808..E-2
Inverse cumulative distribution functions
For a continuous random variable X with cumulative density function (cdf) F(x)
= P(X<x) = p, to calculate the inverse cumulative distribution function we need
to find the value of x, such that x = F
-1
(p). This value is relatively simple to
find for the cases of the exponential and Weibull distributions
since their cdf’s
have a closed form expression:
Page 17-14
Exponential, F(x) = 1 - exp(-x/β)
Weibull, F(x) = 1-exp(-αx
β
)
(Before continuing, make sure to purge variables α and β). To find the inverse
cdf’s for these two distributions we need just solve for x from these expressions,
i.e.,
Exponential: Weibull:
For the Gamma and Beta distributions
the expressions to solve will be more
complicated due to the presence of integrals, i.e.,
Gamma,
Γ
=
x
dz
z
zp
0
1
)exp(
)(
1
β
αβ
α
α
Beta,
ΓΓ
+Γ
=
x
dzzzp
0
11
)1(
)()(
)(
βα
βα
β
α
A numerical solution with the numerical solver will not be feasible because of
the integral sign involved in the expression. However, a graphical solution is
possible. Details on how to find the root of a graph are presented in Chapter
12. To ensure numerical results, change the CAS setting to Approx. The
function to plot for the Gamma distribution is
Y(X) = (0,X,z^(α-1)*exp(-z/β)/(β^α*GAMMA(α)),z)-p
For the Beta distribution, the function to plot is
Y(X) =
(0,X,z^(α-1)*(1-z)^(β-1)*GAMMA(α+β)/(GAMMA(α)*GAMMA(β)),z)-p
To produce the plot, it is necessary to store values of α, β, and p, before
attempting the plot. For example, for α = 2, β = 3, and p = 0.3, the plot of
Y(X) for the Gamma distribution is shown below. (Please notice that, because
Page 17-15
of the complicated nature of function Y(X), it will take some time before the
graph is produced. Be patient.)
There are two roots of this function found by using function @ROOT within the
plot environment. Because of the integral in the equation, the root is
approximated and will not be shown in the plot screen. You will only get the
message Constant? Shown in the screen. However, if you press ` at this
point, the approximate root will be listed in the display. Two roots are shown
in the right-hand figure below.
Alternatively, you can use function @TRACE @(X,Y)@ to estimate the roots by
tracing the curve near its intercepts with the x-axis. Two estimates are shown
below:
These estimates suggest solutions x = -1.9 and x = 3.3. You can verify these
“solutions” by evaluating function Y1(X) for X = -1.9 and X = 3.3, i.e.,
Page 17-16
For the normal, Student’s t, Chi-square (χ
2
), and F distributions, which are
represented by functions UTPN, UTPT, UPTC, and UTPF in the calculator, the
inverse cuff can be found by solving one of the following equations:
Normal, p = 1 – UTPN(µ,σ2,x)
Student’s t, p = 1 – UTPT(ν,t)
Chi-square, p = 1 – UTPC(ν,x)
F distribution: p = 1 – UTPF(νN,νD,F)
Notice that the second parameter in the UTPN function is σ2, not σ
2
,
representing the variance of the distribution. Also, the symbol ν (the lower-
case Greek letter no) is not available in the calculator. You can use, for
example, γ (gamma) instead of ν. The letter γ is available thought the
character set (‚±).
For example, to obtain the value of x for a normal distribution, with µ = 10,
σ
2
= 2, with p = 0.25, store the equation ‘p=1-UTPN(µ,σ2,x)’ into
variable EQ (figure in the left-hand side below). Then, launch the numerical
solver, to get the input form in the right-hand side figure:
The next step is to enter the values of µ, σ
2
, and p, and solve for x:
This input form can be used to solve for any of the four variables involved in
the equation for the normal distribution.
Page 17-17
To facilitate solution of equations involving functions UTPN, UTPT, UTPC, and
UTPF, you may want to create a sub-directory UTPEQ were you will store the
equations listed above:
Thus, at this point, you will have the four equations available for solution. You
needs just load one of the equations into the EQ field in the numerical solver
and proceed with solving for one of the variables. Examples of the UTPT,
UTPC, and UPTF are shown below:
Notice that in all the examples shown above, we are working with p = P(X<x).
In many statistical inference problems we will actually try to find the value of x
for which P(X>x) = α. Furthermore, for the normal distribution, we most likely
will be working with the standard normal
distribution in which µ =0, and σ
2
=
1. The standard normal variable is typically referred to as Z, so that the
problem to solve will be P(Z>z) = α. For these cases of statistical inference
problems, we could store the following equations:
Page 17-18
With these four equations, whenever you launch the numerical solver you
have the following choices:
Examples of solution of equations EQNA, EQTA, EQCA, and EQFA are
shown below:
Page 18-1
Chapter 18
Statistical Applications
In this Chapter we introduce statistical applications of the calculator including
statistics of a sample, frequency distribution of data, simple regression,
confidence intervals, and hypothesis testing.
Pre-programmed statistical features
The calculator provides pre-programmed statistical features that are accessible
through the keystroke combination ‚Ù (same key as the number 5
key). The statistical applications available in the calculator are:
These applications are presented in detail in this Chapter. First, however, we
demonstrate how to enter data for statistical analysis.
Entering data
For the analysis of a single set of data (a sample) we can use applications
number 1, 2, and 4 from the list above. All of these applications require that
the data be available as columns of the matrix ΣDAT. This can be
accomplished by entering the data in columns using the matrix writer,
„².
This operation may become tedious for large number of data points. Instead,
you may want to enter the data as a list (see Chapter 8) and convert the list
into a column vector by using program CRMC (see Chapter 10).
Alternatively, you can enter the following program to convert a list into a
column vector. Type the program in RPN mode:
« OBJ 1 2 LIST ARRY »
Page 18-2
Store the program in a variable called LXC. After storing this program in RPN
mode you can also use it in ALG mode.
To store a column vector into variable ΣDAT use function STOΣ, available
through the catalog (‚N), e.g., STOΣ (ANS(1)) in ALG mode.
Example 1
– Using the program LXC, defined above, create a column vector
using the following data: 2.1 1.2 3.1 4.5 2.3 1.1 2.3 1.5 1.6
2.2 1.2 2.5.
In RPG mode, type in the data in a list:
{2.1 1.2 3.1 4.5 2.3 1.1 2.3 1.5 1.6 2.2 1.2 2.5 } `@LXC
Use function STOΣ to store the data into ΣDAT.
Calculating single-variable statistics
Assuming that the single data set was stored as a column vector in variable
ΣDAT. To access the different STAT programs, press ‚Ù. Press @@@OK@@ to
select
1. Single-var.. There will be available to you an input form labeled
SINGLE-VARIABLE STATISTICS, with the data currently in your ΣDAT variable
listed in the form as a vector. Since you only have one column, the field
Col:
should have the value 1 in front of it. The
Type field determines whether you
are working with a sample or a population, the default setting is
Sample.
Move the cursor to the horizontal line preceding the fields
Mean, Std Dev,
Variance, Total, Maximum, Minimum, pressing the @CHK@ soft menu key to
select those measures that you want as output of this program. When ready,
press @@@OK@@. The selected values will be listed, appropriately labeled, in the
screen of your calculator.
Example 1
-- For the data stored in the previous example, the single-variable
statistics results are the following:
Mean: 2.133, Std Dev: 0.964, Variance: 0.929
Total: 25.6, Maximum: 4.5, Minimum: 1.1
Page 18-3
Definitions
The definitions
used for these quantities are the following:
Suppose that you have a number data points x
1
, x
2
, x
3
, …, representing
different measurements of the same discrete or continuous variable x. The set
of all possible values of the quantity x is referred to as the population
of x. A
finite population
will have only a fixed number of elements x
i
. If the quantity x
represents the measurement of a continuous quantity, and since, in theory,
such a quantity can take an infinite number of values, the population of x in
this case is infinite
. If you select a sub-set of a population, represented by
the n data values {x
1
, x
2
, …, x
n
}, we say you have selected a sample of values
of x.
Samples are characterized by a number of measures or statistics
. There are
measures of central tendency
, such as the mean, median, and mode, and
measures of spreading
, such as the range, variance, and standard deviation.
Measures of central tendency
The mean (or arithmetic mean)
of the sample, x, is defined as the average
value of the sample elements,
=
=
n
i
i
x
n
x
1
.
1
The value labeled
Total obtained above represents the summation of the
values of x, or Σx
i
= n⋅x. This is the value provided by the calculator under
the heading
Mean. Other mean values used in certain applications are the
geometric mean
, x
g
, or the harmonic mean, x
h
, defined as:
.
11
,
1
21
=
==
n
i
ih
n
ng
xx
xxxx L
Examples of calculation of these measures, using lists, are available in
Chapter 8.
The median
is the value that splits the data set in the middle when the
elements are placed in increasing order. If you have an odd number, n, of
ordered elements, the median of this sample is the value located in position
Page 18-4
(n+1)/2. If you have an even number, n, of elements, the median is the
average of the elements located in positions n/2 and (n+1)/2. Although the
pre-programmed statistical features of the calculator do not include the
calculation of the median, it is very easily to write a program to calculate such
quantity by working with lists. For example, if you want to use the data in
ΣDAT to find the median, type the following program in RPN mode (see
Chapter 21 for more information on programming in User RPL language).:
« nC « RCLΣ DUP SIZE 2 GET IF 1 > THEN nC COL SWAP DROP
OBJ 1 + ARRY END OBJ OBJ DROP DROP DUP n « LIST SORT
IF ‘n MOD 2 == 0’ THEN DUP ‘n/2’ EVAL GET SWAP ‘(n+1)/2’ EVAL GET +
2 / ELSE ‘(n+1)/2’ EVAL GET END “Median” TAG » » »
Store this program under the name MED. An example of application of this
program is shown next.
Example 2
– To run the program, first you need to prepare your ΣDAT matrix.
Then, enter the number of the column in ΣDAT whose median you want to find,
and press @@MED@@. For the data currently in ΣDAT (entered in an earlier
example), use program MED to show that
Median: 2.15.
The mode
of a sample is better determined from histograms, therefore, we
leave its definition for a later section.
Measures of spread
The variance
(Var) of the sample is defined as
=
=
n
i
ix
xx
n
s
1
22
)(
1
1
.
The standard deviation
(St Dev) of the sample is just the square root of the
variance, i.e., s
x
.
The range
of the sample is the difference between the maximum and minimum
values of the sample. Since the calculator, through the pre-programmed
statistical functions provides the maximum and minimum values of the sample,
you can easily calculate the range.
Page 18-5
Coefficient of variation
The coefficient of variation of a sample combines the mean, a measure of
central tendency, with the standard deviation, a measure of spreading, and is
defined, as a percentage, by: V
x
= (s
x
/x)100.
Sample vs. population
The pre-programmed functions for single-variable statistics used above can be
applied to a finite population by selecting the
Type: Population in the
SINGLE-VARIABLE STATISTICS screen. The main difference is in the values
of the variance and standard deviation which are calculated using n in the
denominator of the variance, rather than (n-1).
Example 3
-- If you were to repeat the exercise in Example 1 of this section,
using
Population rather than Sample as the Type, you will get the same
values for the mean, total, maximum, and minimum. The variance and
standard deviation, however, will be given by: Variance: 0.852, Std Dev:
0.923.
Obtaining frequency distributions
The application 2. Frequencies.. in the STAT menu can be used to obtain
frequency distributions for a set of data. Again, the data must be present in
the form of a column vector stored in variable ΣDAT. To get started, press
‚Ù˜ @@@OK@@@. The resulting input form contains the following fields:
ΣDAT: the matrix containing the data of interest.
Col: the column of ΣDAT that is under scrutiny.
X-Min: the minimum class boundary (default = -6.5).
Bin Count: the number of classes(default = 13).
Bin Width: the uniform width of each class (default = 1).
Definitions
To understand the meaning of these parameters we present the following
definitions
: Given a set of n data values: {x
1
, x
2
, …, x
n
} listed in no particular
order, it is often required to group these data into a series of classes
by
counting the frequency
or number of values corresponding to each class.
(Note: the calculators refers to classes as bins).
Page 18-6
Suppose that the classes, or bins, will be selected by dividing the interval (x
bot
,
x
top
), into k = Bin Count classes by selecting a number of class boundaries,
i.e., {xB
1
, xB
2
, …, xB
k+1
}, so that class number 1 is limited by xB
1
-xB
2
, class
number 2 by xB
2
- xB
3
, and so on. The last class, class number k, will be
limited by xB
k
- xB
k +1
.
The value of x corresponding to the middle of each class is known as the class
mark, and is defined as xM
i
= (xB
i
+ xB
i+1
)/2, for i = 1, 2, …, k.
If the classes are chosen such that the class size is the same, then we can
define the class size
as the value Bin Width = x = (x
max
- x
min
) / k,
and the class boundaries can be calculated as xB
i
= x
bot
+ (i - 1) * x.
Any data point, x
j
, j = 1, 2, …, n, belongs to the i-th class, if xB
i
x
j
< xB
i+1
The application
2. Frequencies.. in the STAT menu will perform this frequency
count, and will keep track of those values that may be below the minimum
and above the maximum class boundaries (i.e., the outliers
).
Example 1
-- In order to better illustrate obtaining frequency distributions, we
want to generate a relatively large data set, say 200 points, by using the
following:
First, seed the random number generator using: RDZ(25) in ALG mode,
or 25 ` RDZ in RPN mode (see Chapter 17).
Type in the following program in RPN mode:
« n « 1 n FOR j RAND 100 * 2 RND NEXT n LIST » »
and save it under the name RDLIST (RanDom number LIST generator).
Generate the list of 200 number by using RDLIST(200) in ALG mode, or
200 ` @RDLIST@ in RPN mode.
Use program LXC (see above) to convert the list thus generated into a
column vector.
Store the column vector into ΣDAT, by using function STOΣ.
Page 18-7
Obtain single-variable information using: ‚Ù @@@OK@@@. Use Sample for
the Type of data set, and select all options as results. The results for this
example were:
Mean: 51.0406, Std Dev: .29.5893…, Variance: 875.529…
Total: 10208.12, Maximum: 99.35, Minimum: 0.13
This information indicates that our data ranges from values close to zero to
values close to 100. Working with whole numbers, we can select the range
of variation of the data as (0,100). To produce a frequency distribution we
will use the interval (10,90) dividing it into 8 bins of width 10 each.
Select the program
2. Frequencies.. by using ‚Ù˜ @@@OK@@@. The
data is already loaded in ΣDAT, and the option Col should hold the value
1 since we have only one column in ΣDAT.
Change X-Min to 10, Bin Count to 8, and Bin Width to 10, then press
@@@OK@@@.
Using the RPN mode, the results are shown in the stack as a column vector in
stack level 2, and a row vector of two components in stack level 1. The
vector in stack level 1 is the number of outliers outside of the interval where
the frequency count was performed. For this case, I get the values [ 25. 22.]
indicating that there are, in my ΣDAT vector, 25 values smaller than 10 and
22 larger than 90.
Press ƒ to drop the vector of outliers from the stack. The remaining
result is the frequency count of data. This can be translated into a table
as shown below.
This table was prepared from the information we provided to generate the
frequency distribution, although the only column returned by the calculator is
the Frequency column (f
i
). The class numbers, and class boundaries are easy
to calculate for uniform-size classes (or bins), and the class mark is just the
average of the class boundaries for each class. Finally, the cumulative
frequency is obtained by adding to each value in the last column, except the
first, the frequency in the next row, and replacing the result in the last column
Page 18-8
of the next row. Thus, for the second class, the cumulative frequency is
18+15 = 33, while for class number 3, the cumulative frequency is 33 + 16 =
49, and so on. The cumulative frequency represents the frequency of those
numbers that are smaller than or equal to the upper boundary of any given
class.
Class
No.
Class Bound. Class
mark.
Frequency Cumulative
i XB
i
XB
i+1
Xm
i
f
i
frequency
< XB
1
outlier below
range
25
1 10 20 15 18 18
2 20 30 25 14 32
3 30 40 35 17 49
4 40 50 45 17 66
5 50 60 55 22 88
6 60 70 65 22 110
7 70 80 75 24 134
k = 8 80 90 85 19 153
>XB
k
outliers above
range
22
Given the (column) vector of frequencies generated by the calculator, you can
obtain a cumulative frequency vector by using the following program in RPN
mode:
« DUP SIZE 1 GET freq k « {k 1} 0 CON cfreq « ‘freq(1,1)’ EVAL
‘cfreq(1,1)’ STO 2 k FOR j ‘cfreq(j-1,1) +freq(j,1)’ EVAL ‘cfreq (j,1)’ STO
NEXT cfreq » » »
Save it under the name CFREQ. Use this program to generate the list of
cumulative frequencies (press @CFREQ with the column vector of frequencies in
the stack). The result, for this example, is a column vector representing the last
column of the table above.
Page 18-35
Procedure for testing hypotheses
The procedure for hypothesis testing involves the following six steps:
1. Declare a null hypothesis, H
0
. This is the hypothesis to be tested. For
example, H
0
: µ
1
-µ
2
= 0, i.e., we hypothesize that the mean value of
population 1 and the mean value of population 2 are the same. If H
0
is
true, any observed difference in means is attributed to errors in random
sampling.
2. Declare an alternate hypothesis, H
1
. For the example under consideration,
it could be H
1
: µ
1
-µ
2
0 [Note: this is what we really want to test.]
3. Determine or specify a test statistic, T. In the example under consideration,
T will be based on the difference of observed means, X
1
-X
2
.
4. Use the known (or assumed) distribution of the test statistic, T.
5. Define a rejection region (the critical region, R) for the test statistic based
on a pre-assigned significance level α.
6. Use observed data to determine whether the computed value of the test
statistic is within or outside the critical region. If the test statistic is within
the critical region, then we say that the quantity we are testing is
significant at the 100α percent level.
Notes:
1. For the example under consideration, the alternate hypothesis H
1
: µ
1
-µ
2
0 produces what is called a two-tailed test. If the alternate hypothesis is
H
1
: µ
1
-µ
2
> 0 or H
1
: µ
1
-µ
2
< 0, then we have a one-tailed test.
2. The probability of rejecting the null hypothesis is equal to the level of
significance, i.e., Pr[TR|H
0
]=α. The notation Pr[A|B] represents the
conditional probability of event A given that event B occurs.
Errors in hypothesis testing
In hypothesis testing we use the terms errors of Type I and Type II to define the
cases in which a true hypothesis is rejected or a false hypothesis is accepted
(not rejected), respectively. Let T = value of test statistic, R = rejection region,
A = acceptance region, thus, RA = , and RA = , where = the
parameter space for T, and = the empty set. The probabilities of making
an error of Type I or of Type II are as follows:
Page 18-36
Rejecting a true hypothesis, Pr[Type I error] = Pr[TR|H
0
] = α
Not rejecting a false hypothesis, Pr[Type II error] = Pr[TA|H
1
] = β
Now, let's consider the cases in which we make the correct decision:
Not rejecting a true hypothesis, Pr[Not(Type I error)] = Pr[TA|H
0
] = 1 - α
Rejecting a false hypothesis, Pr[Not(Type II error)] = Pr [TR|H
1
] = 1 - β
The complement of β is called the power of the test of the null hypothesis H
0
vs. the alternative H
1
. The power of a test is used, for example, to determine
a minimum sample size to restrict errors.
Selecting values of α and β
A typical value of the level of significance (or probability of Type I error) is α
= 0.05, (i.e., incorrect rejection once in 20 times on the average). If the
consequences of a Type I error are more serious, choose smaller values of α,
say 0.01 or even 0.001.
The value of β, i.e., the probability of making an error of Type II, depends on
α, the sample size n, and on the true value of the parameter tested. Thus, the
value of β is determined after the hypothesis testing is performed. It is
customary to draw graphs showing β, or the power of the test (1- β), as a
function of the true value of the parameter tested. These graphs are called
operating characteristic curves or power function curves, respectively.
Inferences concerning one mean
Two-sided hypothesis
The problem consists in testing the null hypothesis H
o
: µ = µ
o
, against the
alternative hypothesis, H
1
: µ≠ µ
ο
at a level of confidence (1-α)100%, or
significance level α, using a sample of size n with a mean x and a standard
deviation s. This test is referred to as a two-sided or two-tailed test. The
procedure for the test is as follows:
Page 18-37
First, we calculate the appropriate statistic for the test (t
o
or z
o
) as follows:
If n < 30 and the standard deviation of the population, σ, is known,
use the z-statistic:
n
x
z
o
o
/σ
µ
=
If n > 30, and σ is known, use z
o
as above. If σ is not known,
replace s for σ in z
o
, i.e., use
ns
x
z
o
o
/
µ
=
If n < 30, and σ is unknown, use the t-statistic
ns
x
t
o
o
/
µ
=
, with ν =
n - 1 degrees of freedom.
Then, calculate the P-value (a probability) associated with either z
ο
or t
ο
, and
compare it to α to decide whether or not to reject the null hypothesis. The P-
value for a two-sided test is defined as either
P-value = P(|z|>|z
o
|), or, P-value = P(|t|>|t
o
|).
The criteria to use for hypothesis testing is:
Reject H
o
if P-value < α
Do not reject H
o
if P-value > α.
The P-value for a two-sided test can be calculated using the probability
functions in the calculator as follows:
If using z, P-value = 2UTPN(0,1,|z
o
|)
If using t, P-value = 2UTPT(ν,|t
o
|)
Example 1
-- Test the null hypothesis H
o
: µ = 22.5 ( = µ
o
), against the
alternative hypothesis, H
1
: µ ≠22.5, at a level of confidence of 95% i.e., α =
0.05, using a sample of size n = 25 with a mean x = 22.0 and a standard
Page 18-41
Inferences concerning one proportion
Suppose that we want to test the null hypothesis, H
0
:
p = p
0
, where p
represents the probability of obtaining a successful outcome in any given
repetition of a Bernoulli trial. To test the hypothesis, we perform n repetitions
of the experiment, and find that k successful outcomes are recorded. Thus, an
estimate of p is given by p’ = k/n.
The variance for the sample will be estimated as s
p
2
= p’(1-p’)/n = k(n-k)/n
3
.
Assume that the Z score, Z = (p-p
0
)/s
p
, follows the standard normal
distribution, i.e., Z ~ N(0,1). The particular value of the statistic to test is z
0
=
(p’-p
0
)/s
p
.
Instead of using the P-value as a criterion to accept or not accept the
hypothesis, we will use the comparison between the critical value of z0 and
the value of z corresponding to α or α/2.
Two-tailed test
If using a two-tailed test we will find the value of z
α
/2
, from
Pr[Z> z
α
/2
] = 1-Φ(z
α
/2
) = α/2, or Φ(z
α
/2
) = 1- α/2,
where Φ(z) is the cumulative distribution function (CDF) of the standard normal
distribution (see Chapter 17).
Reject the null hypothesis, H
0
, if z
0
>z
α
/2
, or if z
0
< - z
α
/2
.
In other words, the rejection region is R = { |z
0
| > z
α
/2
}, while the
acceptance region is A = {|z
0
| < z
α
/2
}.
One-tailed test
If using a one-tailed test we will find the value of S
, from
Pr[Z> z
α
] = 1-Φ(z
α
) = α, or Φ(z
α
) = 1- α,
Reject the null hypothesis, H
0
, if z
0
>z
α
, and H
1
: p>p
0
, or if z
0
< - z
α
, and H
1
:
p<p
0
.
Page 18-42
Testing the difference between two proportions
Suppose that we want to test the null hypothesis, H
0
: p
1
-p
2
= p
0
, where the p's
represents the probability of obtaining a successful outcome in any given
repetition of a Bernoulli trial for two populations 1 and 2. To test the
hypothesis, we perform n
1
repetitions of the experiment from population 1,
and find that k
1
successful outcomes are recorded. Also, we find k
2
successful
outcomes out of n
2
trials in sample 2. Thus, estimates of p
1
and p
2
are given,
respectively, by p
1
’ = k
1
/n
1
, and p
2
’ = k
2
/n
2
.
The variances for the samples will be estimated, respectively, as
s
1
2
= p
1
’(1-p
1
’)/n
1
= k
1
(n
1
-k
1
)/n
1
3
, and s
2
2
= p
2
’(1-p
2
’)/n
2
= k
2
(n
2
-k
2
)/n
2
3
.
And the variance of the difference of proportions is estimated from: s
p
2
= s
1
2
+
s
2
2
.
Assume that the Z score, Z = (p
1
-p
2
-p
0
)/s
p
, follows the standard normal
distribution, i.e., Z ~ N(0,1). The particular value of the statistic to test is z
0
=
(p
1
’-p
2
’-p
0
)/s
p
.
Two-tailed test
If using a two-tailed test we will find the value of z
α
/2
, from
Pr[Z> z
α
/2
] = 1-Φ(z
α
/2
) = α/2, or Φ(z
α
/2
) = 1- α/2,
where Φ(z) is the cumulative distribution function (CDF) of the standard normal
distribution.
Reject the null hypothesis, H
0
, if z
0
>z
α
/2
, or if z
0
< - z
α
/2
.
In other words, the rejection region is R = { |z
0
| > z
α
/2
}, while the
acceptance region is A = {|z
0
| < z
α
/2
}.
One-tailed test
If using a one-tailed test we will find the value of z
a
, from
Page 18-43
Pr[Z> z
α
] = 1-Φ(z
α
) = α, or Φ(z
α
) = 1- α,
Reject the null hypothesis, H
0
, if z
0
>z
α
, and H
1
: p
1
-p
2
> p
0
, or if z
0
< - z
α
, and
H
1
: p
1
-p
2
<p
0
.
Hypothesis testing using pre-programmed features
The calculator provides with hypothesis testing procedures under application
5. Hypoth. tests.. can be accessed by using ‚Ù—— @@@OK@@@.
As with the calculation of confidence intervals, discussed earlier, this program
offers the following 6 options:
These options are interpreted as in the confidence interval applications:
1. Z-Test: 1 µ.: Single sample hypothesis testing for the population mean, µ,
with known population variance, or for large samples with unknown
population variance.
2. Z-Test: µ1−µ2.: Hypothesis testing for the difference of the population
means, µ
1
- µ
2
, with either known population variances, or for large
samples with unknown population variances.
3. Z-Test: 1 p.: Single sample hypothesis testing for the proportion, p, for
large samples with unknown population variance.
4. Z-Test: p1− p2.: Hypothesis testing for the difference of two proportions,
p
1
-p
2
, for large samples with unknown population variances.
5. T-Test: 1 µ.: Single sample hypothesis testing for the population mean, µ,
for small samples with unknown population variance.
6. T-Test: µ1−µ2.: Hypothesis testing for the difference of the population
means, µ
1
- µ
2
, for small samples with unknown population variances.
Page 18-44
Try the following exercises:
Example 1
– For µ
0
= 150, σ = 10, x = 158, n = 50, for α = 0.05, test the
hypothesis H
0
: µ = µ
0
, against the alternative hypothesis, H
1
: µ µ
0
.
Press ‚Ù—— @@@OK@@@ to access the hypothesis testing feature in the
calculator. Press @@@OK@@@ to select option 1. Z-Test: 1 µ.
Enter the following data and press @@@OK@@@:
You are then asked to select the alternative hypothesis. Select µ 150, and
press @@OK@@. The result is:
Then, we reject H
0
: µ = 150, against H
1
: µ 150. The test z value is z
0
=
5.656854. The P-value is 1.54×10
-8
. The critical values of ±z
α
/2
=
±1.959964, corresponding to critical x range of {147.2 152.8}.
This information can be observed graphically by pressing the soft-menu key
@GRAPH:
Page 18-51
Additional equations for linear regression
The summary statistics such as Σx, Σx
2
, etc., can be used to define the
following quantities:
===
===
n
i
i
n
i
ix
n
i
ixx
x
n
xsnxxS
11
2
2
1
2
1
)1()(
2
11
2
2
1
2
1
)1()(
===
===
n
i
i
n
i
iy
n
i
iy
y
n
ysnyyS
===
====
n
i
i
n
i
i
n
i
iixy
n
i
iixy
yx
n
yxsnyyxxS
1111
2
1
)1())((
From which it follows that the standard deviations of x and y, and the
covariance of x,y are given, respectively, by
1
=
n
S
s
xx
x
,
1
=
n
S
s
yy
y
, and
1
=
n
S
s
yx
xy
Also, the sample correlation coefficient is
.
yyxx
xy
xy
SS
S
r
=
In terms of x, y, S
xx
, S
yy
, and S
xy
, the solution to the normal equations is:
xbya = ,
2
x
xy
xx
xy
s
s
S
S
b ==
Prediction error
The regression curve of Y on x is defined as Y = Α + Β⋅x + ε. If we have a set
of n data points (x
i
, y
i
), then we can write Y
i
= Α + Β⋅x
i
+ ε
I
, (i = 1,2,…,n),
where Y
i
= independent, normally distributed random variables with mean
(Α + Β⋅x
i
) and the common variance σ
2
; ε
i
= independent, normally distributed
random variables with mean zero and the common variance σ
2
.
Page 18-52
Let y
i
= actual data value,
^
y
i
= a + bx
i
= least-square prediction of the data.
Then, the prediction error is: e
i
= y
i
-
^
y
i
= y
i
- (a + bx
i
).
An estimate of σ
2
is the, so-called, standard error of the estimate,
)1(
2
1
2
/)(
)]([
2
1
22
2
2
1
2
xyy
xxxyyy
i
n
i
ie
rs
n
n
n
SSS
bxay
n
s
=
=+
=
=
Confidence intervals and hypothesis testing in linear regression
Here are some concepts and equations related to statistical inference for
linear regression:
Confidence limits for regression coefficients:
For the slope (Β): b (t
n-2,
α
/2
)s
e
/S
xx
< Β < b + (t
n-2,
α
/2
)s
e
/S
xx
,
For the intercept (Α):
a (t
n-2,
α
/2
)s
e
[(1/n)+x
2
/S
xx
]
1/2
< Α < a + (t
n-2,
α
/2
)s
e
[(1/n)+x
2
/S
xx
]
1/2
,
where t follows the Student’s t distribution with ν = n – 2, degrees of
freedom, and n represents the number of points in the sample.
Hypothesis testing on the slope, Β:
Null hypothesis, H
0
: Β = Β
0
, tested against the alternative hypothesis, H
1
:
Β Β
0
. The test statistic is t
0
= (b -Β
0
)/(s
e
/S
xx
), where t follows the
Student’s t distribution with ν = n – 2, degrees of freedom, and n
represents the number of points in the sample. The test is carried out as
that of a mean value hypothesis testing, i.e., given the level of
significance, α, determine the critical value of t, t
α
/2
, then, reject H
0
if t
0
>
t
α
/2
or if t
0
< - t
α
/2
.
If you test for the value Β
0
= 0, and it turns out that the test suggests that
you do not reject the null hypothesis, H
0
: Β = 0, then, the validity of a
linear regression is in doubt. In other words, the sample data does not
support the assertion that Β 0. Therefore, this is a test of the
significance of the regression model.
Page 18-53
Hypothesis testing on the intercept , Α:
Null hypothesis, H
0
: Α = Α
0
, tested against the alternative hypothesis, H
1
:
Α Α
0
. The test statistic is t
0
= (a-Α
0
)/[(1/n)+x
2
/S
xx
]
1/2
, where t follows
the Student’s t distribution with ν = n – 2, degrees of freedom, and n
represents the number of points in the sample. The test is carried out as
that of a mean value hypothesis testing, i.e., given the level of
significance, α, determine the critical value of t, t
α
/2
, then, reject H
0
if t
0
>
t
α
/2
or if t
0
< - t
α
/2
.
Confidence interval for the mean value of Y at x = x
0
, i.e., α+βx
0
:
a+bx(t
n-2,
α
/2
)s
e
[(1/n)+(x
0
-x)
2
/S
xx
]
1/2
< α+βx
0
<
a+bx+(t
n-2,
α
/2
)s
e
[(1/n)+(x
0
-x)
2
/S
xx
]
1/2
.
Limits of prediction: confidence interval for the predicted value Y
0
=Y(x
0
):
a+bx(t
n-2,
α
/2
)s
e
[1+(1/n)+(x
0
-x)
2
/S
xx
]
1/2
< Y
0
<
a+bx+(t
n-2,
α
/2
)s
e
[1+(1/n)+(x
0
-x)
2
/S
xx
]
1/2
.
Procedure for inference statistics for linear regression using the
calculator
1) Enter (x,y) as columns of data in the statistical matrix ΣDAT.
2) Produce a scatterplot for the appropriate columns of ΣDAT, and use
appropriate H- and V-VIEWS to check linear trend.
3) Use ‚Ù˜˜@@@OK@@@, to fit straight line, and get a, b, s
xy
(Covariance), and r
xy
(Correlation).
4) Use ‚Ù˜@@@OK@@@, to obtain x,y, s
x
, s
y
. Column 1 will show the
statistics for x while column 2 will show the statistics for y.
5) Calculate
2
)1(
xxx
snS = , )1(
2
1
222
xyye
rs
n
n
s
=
6) For either confidence intervals or two-tailed tests, obtain t
α
/2
, with (1-
α)100% confidence, from t-distribution with ν = n -2.
7) For one- or two-tailed tests, find the value of t using the appropriate
equation for either Α or Β. Reject the null hypothesis if
P-value < α.
8) For confidence intervals use the appropriate formulas as shown above.
Page 18-54
Example 1 -- For the following (x,y) data, determine the 95% confidence
interval for the slope B and the intercept A
x
2.0 2.5 3.0 3.5 4.0
y
5.5 7.2 9.4 10.0 12.2
Enter the (x,y) data in columns 1 and 2 of ΣDAT, respectively. A scatterplot of
the data shows a good linear trend:
Use the
Fit Data.. option in the ‚Ù menu, to get:
3: '-.86 + 3.24*X'
2: Correlation: 0.989720229749
1: Covariance: 2.025
These results are interpreted as a = -0.86, b = 3.24, r
xy
= 0.989720229749,
and s
xy
= 2.025. The correlation coefficient is close enough to 1.0 to confirm
the linear trend observed in the graph.
From the
Single-var… option of the ‚Ù menu we find: x = 3, s
x
=
0.790569415042,y = 8.86, s
y
= 2.58804945857.
Next, with n = 5, calculate
5.2427905694150.0)15()1(
22
===
xxx
snS
=
= )1(
2
1
222
xyye
rs
n
n
s
...1826.0)...9897.01(...5880.2
25
15
22
=
Page 18-55
Confidence intervals for the slope (Β) and intercept (A):
First, we obtain t
n-2,
α
/2
= t
3
,
0.025
= 3.18244630528 (See chapter 17 for a
program to solve for t
ν
,a
):
Next, we calculate the terms
(t
n-2,
α
/2
)s
e
/S
xx
= 3.182…(0.1826…/2.5)
1/2
= 0.8602…
(t
n-2,
α
/2
)s
e
[(1/n)+x
2
/S
xx
]
1/2
=
3.1824…⋅√0.1826…[(1/5)+3
2
/2.5]
1/2
= 2.65
Finally, for the slope B, the 95% confidence interval is
(-0.86-0.860242, -0.86+0.860242) = (-1.72, -0.00024217)
For the intercept A, the 95% confidence interval is (3.24-2.6514,
3.24+2.6514) = (0.58855,5.8914).
Example 2
-- Suppose that the y-data used in Example 1 represent the
elongation (in hundredths of an inch) of a metal wire when subjected to a
force x (in tens of pounds). The physical phenomenon is such that we expect
the intercept, A, to be zero. To check if that should be the case, we test the
null hypothesis, H
0
: Α = 0, against the alternative hypothesis, H
1
: Α 0, at the
level of significance α = 0.05.
The test statistic is t
0
= (a-0)/[(1/n)+x
2
/S
xx
]
1/2
= (-0.86)/ [(1/5)+3
2
/2.5]
½
= -
0.44117. The critical value of t, for ν = n – 2 = 3, and α/2 = 0.025, can
be calculated using the numerical solver for the equation α = UTPT(γ,t)
developed in Chapter 17. In this program, γ represents the degrees of
freedom (n-2), and α represents the probability of exceeding a certain value
of t, i.e., Pr[ t>t
α
] = 1 – α. For the present example, the value of the level of
significance is α = 0.05, g = 3, and t
n-2,
α
/2
= t
3,0.025
. Also, for γ = 3 and α =
0.025, t
n-2,
α
/2
= t
3,0.025
= 3.18244630528. Because t
0
> - t
n-2,
α
/2
, we cannot
reject the null hypothesis, H
0
: Α = 0, against the alternative hypothesis, H
1
: Α
0, at the level of significance α = 0.05.
This result suggests that taking A = 0 for this linear regression should be
acceptable. After all, the value we found for a, was –0.86, which is relatively
close to zero.
Page 18-56
Example 3
– Test of significance for the linear regression. Test the null
hypothesis for the slope H
0
: Β = 0, against the alternative hypothesis, H
1
: Β
0, at the level of significance α = 0.05, for the linear fitting of Example 1.
The test statistic is t
0
= (b -Β
0
)/(s
e
/S
xx
) = (3.24-0)/(√0.18266666667/2.5) =
18.95. The critical value of t, for ν = n – 2 = 3, and α/2 = 0.025, was
obtained in Example 2, as t
n-2,
α
/2
= t
3,0.025
= 3.18244630528. Because, t
0
>
t
α
/2
, we must reject the null hypothesis H
1
: Β 0, at the level of significance α
= 0.05, for the linear fitting of Example 1.
Multiple linear fitting
Consider a data set of the form
x
1
x
2
x
3
… x
n
y
x
11
x
21
x
31
x
n1
y
1
x
12
x
22
x
32
x
n2
y
2
x
13
x
32
x
33
x
n3
y
3
. . . . .
. . . . . .
x
1,m-1
x
2,m-1
x
3,m-1
x
n,m-1
y
m-1
x
1,m
x
2,m
x
3,m
x
n,m
y
m
Suppose that we search for a data fitting of the form y = b
0
+ b
1
x
1
+ b
2
x
2
+
b
3
x
3
+ … + b
n
x
n
. You can obtain the least-square approximation to the
values of the coefficients b = [b
0
b
1
b
2
b
3
… b
n
], by putting together the
matrix X:
_ _
1 x
11
x
21
x
31
x
n1
1 x
12
x
22
x
32
x
n2
1 x
13
x
32
x
33
x
n3
. . . . .
. . . . . .
1 x
1,m
x
2,m
x
3,m
x
n,m
_ _
Page 18-57
Then, the vector of coefficients is obtained from b = (X
T
X)
-1
X
T
y, where y is
the vector y = [y
1
y
2
… y
m
]
T
.
For example
, use the following data to obtain the multiple linear fitting
y = b
0
+ b
1
x
1
+ b
2
x
2
+ b
3
x
3,
x
1
x
2
x
3
y
1.20 3.10 2.00 5.70
2.50 3.10 2.50 8.20
3.50 4.50 2.50 5.00
4.00 4.50 3.00 8.20
6.00 5.00 3.50 9.50
With the calculator, in RPN mode, you can proceed as follows:
First, within your HOME directory, create a sub-directory to be called MPFIT
(Multiple linear and Polynomial data FITting) , and enter the MPFIT sub-
directory. Within the sub-directory, type this program:
« X y « X TRAN X * INV X TRAN * y * » »
and store it in a variable called MTREG (MulTiple REGression).
Next, enter the matrices X and b into the stack:
[[1,1.2,3.1,2][1,2.5,3.1,2.5 ][1,3.5,4.5,2.5][1,4,4.5,3][1,6,5,3.5]]
`` (keep an extra copy)
[5.7,8.2,5.0,8.2,9.5] `
Press J@MTREG. The result is: [-2.1649…,–0.7144…,-1.7850…,7.0941…],
i.e.,
y = -2.1649–0.7144x
1
-1.7850×10
-2
x
2
+ 7.0941x
3
.
Page 18-58
You should have in your calculator’s stack the value of the matrix X and the
vector b, the fitted values of y are obtained from y = Xb, thus, just press *
to obtain: [5.63.., 8.25.., 5.03.., 8.23.., 9.45..].
Compare these fitted values with the original data as shown in the table
below:
x
1
x
2
x
3
y y-fitted
1.20 3.10 2.00 5.70 5.63
2.50 3.10 2.50 8.20 8.25
3.50 4.50 2.50 5.00 5.03
4.00 4.50 3.00 8.20 8.23
6.00 5.00 3.50 9.50 9.45
Polynomial fitting
Consider the x-y data set {(x
1
,y
1
), (x
2
,y
2
), …, (x
n
,y
n
)}. Suppose that we want
to fit a polynomial or order p to this data set. In other words, we seek a fitting
of the form y = b
0
+ b
1
x + b
2
x
2
+ b
3
x
3
+ … + b
p
x
p
. You can obtain the
least-square approximation to the values of the coefficients b = [b
0
b
1
b
2
b
3
… b
p
], by putting together the matrix X
_ _
1 x
1
x
1
2
x
1
3
x
1
p-1
y
1
p
1 x
2
x
2
2
x
2
3
x
2
p-1
y
2
p
1 x
3
x
3
2
x
3
3
x
3
p-1
y
3
p
. . . . . .
. . . . . . .
1 x
n
x
n
2
x
n
3
x
n
p-1
y
n
p
_ _
Then, the vector of coefficients is obtained from b = (X
T
X)
-1
X
T
y, where y is
the vector y = [y
1
y
2
… y
n
]
T
.
In Chapter 10, we defined the Vandermonde matrix corresponding to a
vector x = [x
1
x
2
… x
m
] . The Vandermonde matrix is similar to the matrix X
of interest to the polynomial fitting, but having only n, rather than (p+1)
columns.
We can take advantage of the VANDERMONDE function to create the matrix
X if we observe the following rules:
Page 18-59
If p = n-1, X = V
n
.
If p < n-1, then remove columns p+2, …, n-1, n from V
n
to form X.
If p > n-1, then add columns n+1, …, p-1, p+1, to V
n
to form matrix X.
In step 3 from this list, we have to be aware that column i (i= n+1, n+2, …,
p+1) is the vector [x
1
i
x
2
i
… x
n
i
]. If we were to use a list of data values for x
rather than a vector, i.e., x = { x
1
x
2
… x
n
}, we can easily calculate the
sequence { x
1
i
x
2
i
… x
n
i
}. Then, we can transform this list into a vector and
use the COL menu to add those columns to the matrix V
n
until X is completed.
After X is ready, and having the vector y available, the calculation of the
coefficient vector b is the same as in multiple linear fitting (the previous matrix
application). Thus, we can write a program to calculate the polynomial fitting
that can take advantage of the program already developed for multiple linear
fitting. We need to add to this program the steps 1 through 3 listed above.
The algorithm
for the program, therefore, can be written as follows:
Enter vectors x and y, of the same dimension, as lists. (Note: since the
function VANDERMONDE uses a list as input, it is more convenient to enter
the (x,y) data as a list.) Also, enter the value of p.
Determine n = size of vector x.
Use the function VANDERMONDE to generate the Vandermonde
matrix V
n
for the list x entered.
If p = n-1, then
X = V
n
,
Else If p < n-1
Remove columns p+2, …, n from V
n
to form X
(Use a FOR loop and COL-)
Else
Add columns n+1, …, p+1 to V
n
to form X
(FOR loop, calculate x
i
, convert to vector, use COL+)
Convert y to vector
Calculate b using program MTREG (see example on multiple linear
fitting above)
Page 18-60
Here is the translation of the algorithm
to a program in User RPL language.
(See Chapter 21 for additional information on programming):
« Open program
x y p Enter lists x and y, and p (levels 3,2,1)
« Open subprogram 1
x SIZE n Determine size of x list
« Open subprogram 2
x VANDERMONDE Place x in stack, obtain V
n
IF ‘p<n-1’ THEN This IF implements step 3 in algorithm
n Place n in stack
p 2 + Calculate p+1
FOR j Start loop j = n-1, n-2, …, p+1, step = -1
j COLDROP Remove column and drop it from stack
-1 STEP Close FOR-STEP loop
ELSE
IF ‘p>n-1’ THEN
n 1 + Calculate n+1
p 1 + Calculate p+1
FOR j Start a loop with j = n, n+1, …, p+1.
x j ^ Calculate x
j
, as a list
OBJ ARRY Convert list to array
j COL+ Add column to matrix
NEXT Close FOR-NEXT loop
END Ends second IF clause.
END Ends first IF clause. Its result is X
y OBJ ARRY Convert list y to an array
MTREG X and y used by program MTREG
NUM Convert to decimal format
» Close sub-program 2
» Close sub-program 1
» Close main program
Save it into a variable called POLY (POLYnomial fitting).
Page 18-61
As an example
, use the following data to obtain a polynomial fitting with p =
2, 3, 4, 5, 6.
x y
2.30 179.72
3.20 562.30
4.50 1969.11
1.65 65.87
9.32 31220.89
1.18 32.81
6.24 6731.48
3.45 737.41
9.89 39248.46
1.22 33.45
Because we will be using the same x-y data for fitting polynomials of different
orders, it is advisable to save the lists of data values x and y into variables xx
and yy, respectively. This way, we will not have to type them all over again
in each application of the program POLY. Thus, proceed as follows:
{ 2.3 3.2 4.5 1.65 9.32 1.18 6.24 3.45 9.89 1.22 } ` ‘xx’ K
{179.72 562.30 1969.11 65.87 31220.89 32.81 6731.48 737.41
39248.46 33.45} ` ‘yy’ K
To fit the data to polynomials use the following:
@@xx@@ @@yy@@ 2 @POLY, Result: [4527.73 -3958.52 742.23]
i.e., y = 4527.73-39.58x+742.23x
2
@@xx@@ @@yy@@ 3 @POLY, Result: [ –998.05 1303.21 -505.27 79.23]
i.e., y = -998.05+1303.21x-505.27x
2
+79.23x
3
@@xx@@ @@yy@@ 4 @POLY, Result: [20.92 –2.61 –1.52 6.05 3.51 ]
i.e., y = 20.92-2.61x-1.52x
2
+6.05x
3
+3.51x
4
.
@@xx@@ @@yy@@ 5 @POLY, Result: [19.08 0.18 –2.94 6.36 3.48 0.00 ]
i.e., y = 19.08+0.18x-2.94x
2
+6.36x
3
+3.48x
4
+0.0011x
5
@@xx@@ @@yy@@ 6 @POLY, Result: [-16.73 67.17 –48.69 21.11 1.07 0.19 0.00]
i.e., y = -16.73+67.17x-48.69x
2
+21.11x
3
+1.07x
4
+0.19x
5
+0.0058x
6
Page 18-62
Selecting the best fitting
As you can see from the results above, you can fit any polynomial to a set of
data. The question arises, which is the best fitting for the data? To help one
decide on the best fitting we can use several criteria:
The correlation coefficient, r. This value is constrained to the range –
1 < r < 1. The closer r is to +1 or –1, the better the data fitting.
The sum of squared errors, SSE. This is the quantity that is to be
minimized by least-square approach.
A plot of residuals. This is a plot of the error corresponding to each
of the original data points. If these errors are completely random, the
residuals plot should show no particular trend.
Before attempting to program these criteria, we present some definitions
:
Given the vectors x and y of data to be fit to the polynomial equation, we
form the matrix X and use it to calculate a vector of polynomial coefficients b.
We can calculate a vector of fitted data, y’, by using y’ = Xb.
An error vector is calculated by e = yy’.
The sum of square errors is equal to the square of the magnitude of the error
vector, i.e., SSE = |e|
2
= ee = Σ e
i
2
= Σ (y
i
-y’
i
)
2
.
To calculate the correlation coefficient we need to calculate first what is
known as the sum of squared totals, SST, defined as SST = Σ (y
i
-y)
2
, where y
is the mean value of the original y values, i.e., y = (Σy
i
)/n.
In terms of SSE and SST, the correlation coefficient is defined by
r = [1-(SSE/SST)]
1/2
.
Here is the new program including calculation of SSE and r (Once more,
consult the last page of this chapter to see how to produce the variable and
command names in the program):
Page 18-63
« Open program
x y p Enter lists x and y, and number p
« Open subprogram1
x SIZE n Determine size of x list
« Open subprogram 2
x VANDERMONDE Place x in stack, obtain V
n
IF ‘p<n-1’ THEN This IF is step 3 in algorithm
n Place n in stack
p 2 + Calculate p+1
FOR j Start loop, j = n-1 to p+1, step = -1
j COLDROP Remove column, drop from stack
-1 STEP Close FOR-STEP loop
ELSE
IF ‘p>n-1’ THEN
n 1 + Calculate n+1
p 1 + Calculate p+1
FOR j Start loop with j = n, n+1, …, p+1.
x j ^ Calculate x
j
, as a list
OBJ ARRY Convert list to array
j COL+ Add column to matrix
NEXT Close FOR-NEXT loop
END Ends second IF clause.
END Ends first IF clause. Produces X
y OBJ ARRY Convert list y to an array
X yv Enter matrix and array as X and y
« Open subprogram 3
X yv MTREG X and y used by program MTREG
NUM If needed, converts to floating point
b Resulting vector passed as b
« Open subprogram 4
b yv Place b and yv in stack
X b * Calculate Xb
- Calculate e = y - Xb
ABS SQ DUP Calculate SSE, make copy
y ΣLIST n / Calculate y
n 1 LIST SWAP CON Create vector of n values of y
Page 18-64
yv ABS SQ Calculate SST
/ Calculate SSE/SST
NEG 1 + Calculate r = [1–SSE/SST ]
1/2
“r” TAG Tag result as “r”
SWAP Exchange stack levels 1 and 2
“SSE” TAG Tag result as SSE
» Close sub-program 4
» Close sub-program 3
» Close sub-program 2
» Close sub-program 1
» Close main program
Save this program under the name POLYR, to emphasize calculation of the
correlation coefficient r.
Using the POLYR program for values of p between 2 and 6 produce the
following table of values of the correlation coefficient, r, and the sum of
square errors, SSE:
p r SSE
2 0.9971908 10731140.01
3 0.9999768 88619.36
4 0.9999999 7.48
5 0.9999999 8.92
6 0.9999998 432.61
While the correlation coefficient is very close to 1.0 for all values of p in the
table, the values of SSE vary widely. The smallest value of SSE corresponds to
p = 4. Thus, you could select the preferred polynomial data fitting for the
original x-y data as:
y = 20.92-2.61x-1.52x
2
+6.05x
3
+3.51x
4
.
Page 19-1
Chapter 19
Numbers in Different Bases
In this Chapter we present examples of calculations of number in bases other
than the decimal basis.
Definitions
The number system used for everyday arithmetic is known as the decimal
system for it uses 10 (Latin, deca) digits, namely 0-9, to write out any real
number. Computers, on the other hand, use a system that is based on two
possible states, or binary system. These two states are represented by 0 and
1, ON and OFF, or high-voltage and low-voltage. Computers also use
number systems based on eight digits (0-7) or octal system, and sixteen digits
(0-9, A-F) or hexadecimal. As in the decimal system, the relative position of
digits determines its value. In general, a number n in base b can be written
as a series of digits n = (a
1
a
2
…a
n
.c
1
c
2
…c
m
)
b
. The “point” separates n
“integer” digits from m “decimal” digits. The value of the number, converted
to our customary decimal system, is calculated by using n = a
1
bn
-1
+ a
2
b
n-2
+ … + a
n
b
0
+ c
1
b
-1
+ c
2
b
-2
+ … +c
m
b
-m
. For example, (15.234)
10
= 110
1
+
510
0
+ 210
-1
+ 310
-2
+ 410
-3
, and (101.111)
2
= 12
2
+ 02
1
+ 12
0
+
12
-1
+ 12
-2
+ 12
-3
The BASE menu
While the calculator would typically be operated using the decimal system,
you can produce calculations using the binary, octal, or hexadecimal system.
Many of the functions for manipulating number systems other than the decimal
system are available in the BASE menu, accessible through ‚ã(the 3
key). With system flag 117 set to CHOOSE boxes, the BASE menu shows
the following entries:
Page 21-6
DO: DO-UNTIL-END construct for loops
WHILE: WHILE-REPEAT-END construct for loops
TEST: Comparison operators, logical operators, flag testing functions
TYPE: Functions for converting object types, splitting objects, etc.
LIST: Functions related to list manipulation
ELEM: Functions for manipulating elements of a list
PROC: Functions for applying procedures to lists
GROB: Functions for the manipulation of graphic objects
PICT: Functions for drawing pictures in the graphics screen
CHARS: Functions for character string manipulation
MODES: Functions for modifying calculator modes
FMT: To change number formats, comma format
ANGLE: To change angle measure and coordinate systems
FLAG: To set and un-set flags and check their status
KEYS: To define and activate user-defined keys (Chapter 20)
MENU: To define and activate custom menus (Chapter 20)
MISC: Miscellaneous mode changes (beep, clock, etc.)
IN: Functions for program input
OUT: Functions for program output
TIME: Time-related functions
ALRM: Alarm manipulation
ERROR: Functions for error handling
IFERR: IFERR-THEN-ELSE-END construct for error handling
RUN: Functions for running and debugging programs
Navigating through RPN sub-menus
Start with the keystroke combination „°, then press the appropriate soft-
menu key (e.g., @)@MEM@@ ). If you want to access a sub-menu within this sub-
menu (e.g., @)@DIR@@ within the @)@MEM@@ sub-menu), press the corresponding key.
To move up in a sub-menu, press the L key until you find either the
reference to the upper sub-menu (e.g., @)@MEM@@ within the @)@DIR@@ sub-menu) or
to the PRG menu (i.e., @)@PRG@@ ).
Functions listed by sub-menu
The following is a listing of the functions within the PRG sub-menus listed by
sub-menu.
Page 21-7
STACK MEM/DIR BRCH/IF BRCH/WHILE TYPE
DUP PURGE IF WHILE OBJ
SWAP RCL THEN REPEAT ARRY
DROP STO ELSE END LIST
OVER PATH END
STR
ROT CRDIR
TEST
TAG
UNROT PGDIR
BRCH/CASE
== UNIT
ROLL VARS CASE
CR
ROLLD TVARS THEN < RC
PICK ORDER END > NUM
UNPICK
CHR
PICK3
MEM/ARITH BRCH/START
DTAG
DEPTH STO+ START AND EQ
DUP2 STO- NEXT OR TYPE
DUPN STOx STEP XOR VTYPE
DROP2 STO/ NOT
DROPN INCR
BRCH/FOR
SAME
LIST
DUPDU DECR FOR TYPE OBJ
NIP SINV NEXT SF LIST
NDUPN SNEG STEP CF SUB
SCONJ FS? REPL
MEM
BRCH/DO
FC?
PURGE
BRCH
DO FS?C
MEM IFT UNTIL FC?C
BYTES IFTE END LININ
NEWOB
ARCHI
RESTO
Page 21-8
LIST/ELEM GROB CHARS MODES/FLAG MODES/MISC
GET GROB SUB SF BEEP
GETI BLANK REPL CF CLK
PUT GOR POS FS? SYM
PUTI GXOR SIZE FC? STK
SIZE SUB NUM FS?C ARG
POS REPL CHR FS?C CMD
HEAD LCD OBJ FC?C INFO
TAIL LCD STR STOF
SIZE HEAD RCLF
IN
LIST/PROC
ANIMATE TAIL RESET INFORM
DOLIST
SREPL NOVAL
DOSUB
PICT
MODES/KEYS
CHOOSE
NSUB PICT
MODES/FMT
ASN INPUT
ENDSUB PDIM STD STOKEYS KEY
STREAM LINE FIX RECLKEYS WAIT
REVLIST TLINE SCI DELKEYS PROMPT
SORT BOX ENG
SEQ ARC FM,
MODES/MENU OUT
PIXON ML MENU PVIEW
PIXOF CST TEXT
PIX?
MODES/ANGLE
TMENU CLLCD
PVIEW DEG RCLMENU DISP
PXC RAD
FREEZE
CPX GRAD
MSGBOX
RECT
BEEP
CYLIN
SPHERE
Page 21-9
TIME ERROR RUN
DATE DOERR DBUG
DATE ERRN SST
TIME ERRM SST
TIME ERR0 NEXT
TICKS LASTARG HALT
KILL
TIME/ALRM ERROR/IFERR
OFF
ACK IFERR
ACKALARM THEN
STOALARM ELSE
RCLALARM END
DELALARM
FINDALARM
Shortcuts in the PRG menu
Many of the functions listed above for the PRG menu are readily available
through other means:
Comparison operators (, , <, , >) are available in the keyboard.
Many functions and settings in the MODES sub-menu can be
activated by using the input functions provided by the H key.
Functions from the TIME sub-menu can be accessed through the
keystroke combination ‚Ó.
Functions STO and RCL (in MEM/DIR sub-menu) are available in the
keyboard through the keys K and „©.
Functions RCL and PURGE (in MEM/DIR sub-menu) are available
through the TOOL menu (I).
Within the BRCH sub-menu, pressing the left-shift key () or the
right-shift key () before pressing any of the sub-menu keys, will
create constructs related to the sub-menu key chosen. This only works
with the calculator in RPN mode. Examples are shown below:
Page 21-11
@)STACK
DUP „°@)STACK @@DUP@@
SWAP „°@)STACK @SWAP@
DROP „°@)STACK @DROP@
@)@MEM@@ @)@DIR@@
PURGE „°@)@MEM@@ @)@DIR@@ @PURGE
ORDER „°@)@MEM@@ @)@DIR@@ @ORDER
@)@BRCH@ @)@IF@@
IF „°@)@BRCH@ @)@IF@@ @@@IF@@@
THEN „°@)@BRCH@ @)@IF@@ @THEN@
ELSE „°@)@BRCH@ @)@IF@@ @ELSE@
END „°@)@BRCH@ @)@IF@@ @@@END@@
@)@BRCH@ @)CASE@
CASE „°@)@BRCH@ @)CASE@ @CASE@
THEN „°@)@BRCH@ @)CASE@ @THEN@
END „°@)@BRCH@ @)CASE@ @@END@
@)@BRCH@ @)START
START „°@)@BRCH@ @)START @START
NEXT „°@)@BRCH@ @)START @NEXT
STEP „°@)@BRCH@ @)START @STEP
@)@BRCH@ @)@FOR@
FOR „°@)@BRCH@ @)@FOR@ @@FOR@@
NEXT „°@)@BRCH@ @)@FOR@ @@NEXT@
STEP „°@)@BRCH@ @)@FOR@ @@STEP@
@)@BRCH@ @)@@DO@@
DO „°@)@BRCH@ @)@@DO@@ @@@DO@@
UNTIL „°@)@BRCH@ @)@@DO@@ @UNTIL
END „°@)@BRCH@ @)@@DO@@ @@END@@
Page 21-21
,
)12(32
4
2
2
SSS
S
which indicates the position of the different stack input levels in the formula.
By comparing this result with the original formula that we programmed, i.e.,
,
)(2
2
2
byg
Q
h
v
=
we find that we must enter y in stack level 1 (S1), b in stack level 2 (S2), g in
stack level 3 (S3), and Q in stack level 4 (S4).
Prompt with an input string
These two approaches for identifying the order of the input data are not very
efficient. You can, however, help the user identify the variables to be used by
prompting him or her with the name of the variables. From the various
methods provided by the User RPL language, the simplest is to use an input
string and the function INPUT („°L@)@@IN@@ @INPUT@) to load your input
data.
The following program prompts the user for the value of a variable a and
places the input in stack level 1:
«
Enter a: {:a: {2 0} V } INPUT OBJ »
This program includes the symbol :: (tag) and (return), available through the
keystroke combinations „ê and ‚ë, both associated with the .
key. The tag symbol (::) is used to label strings for input and output. The
return symbol () is similar to a carriage return in a computer. The strings
between quotes (“ “) are typed directly from the alphanumeric keyboard.
Save the program in a variable called INPTa (for INPuT a).
Try running the program by pressing the soft menu key labeled @INPTa.
Page 21-22
The result is a stack prompting the user for the value of a and placing the
cursor right in front of the prompt :a: Enter a value for a, say 35, then press
`. The result is the input string
:a:35 in stack level 1.
A function with an input string
If you were to use this piece of code to calculate the function, f(a) = 2*a^2+3,
you could modify the program to read as follows:
«
Enter a: {:a: {2 0} V }
INPUT OBJ a
« 2*a^2+3» »
Save this new program under the name ‘FUNCa’ (FUNCtion of a):
Run the program by pressing @FUNCa. When prompted to enter the value of a
enter, for example, 2, and press `. The result is simply the algebraic
2a
2
+3, which is an incorrect result. The calculator provides functions for
debugging programs to identify logical errors during program execution as
shown below.
Debugging the program
To figure out why it did not work we use the DBUG function in the calculator
as follows:
³@FUNCa ` Copies program name to stack level 1
„°LL @)@RUN@ @@DBG@ Starts debugger
@SST
@ Step-by-step debugging, result: “Enter a:”
@SST
@ Result: {“ a:” {2 0} V}
@SST
@ Result: user is prompted to enter value of a
2` Enter a value of 2 for a. Result: “:a:2”
Page 21-23
@SST@ Result: a:2
@SST
@ Result: empty stack, executing a
@SST
@ Result: empty stack, entering subprogram «
@SST
@ Result: ‘2*a^2+3’
@SST
@ Result: ‘2*a^2+3’, leaving subprogram »
@SST
@ Result: ‘2*a^2+3’, leaving main program»
Further pressing the @SST
@ soft menu key produces no more output since we
have gone through the entire program, step by step. This run through the
debugger did not provide any information on why the program is not
calculating the value of 2a
2
+3 for a = 2. To see what is the value of a in the
sub-program, we need to run the debugger again and evaluate a within the
sub-program. Try the following:
J Recovers variables menu
³@FUNCa ` Copies program name to stack level 1
„°LL @)@RUN@ @@DBG@ Starts debugger
@SST
@ Step-by-step debugging, result: “Enter a:”
@SST
@ Result: {“ a:” {2 0} V}
@SST
@ Result: user is prompted to enter value of a
2` Enter a value of 2 for a. Result: “:a:2”
@SST
@ Result: a:2
@SST
@ Result: empty stack, executing a
@SST
@ Result: empty stack, entering subprogram «
At this point we are within the subprogram
« 2*a^2+3 » which uses the
local variable a. To see the value of a use:
~„aµ This indeed shows that the local variable a = 2
Let’s kill the debugger at this point since we already know the result we will
get. To kill the debugger press @KILL. You receive an
<!> Interrupted
message acknowledging killing the debugger. Press $to recover normal
calculator display.
Note: In debugging mode, every time we press @SST
@ the top left corner of the
display shows the program step being executed. A soft key function called
@@SST@ is also available under the @)RUN sub-menu within the PRG menu.
Page 21-24
This can be used to execute at once any sub-program called from within a
main program. Examples of the application of @@SST@ will be shown later.
Fixing the program
The only possible explanation for the failure of the program to produce a
numerical result seems to be the lack of the command NUM after the
algebraic expression ‘2*a^2+3’. Let’s edit the program by adding the
missing EVAL function. The program, after editing, should read as follows:
« Enter a: {:a: {2 0} V } INPUT
OBJ a
« 2*a^2+3NUM » »
Store it again in variable FUNCa, and run the program again with a = 2.
This time, the result is 11, i.e., 2*2
2
+3 = 11.
Input string for two or three input values
In this section we will create a sub-directory, within the directory HOME, to
hold examples of input strings for one, two, and three input data values.
These will be generic input strings that can be incorporated in any future
program, taking care of changing the variable names according to the needs
of each program.
Let’s get started by creating a sub-directory called PTRICKS (Programming
TRICKS) to hold programming tidbits that we can later borrow from to use in
more complex programming exercises. To create the sub-directory, first make
sure that you move to the HOME directory. Within the HOME directory, use
the following keystrokes to create the sub-directory PTRICKS:
³~~ptricks` Enter directory name ‘PTRICKS’
„°@)@MEM@@ @)@DIR@@ @CRDIR Create directory
J Recover variable listing
A program may have more than 3 input data values. When using input
strings we want to limit the number of input data values to 5 at a time for the
simple reason that, in general, we have visible only 7 stack levels. If we use
Page 21-25
stack level 7 to give a title to the input string, and leave stack level 6 empty to
facilitate reading the display, we have only stack levels 1 through 5 to define
input variables.
Input string program for two input values
The input string program for two input values, say a and b, looks as follows:
« Enter a and b: {:a::b: {2 0} V } INPUT OBJ »
This program can be easily created by modifying the contents of INPTa. Store
this program into variable INPT2.
Application
: evaluating a function of two variables
Consider the ideal gas law,
pV = nRT, where p = gas pressure (Pa), V = gas
volume(m
3
), n = number of moles (gmol), R = universal gas constant =
8.31451_J/(gmol*K), and T = absolute temperature (K).
We can define the pressure p as a function of two variables, V and T, as
p(V,T) = nRT/V for a given mass of gas since n will also remain constant.
Assume that n = 0.2 gmol, then the function to program is
V
T
K
J
V
T
TVp == )_662902.1(2.031451.8),(
We can define the function by typing the following program
« V T (1.662902_J/K)*(T/V) »
and storing it into variable @@@p@@@.
The next step is to add the input string that will prompt the user for the values
of V and T. To create this input stream, modify the program in @@@p@@@ to read:
« Enter V and T: { :V: :T: {2 0} V }
INPUT OBJ V T (1.662902_J/K)*(T/V) »
Page 21-26
Store the new program back into variable @@@p@@@. Press @@@p@@@ to run the program.
Enter values of V = 0.01_m^3 and T = 300_K in the input string, then press
`. The result is 49887.06_J/m^3. The units of J/m^3 are equivalent to
Pascals (Pa), the preferred pressure unit in the S.I. system.
Note: because we deliberately included units in the function definition, the
input values must have units attach to them in input to produce the proper
result.
Input string program for three input values
The input string program for three input values, say a ,b, and c, looks as
follows:
« Enter a, b and c: { :a: :b: :c: {2 0} V }
INPUT OBJ »
This program can be easily created by modifying the contents of INPT2 to
make it look like shown immediately above. The resulting program can then
be stored in a variable called INPT3. With this program we complete the
collection of input string programs that will allow us to enter one, two, or three
data values. Keep these programs as a reference and copy and modify them
to fulfill the requirements of new programs you write.
Application
: evaluating a function of three variables
Suppose that we want to program the ideal gas law including the number of
moles, n, as an additional variable, i.e., we want to define the function
,)_31451.8(),,(
V
Tn
K
J
nTVp
=
and modify it to include the three-variable input string. The procedure to put
together this function is very similar to that used earlier in defining the function
p(V,T). The resulting program will look like this:
« Enter V, T, and n: { :V: :T: :n: {2 0} V }
INPUT OBJ V T n (8.31451_J/(K*mol))*(n*T/V)»
Store this result back into the variable @@@p@@@.To run the program, press @@@p@@@.
Page 21-27
Enter values of V = 0.01_m^3, T = 300_K, and n = 0.8_mol. Before pressing
`, the stack will look like this:
Press ` to get the result 199548.24_J/m^3, or 199548.24_Pa = 199.55
kPa.
Input through input forms
Function INFORM („°L@)@@IN@@ @INFOR@.) can be used to create detailed
input forms for a program. Function INFORM requires five arguments, in this
order:
1. A title: a character string describing the input form
2. Field definitions: a list with one or more field definitions {s
1
s
2
… s
n
},
where each field definition, s
i
, can have one of two formats:
a. A simple field label: a character string
b. A list of specifications of the form {“label” “helpInfo” type
0
type
1
… type
n
}. The “label” is a field label. The “helpInfo”
is a character string describing the field label in detail, and
the type specifications is a list of types of variables allowed
for the field (see Chapter 24 for object types).
3. Field format information: a single number col or a list {col tabs}. In
this specification, col is the number of columns in the input box, and
tabs (optional) specifies the number of tab stops between the labels
and the fields in the form. The list could be an empty list. Default
values are col = 1 and tabs = 3.
4. List of reset values: a list containing the values to reset the different
fields if the option @RESET is selected while using the input form.
5. List of initial values: a list containing the initial values of the fields.
Page 21-28
The lists in items 4 and 5 can be empty lists. Also, if no value is to be
selected for these options you can use the NOVAL command
(„°L@)@@IN@@ @NOVAL@).
After function INFORM is activated you will get as a result either a zero, in
case the @CANCEL option is entered, or a list with the values entered in the fields
in the order specified and the number 1, i.e., in the RPN stack:
2: {v
1
v
2
… v
n
}
1: 1
Thus, if the value in stack level 1 is zero, no input was performed, while it this
value is 1, the input values are available in stack level 2.
Example 1
- As an example, consider the following program, INFP1 (INput
Form Program 1) to calculate the discharge Q in an open channel through
Chezy’s formula: Q = C(RS)
1/2
, where C is the Chezy coefficient, a function
of the channel surface’s roughness (typical values 80-150), R is the hydraulic
radius of the channel (a length), and S is the channel bed’s slope (a
dimensionless numbers, typically 0.01 to 0.000001). The following program
defines an input form through function INFORM:
« “ CHEZY’S EQN” { { “C:” “Chezy’s coefficient” 0} { “R:”
“Hydraulic radius” 0 } { “S:” “Channel bed slope” 0} } { }
{ 120 1 .0001} { 110 1.5 .00001 } INFORM »
In the program we can identify the 5 components of the input as follows:
1. Title: “ CHEZY’S EQN”
2. Field definitions: there are three of them, with labels “C:”, “R:”, “S:”,
info strings “Chezy coefficient”, “Hydraulic radius”, “Channel bed
slope”, and accepting only data type 0 (real numbers) for all of the
three fields:
{ { “C:” “Chezy’s coefficient” 0} { “R:” “Hydraulic
radius” 0 } { “S:” “Channel bed slope” 0} }
3. Field format information: { } (an empty list, thus, default values used)
Page 21-29
4. List of reset values: { 120 1 .0001}
5. List of initial values: { 110 1.5 .00001}
Save the program into variable INFP1. Press @INFP1 to run the program. The
input form, with initial values loaded, is as follows:
To see the effect of resetting these values use L @RESET (select Reset all to
reset field values):
Now, enter different values for the three fields, say, C = 95, R = 2.5, and S =
0.003, pressing @@@OK@@@ after entering each of these new values. After these
substitutions the input form will look like this:
Now, to enter these values into the program press @@@OK@@@ once more. This
activates the function INFORM producing the following results in the stack:
Page 21-30
Thus, we demonstrated the use of function INFORM. To see how to use these
input values in a calculation modify the program as follows:
« “ CHEZY’S EQN” { { “C:” “Chezy’s coefficient” 0} { “R:”
“Hydraulic radius” 0 } { “S:” “Channel bed slope” 0} } { }
{ 120 1 .0001} { 110 1.5 .00001 } INFORM IF THEN OBJ DROP
C R S ‘C*(R*S)’ NUM “Q” TAG ELSE “Operation cancelled”
MSGBOX END »
The program steps shown above after the INFORM command include a
decision branching using the IF-THEN-ELSE-END construct (described in detail
elsewhere in this Chapter). The program control can be sent to one of two
possibilities depending on the value in stack level 1. If this value is 1 the
control is passed to the commands:
OBJ DROP C R S ‘C*(R*S)’ NUM “Q” TAG
These commands will calculate the value of Q and put a tag (or label) to it.
On the other hand, if the value in stack level 1 is 0 (which happens when a
@CANCEL is entered while using the input box) , the program control is passed to
the commands:
“Operation cancelled” MSGBOX
These commands will produce a message box indicating that the operation
was cancelled.
Note: Function MSGBOX belongs to the collection of output functions under
the PRG/OUT sub-menu. Commands IF, THEN, ELSE, END are available
under the PRG/BRCH/IF sub-menu. Functions OBJ, TAG are available
under the PRG/TYPE sub-menu. Function DROP is available under the
PRG/STACK menu. Functions and NUM are available in the keyboard.
Example 2
– To illustrate the use of item 3 (Field format information) in the
arguments of function INFORM, change the empty list used in program INFP1
to { 2 1 }, meaning 2, rather than the default 3, columns, and only one tab
stop between labels and values. Store this new program in variable INFP2:
Page 21-31
« “ CHEZY’S EQN” { { “C:” “Chezy’s coefficient” 0}
{ “R:” “Hydraulic radius” 0 } { “S:” “Channel bed slope”
0} } { 2 1 } { 120 1 .0001} { 110 1.5 .00001 } INFORM
IF THEN OBJ DROP C R S ‘C*(R*S)’ NUM “Q” TAG ELSE
“Operation cancelled” MSGBOX END »
Running program @INFP2 produces the following input form:
Example 3 – Change the field format information list to { 3 0 } and save the
modified program into variable INFP3. Run this program to see the new input
form:
Creating a choose box
Function CHOOSE („°L@)@@IN@@ @CHOOS@) allows the user to create a
choose box in a program. This function requires three arguments:
1. A prompt (a character string describing the choose box)
2. A list of choice definitions {c
1
c
2
… c
n
}. A choice definition c
i
can
have any of two formats:
a. An object, e.g., a number, algebraic, etc., that will be
displayed in the choose box and will also be the result of the
choice.
b. A list {object_displayed object_result} so that
object_displayed is listed in the choose box, and
object_result is selected as the result if this choice is selected.
3. A number indicating the position in the list of choice definitions of the
default choice. If this number is 0, no default choice is highlighted.
Page 21-32
Activation of the CHOOSE function will return either a zero, if a @CANCEL action
is used, or, if a choice is made, the choice selected (e.g., v) and the number 1,
i.e., in the RPN stack:
2: v
1: 1
Example 1
– Manning’s equation for calculating the velocity in an open
channel flow includes a coefficient, C
u
, which depends on the system of units
used. If using the S.I. (Systeme International), C
u
= 1.0, while if using the E.S.
(English System), C
u
= 1.486. The following program uses a choose box to
let the user select the value of C
u
by selecting the system of units. Save it into
variable CHP1 (CHoose Program 1):
« “Units coefficient” { { “S.I. units” 1}
{ “E.S. units” 1.486} } 1 CHOOSE »
Running this program (press @CHP1) shows the following choose box:
Depending on whether you select
S.I. units or E.S. units, function
CHOOSE places either a value of 1 or a value of 1.486 in stack level 2 and
a 1 in level 1. If you cancel the choose box, CHOICE returns a zero (0).
The values returned by function CHOOSE can be operated upon by other
program commands as shown in the modified program CHP2:
« “Units coefficient” { { “S.I. units” 1} { “E.S. units”
1.486} } 1 CHOOSE IF THEN “Cu” TAG ELSE “Operation
cancelled” MSGBOX END »
The commands after the CHOOSE function in this new program indicate a
decision based on the value of stack level 1 through the IF-THEN-ELSE-END
construct. If the value in stack level 1 is 1, the commands “Cu” TAG will
produced a tagged result in the screen. If the value in stack level 1 is zero,
Page 21-33
the commands “Operation cancelled” MSGBOX will show a message
box indicating that the operation was cancelled.
Identifying output in programs
The simplest way to identify numerical program output is to “tag” the program
results. A tag is simply a string attached to a number, or to any object. The
string will be the name associated with the object. For example, earlier on,
when debugging programs INPTa (or INPT1) and INPT2, we obtained as
results tagged numerical output such as :a:35.
Tagging a numerical result
To tag a numerical result you need to place the number in stack level 2 and
the tagging string in stack level 2, then use the TAG function („ °
@)TYPE@ @ TAG) For example, to produce the tagged result B:5., use:
5`‚Õ~b„ ° @)TYPE@ @ TAG
Decomposing a tagged numerical result into a number and a tag
To decompose a tagged result into its numerical value and its tag, simply use
function OBJ („°@)TYPE@ @OBJ @). The result of decomposing a tagged
number with OBJ is to place the numerical value in stack level 2 and the tag
in stack level 1. If you are interested in using the numerical value only, then
you will drop the tag by using the backspace key ƒ. For example,
decomposing the tagged quantity B:5 (see above), will produce:
“De-tagging” a tagged quantity
“De-tagging” means to extract the object out of a tagged quantity. This
function is accessed through the keystroke combination: „ ° @)TYPE@
L @DTAG. For example, given the tagged quantity a:2, DTAG returns the
numerical value 2.
Page 21-34
Note: For mathematical operations with tagged quantities, the calculator will
"detag" the quantity automatically before the operation. For example, the left-
hand side figure below shows two tagged quantities before and after pressing
the * key in RPN mode:
Examples of tagged output
Example 1 – tagging output from function FUNCa
Let’s modify the function FUNCa, defined earlier, to produce a tagged output.
Use @FUNCa to recall the contents of FUNCa to the stack. The original
function program reads
« Enter a: {:a: {2 0} V } INPUT OBJ a «
2*a^2+3NUM » »
Modify it to read:
« Enter a: {:a: {2 0} V } INPUT OBJ a «
2*a^2+3NUM F TAG » »
Store the program back into FUNCa by using @FUNCa. Next, run the
program by pressing @FUNCa. Enter a value of 2 when prompted, and press
`. The result is now the tagged result F:11.
Example 2
– tagging input and output from function FUNCa
In this example we modify the program FUNCa so that the output includes
not only the evaluated function, but also a copy of the input with a tag.
Use @FUNCa to recall the contents of FUNCa to the stack:
« Enter a: {:a: {2 0} V } INPUT OBJ a «
2*a^2+3NUM F TAG » »
Modify it to read:
« Enter a: {:a: {2 0} V } INPUT OBJ a «
2*a^2+3EVAL F TAG a SWAP» »
Page 21-35
(Recall that the function SWAP is available by using „°@)STACK @SWAP@).
Store the program back into FUNCa by using @FUNCa. Next, run the
program by pressing @FUNCa . Enter a value of 2 when prompted, and press
`. The result is now two tagged numbers a:2. in stack level 2, and F:11.
in stack level 1.
Note: Because we use an input string to get the input data value, the local
variable a actually stores a tagged value ( :a:2, in the example above).
Therefore, we do not need to tag it in the output. All what we need to do is
place an a before the SWAP function in the subprogram above, and the
tagged input is placed in the stack. It should be pointed out that, in
performing the calculation of the function, the tag of the tagged input a is
dropped automatically, and only its numerical value is used in the calculation.
To see the operation of the function FUNCa, step by step, you could use the
DBUG function as follows:
³ @FUNCa ` Copies program name to stack level 1
„°LL @)@RUN@ @@DBG@ Starts debugger
@SST
@ Step-by-step debugging, result: “Enter a:”
@SST
@ Result: {“ a:” {2 0} V}
@SST
@ Result: user is prompted to enter value of a
2` Enter a value of 2 for a. Result: “:a:2”
@SST
@ Result: a:2
@SST
@ Result: empty stack, executing a
@SST
@ Result: empty stack, entering subprogram «
@SST
@ Result: ‘2*a^2+3’
@SST
@ Result: empty stack, calculating
@SST
@ Result: 11.,
@SST
@ Result: “F”
@SST
@ Result: F: 11.
@SST
@ Result: a:2.
@SST
@ Result: swap levels 1 and 2
@SST
@ leaving subprogram »
@SST
@ leaving main program »
Page 21-36
Example 3
– tagging input and output from function p(V,T)
In this example we modify the program @@@p@@@ so that the output tagged input
values and tagged result. Use @@@p@@@ to recall the contents of the program
to the stack:
«Enter V, T, and n: { :V: :T: :n: {2 0} V }
INPUT OBJ V T n (8.31451_J/(K*mol))*(n*T/V) »
Modify it to read:
«Enter V, T and n: { :V: :T: :n: {2 0} V }
INPUT OBJ V T n
« V T n
(8.31451_J/(K*mol))*(n*T/V) EVAL p TAG » »
Note: Notice that we have placed the calculation and tagging of the function
p(V,T,n), preceded by a recall of the input variables V T n, into a sub-program
[the sequence of instructions contained within the inner set of program
symbols « » ]. This is necessary because without the program symbol
separating the two listings of input variables (V T N « V T n), the program
will assume that the input command
V T N V T n
requires six input values, while only three are available. The result would
have been the generation of an error message and the interruption of the
program execution.
To include the subprogram mentioned above in the modified definition of
program @@@p@@@, will require you to use ‚å at the beginning and end of
the sub-program. Because the program symbols occur in pairs, whenever
‚å is invoked, you will need to erase the closing program symbol (») at
the beginning, and the opening program symbol («) at the end, of the sub-
program.
Page 21-37
To erase any character while editing the program, place the cursor to the right
of the character to be erased and use the backspace key ƒ.
Store the program back into variable p by using @@@p@@@. Next, run the
program by pressing @@@p@@@. Enter values of V = 0.01_m^3, T = 300_K, and n
= 0.8_mol, when prompted. Before pressing ` for input, the stack will look
like this:
After execution of the program, the stack will look like this:
In summary: The common thread in the three examples shown here is the
use of tags to identify input and output variables. If we use an input string to
get our input values, those values are already pre-tagged and can be easily
recall into the stack for output. Use of the TAG command allows us to
identify the output from a program.
Using a message box
A message box is a fancier way to present output from a program. The
message box command in the calculator is obtained by using
„°L@)@OUT@ @MSGBO@. The message box command requires that the
output string to be placed in the box be available in stack level 1. To see the
operation of the MSGBOX command try the following exercise:
‚Õ~‚t~„ê1.2
‚Ý ~„r~„a~„d
„°L@)@OUT@ @MSGBO@
Page 21-45
The available logical operators are: AND, OR, XOR (exclusive or), NOT, and
SAME. The operators will produce results that are true or false, depending on
the truth-value of the logical statements affected. The operator NOT
(negation) applies to a single logical statements. All of the others apply to
two logical statements.
Tabulating all possible combinations of one or two statements together with
the resulting value of applying a certain logical operator produces what is
called the truth table of the operator
. The following are truth tables of each of
the standard logical operators available in the calculator:
p NOT p
1 0
0 1
p q p AND q
1 1 1
1 0 0
0 1 0
0 0 0
p q p OR q
1 1 1
1 0 1
0 1 1
0 0 0
p q p XOR q
1 1 0
1 0 1
0 1 1
0 0 0
Page 21-46
The calculator includes also the logical operator SAME. This is a non-
standard logical operator used to determine if two objects are identical. If
they are identical, a value of 1 (true) is returned, if not, a value of 0 (false) is
returned. For example, the following exercise, in RPN mode, returns a value
of 0:
‘SQ(2)’ ` 4 ` SAME
Please notice that the use of SAME implies a very strict interpretation of the
word “identical.” For that reason, SQ(2) is not identical to 4, although they
both evaluate, numerically, to 4.
Program branching
Branching of a program flow implies that the program makes a decision
among two or more possible flow paths. The User RPL language provides a
number of commands that can be used for program branching. The menus
containing these commands are accessed through the keystroke sequence:
„°@)@BRCH@
This menu shows sub-menus for the program constructs
The program constructs IF…THEN..ELSE…END, and CASE…THEN…END will
be referred to as program branching constructs. The remaining constructs,
namely, START, FOR, DO, and WHILE, are appropriate for controlling
repetitive processing within a program and will be referred to as program
loop constructs. The latter types of program constructs are presented in more
detail in a later section.
Branching with IF
In this section we presents examples using the constructs IF…THEN…END and
IF…THEN…ELSE…END.
Page 21-47
The IF…THEN…END construct
The IF…THEN…END is the simplest of the IF program constructs. The general
format of this construct is:
IF logical_statement THEN program_statements END.
The operation of this construct is as follows:
1. Evaluate logical_statement.
2. If logical_statement is true, perform program _statements and continue
program flow after the END statement.
3. If logical_statement is false, skip program_statements and continue
program flow after the END statement.
To type in the particles IF, THEN, ELSE, and END, use:
„°@)@BRCH@ @)@IF@@
The functions @@@IF@@ @@THEN @@ELSE@ @@ END@@ are available in that menu to be typed
selectively by the user. Alternatively, to produce an IF…THEN…END
construct directly on the stack, use:
„°@)@BRCH@ @)@IF@@
This will create the following input in the stack:
With the cursor in front of the IF statement prompting the user for the logical
statement that will activate the IF construct when the program is executed.
Example
: Type in the following program:
« x « IF x<3 THEN x^2 EVAL END Done MSGBOX » »
Page 21-48
and save it under the name ‘f1’. Press J and verify that variable @@@f1@@@ is
indeed available in your variable menu. Verify the following results:
0 @@@f1@@@ Result: 0 1.2 @@@f1@@@ Result: 1.44
3.5 @@@f1@@@ Result: no action 10 @@@f1@@@ Result: no action
These results confirm the correct operation of the IF…THEN…END construct.
The program, as written, calculates the function f
1
(x) = x
2
, if x < 3 (and not
output otherwise).
The IF…THEN…ELSE…END construct
The IF…THEN…ELSE…END construct permits two alternative program flow
paths based on the truth value of the logical_statement. The general format of
this construct is:
IF logical_statement THEN program_statements_if_true
ELSE program_statements_if_false END.
The operation of this construct is as follows:
1. Evaluate logical_statement.
2. If logical_statement is true, perform program statements_if_true and
continue program flow after the END statement.
3. If logical_statement is false, perform program statements_if_false and
continue program flow after the END statement.
To produce an IF…THEN…ELSE…END construct directly on the stack, use:
„°@)@BRCH@ @)@IF@@
This will create the following input in the stack:
Example
: Type in the following program:
Page 21-60
Using a FOR…NEXT loop:
«
0 n S « 0 n FOR k k SQ S + S STO NEXT S S TAG » »
Store this program in a variable @@S2@@. Verify the following exercises: J
3 @@@S2@@ Result: S:14 4 @@@S2@@ Result: S:30
5 @@@S2@@ Result: S:55 8 @@@S2@@ Result: S:204
10 @@@S2@@ Result: S:385 20 @@@S2@@ Result: S:2870
30 @@@S2@@ Result: S:9455 100 @@@S2@@ Result: S:338350
You may have noticed that the program is much simpler than the one stored in
@@@S1@@. There is no need to initialize k, or to increment k within the program.
The program itself takes care of producing such increments.
The FOR…STEP construct
The general form of this statement is:
start_value end_value FOR loop_index program_statements
increment STEP
The start_value, end_value, and increment of the loop index can be
positive or negative quantities. For increment > 0, execution occurs as
long as the index is less than or equal to end_value. For increment < 0,
execution occurs as long as the index is greater than or equal to end_value.
Program statements are executed at least once (e.g.,
1 0 START 1 1 STEP
returns 1)
Example – generate a list of numbers using a FOR…STEP construct
Type in the program:
«
xs xe dx « xe xs – dx / ABS 1. + n « xs xe FOR x
x dx STEP n LIST » » »
and store it in variable @GLIS2.
Page 21-61
Check out that the program call 0.5 ` 2.5 ` 0.5 ` @GLIS2
produces the list {0.5 1. 1.5 2. 2.5}.
To see step-by-step operation use the program DBUG for a short list, for
example:
J1 # 1.5 # 0.5 ` Enter parameters 1 1.5 0.5
[‘] @GLIS2 ` Enter the program name in level 1
„°LL @)@RUN@ @@DBG@ Start the debugger.
Use @SST@ to step into the program and see the detailed operation of each
command.
The DO construct
The general structure of this command is:
DO program_statements UNTIL logical_statement END
The DO command starts an indefinite loop executing the program_statements
until the logical_statement returns FALSE (0). The logical_statement must
contain the value of an index whose value is changed in the
program_statements.
Example 1
- This program produces a counter in the upper left corner of the
screen that adds 1 in an indefinite loop until a keystroke (press any key) stops
the counter:
« 0 DO DUP 1 DISP 1 + UNTIL KEY END DROP »
Command KEY evaluates to TRUE when a keystroke occurs.
Example 2
– calculate the summation S using a DO…UNTIL…END construct
The following program calculates the summation
=
=
n
k
kS
0
2
Using a DO…UNTIL…END loop:
« 0. n S « DO n SQ S + S STO n 1 – n STO UNTIL
n<0 END S S TAG » »
Page 21-62
Store this program in a variable @@S3@@. Verify the following exercises: J
3 @@@S3@@ Result: S:14 4 @@@S3@@ Result: S:30
5 @@@S3@@ Result: S:55 8 @@@S3@@ Result: S:204
10 @@@S3@@ Result: S:385 20 @@@S3@@ Result: S:2870
30 @@@S3@@ Result: S:9455 100 @@@S3@@ Result: S:338350
Example 3
– generate a list using a DO…UNTIL…END construct
Type in the following program
« xs xe dx « xe xs – dx / ABS 1. + xs n x « xs DO
‘x+dx’ EVAL DUP ‘x’ STO UNTIL ‘xxe’ END n LIST » » »
and store it in variable @GLIS3.
Check out that the program call 0.5 ` 2.5 ` 0.5 ` @GLIS3
produces the list {0.5 1. 1.5 2. 2.5}.
To see step-by-step operation use the program DBUG for a short list, for
example:
J1 # 1.5 # 0.5 ` Enter parameters 1 1.5 0.5
[‘] @GLIS3 ` Enter the program name in level 1
„°LL @)@RUN@ @@DBG@ Start the debugger.
Use @SST@ to step into the program and see the detailed operation of each
command.
The WHILE construct
The general structure of this command is:
WHILE logical_statement REPEAT program_statements END
The WHILE statement will repeat the program_statements while
logical_statement is true (non zero). If not, program control is passed to
the statement right after END. The program_statements must include a
Page 21-63
loop index that gets modified before the logical_statement is checked at
the beginning of the next repetition. Unlike the DO command, if the first
evaluation of logical_statement is false, the loop is never executed.
Example 1
– calculate the summation S using a WHILE…REPEAT…END
construct
The following program calculates the summation
=
=
n
k
kS
0
2
Using a WHILE…REPEAT…END loop:
« 0. n S « WHILE n0 REPEAT n SQ S + S STO n 1 –
n STO END S S TAG » »
Store this program in a variable @@S4@@. Verify the following exercises: J
3 @@@S4@@ Result: S:14 4 @@@S4@@ Result: S:30
5 @@@S4@@ Result: S:55 8 @@@S4@@ Result: S:204
10 @@@S4@@ Result: S:385 20 @@@S4@@ Result: S:2870
30 @@@S4@@ Result: S:9455 100 @@@S4@@ Result: S:338350
Example 2
– generate a list using a WHILE…REPEAT…END construct
Type in the following program
« xs xe dx « xe xs – dx / ABS 1. + xs n x « xs
WHILE x<xeREPEAT x+dx EVAL DUP x STO END n LIST » »
»
and store it in variable @GLIS4.
Check out that the program call 0.5 ` 2.5 ` 0.5 ` @GLIS4
produces the list {0.5 1. 1.5 2. 2.5}.
To see step-by-step operation use the program DBUG for a short list, for
example:
Page 21-64
J1 # 1.5 # 0.5 ` Enter parameters 1 1.5 0.5
[‘] @GLIS4 ` Enter the program name in level 1
„°LL @)@RUN@ @@DBG@ Start the debugger.
Use @SST@ to step into the program and see the detailed operation of each
command.
Errors and error trapping
The functions of the PRG/ERROR sub-menu provide ways to manipulate errors
in the calculator, and trap errors in programs. The PRG/ERROR sub-menu,
available through „°LL@)ERROR@ , contains the following functions
and sub-menus:
DOERR
This function executes an user-define error, thus causing the calculator to
behave as if that particular error has occurred. The function can take as
argument either an integer number, a binary integer number, an error
message, or the number zero (0). For example, in RPN mode, entering
5` @DOERR, produces the following error message: Error: Memory Clear
If you enter #11h ` @DOERR, produces the following message: Error:
Undefined FPTR Name
If you enter “TRY AGAIN” ` @DOERR, produces the following message: TRY
AGAIN
Finally, 0` @DOERR, produces the message: Interrupted
ERRN
This function returns a number representing the most recent error. For
example, if you try 0Y$@ERRN, you get the number #305h. This is the
binary integer representing the error: Infinite Result
Page 21-65
ERRM
This function returns a character string representing the error message of the
most recent error. For example, in Approx mode, if you try 0Y$@ERRM,
you get the following string: “Infinite Result”
ERR0
This function clears the last error number, so that, executing ERRN afterwards,
in Approx mode, will return # 0h. For example, if you try
0Y$@ERR0 @ERRN, you get # 0h. Also, if you try
0Y$@ERR0 @ERRM, you get the empty string “ “.
LASTARG
This function returns copies of the arguments of the command or function
executed most recently. For example, in RPN mode, if you use:
3/2`, and then use function LASTARG (@LASTA), you will get the
values 3 and 2 listed in the stack. Another example, in RPN mode, is the
following: 5U`. Using LASTARG after these entries produces a 5.
Sub-menu IFERR
The @)IFERR sub-menu provides the following functions:
These are the components of the IFERR … THEN … END construct or of the
IFERR … THEN … ELSE … END construct. Both logical constructs are used
for trapping errors during program execution. Within the @)ERROR sub-menu,
entering @)IFERR, or @)IFERR, will place the IFERR structure components in
the stack, ready for the user to fill the missing terms, i.e.,
The general form of the two error-trapping constructs is as follows:
Page 21-66
IF trap-clause THEN error-clause END
IF trap-clause THEN error-clause ELSE normal-clause END
The operation of these logical constructs is similar to that of the IF … THEN …
END and of the IF … THEN … ELSE … END constructs. If an error is
detected during the execution of the trap-clause, then the error-clause is
executed. Otherwise, the normal-clause is executed.
As an example, consider the following program (@ERR1) that takes as input two
matrices, A and b, and checks if there is an error in the trap clause: A b /
(RPN mode, i.e., A/b). If there is an error, then the program calls function
LSQ (Least SQuares, see Chapter 11) to solve the system of equations:
« A b « IFERR A b / THEN LSQ END » »
Try it with the arguments A = [ [ 2, 3, 5 ] , [1, 2, 1 ] ] and b = [ [ 5 ] , [ 6 ] ].
A simple division of these two arguments produces an error: /Error: Invalid
Dimension.
However, with the error-trapping construct of the program, @ERR1, with the
same arguments produces: [0.262295…, 0.442622…].
User RPL programming in algebraic mode
While all the programs presented earlier are produced and run in RPN mode,
you can always type a program in User RPL when in algebraic mode by using
function RPL>. This function is available through the command catalog. As
an example, try creating the following program in algebraic mode, and store
it into variable P2:
« X ‘2.5-3*X^2’ »
First, activate the RPL> function from the command catalog (‚N). All
functions activated in ALG mode have a pair of parentheses attached to their
name. The RPL> function is not exception, except that the parentheses must be
removed before we type a program in the screen. Use the arrow keys
(š™) and the delete key (ƒ) to eliminate the parentheses from the RPL>()
Page 21-67
statement. At this point you will be ready to type the RPL program. The
following figures show the RPL> command with the program before and after
pressing the ` key.
To store the program use the STO command as follows:
„îK~p2`
An evaluation of program P2 for the argument X = 5 is shown in the next
screen:
While you can write programs in algebraic mode, without using the function
RPL>, some of the RPL constructs will produce an error message when you
press `, for example:
Whereas, using RPL, there is no problem when loading this program in
algebraic mode:
Page 22-1
Chapter 22
Programs for graphics manipulation
This chapter includes a number of examples showing how to use the
calculator’s functions for manipulating graphics interactively or through the
use of programs. As in Chapter 21 we recommend using RPN mode and
setting system flag 117 to SOFT menu labels. « »
We introduce a variety of calculator graphic applications in Chapter 12.
The examples of Chapter 12 represent interactive production of graphics
using the calculator’s pre-programmed input forms. It is also possible to use
graphs in your programs, for example, to complement numerical results with
graphics. To accomplish such tasks, we first introduce function in the PLOT
menu.
The PLOT menu
Commands for setting up and producing plots are available through the PLOT
menu. You can access the PLOT menu by using: 81.01
„°L@)MODES @)MENU@ @@MENU@.
The menu thus produced provides the user access to a variety of graphics
functions. For application in subsequent examples, let’s user-define the C
(GRAPH) key to provide access to this menu as described below.
User-defined key for the PLOT menu
Enter the following keystrokes to determine whether you have any user-defined
keys already stored in your calculator: „°L@)MODES @)@KEYS@ @@RCLK@.
Unless you have user-defined some keys, you should get in return a list
containing an S, i.e., {S}. This indicates that the Standard keyboard is the
only key definition stored in your calculator.
Page 22-35
with respect to segment AB. The coordinates of point A’ will give the values
(σ
xx
,τ
xy
), while those of B’ will give the values (σ
yy
,τ
xy
).
The stress condition for which the shear stress, τ
xy
, is zero, indicated by
segment D’E’, produces the so-called principal stresses, σ
P
xx
(at point D’) and
σ
P
yy
(at point E’). To obtain the principal stresses you need to rotate the
coordinate system x’-y’ by an angle φ
n
, counterclockwise, with respect to the
system x-y. In Mohr’s circle, the angle between segments AC and D’C
measures 2φ
n
.
The stress condition for which the shear stress, τ
xy
, is a maximum, is given by
segment F’G’. Under such conditions both normal stresses, σ
xx
= σ
yy
, are
equal. The angle corresponding to this rotation is φ
s
. The angle between
segment AC and segment F’C in the figure represents 2φ
s
.
Page 22-36
Modular programming
To develop the program that will plot Mohr’s circle given a state of stress, we
will use modular programming. Basically, this approach consists in
decomposing the program into a number of sub-programs that are created as
separate variables in the calculator. These sub-programs are then linked by a
main program, that we will call MOHRCIRCL. We will first create a sub-
directory called MOHRC within the HOME directory, and move into that
directory to type the programs.
The next step is to create the main program and sub-programs within the sub-
directory.
The main program MOHRCIRCL uses the following sub-programs:
INDAT: Requests input of σx, σy, τxy from user, produces a list σL =
{σx, σy, τxy} as output.
CC&r: Uses σL as input, produces σc = ½(σx+σy), r = radius of
Mohr’s circle, φn = angle for principal stresses, as output.
DAXES: Uses σc and r as input, determines axes ranges and draws
axes for the Mohr’s circle construct
PCIRC: Uses σc, r, and φn as input, draw’s Mohr’s circle by
producing a PARAMETRIC plot
DDIAM: Uses σL as input, draws the segment AB (see Mohr’s circle
figure above), joining the input data points in the Mohr’s circle
• σLBL: Uses σL as input, places labels to identify points A and B with
labels “σx” and “σy”.
• σAXS: Places the labels “σ” and “τ” in the x- and y-axes, respectively.
PTTL: Places the title “Mohr’s circle” in the figure.
Running the program
If you typed the programs in the order shown above, you will have in your
sub-directory MOHRC the following variables: PTTL, σAXS, PLPNT, σLBL,
PPTS, DDIAM. Pressing L you find also: PCIRC, DAXES, ATN2, CC&r,
Page 22-37
INDAT, MOHRC. Before re-ordering the variables, run the program once by
pressing the soft-key labeled @MOHRC. Use the following:
@MOHRC Launches the main program MOHRCIRCL
25˜ Enter σx = 25
75˜ Enter σy = 75
50` Enter τxy = 50, and finish data entry.
At this point the program MOHRCIRCL starts calling the sub-programs to
produce the figure. Be patient. The resulting Mohr’s circle will look as in the
picture to the left.
Because this view of PICT is invoked through the function PVIEW, we cannot
get any other information out of the plot besides the figure itself. To obtain
additional information out of the Mohr’s circle, end the program by pressing
$. Then, press š to recover the contents of PICT in the graphics
environment. The Mohr’s circle now looks like the picture to the right (see
above).
Press the soft-menu keys @TRACE and @(x,y)@. At the bottom of the screen you will
find the value of φ corresponding to the point A(σx, τxy), i.e.,
φ = 0,
(2.50E1, 5.00E1).
Press the right-arrow key () to increment the value of φ and see the
corresponding value of (σ
xx
, τ
xy
). For example, for φ = 45
o
, we have the
values (σ
xx
, τ
xy
) = (1.00E2, 2.50E1) = (100, 25). The value of σ
yy
will be
found at an angle 90
o
ahead, i.e., where φ = 45 + 90 = 135
o
. Press the
key until reaching that value of
φ, we find (σ
yy
, τ
xy
) = (-1.00E-10,-2.5E1)
= (0, 25).
Page 22-38
To find the principal normal values press š until the cursor returns to the
intersection of the circle with the positive section of the σ-axis. The values
found at that point are
φ = 59
o
, and (σ
xx
, τ
xy
) = (1.06E2,-1.40E0) = (106, -
1.40). Now, we expected the value of τ
xy
= 0 at the location of the principal
axes. What happens is that, because we have limited the resolution on the
independent variable to be ∆φ = 1
o
, we miss the actual point where the shear
stresses become zero. If you press š once more, you find values of are
φ
= 58
o
, and (σ
xx
, τ
xy
) = (1.06E2,5.51E-1) = (106, 0.551). What this
information tell us is that somewhere between
φ = 58
o
and φ = 59
o
, the shear
stress, τ
xy
, becomes zero.
To find the actual value of φn, press $. Then type the list corresponding to
the values {σx σy τxy}, for this case, it will be
{ 25 75 50 } [ENTER]
Then, press @CC&r. The last result in the output, 58.2825255885
o
, is the
actual value of φn.
A program to calculate principal stresses
The procedure followed above to calculate φn, can be programmed as
follows:
Program PRNST:
« Start program PRNST (PRiNcipal STresses)
INDAT Enter data as in program MOHRCIRC
CC&r Calculate σc, r, and fn, as in MOHRCIRC
φn” TAG Tag angle for principal stresses
3 ROLLD Move tagged angle to level 3
RC DUP Convert σc and r to (σc, r), duplicate
CR + “σPx” TAG Calculate principal stress σPx, tag it
SWAP CR - “σPy” TAG Swap,calculate stress σPy, tag it.
» End program PRNST
To run the program use:
J@PRNST Start program PRNST
25˜ Enter σx = 25
75˜ Enter σy = 75
50` Enter τxy = 50, and finish data entry.
Page 22-39
The result is:
Ordering the variables in the sub-directory
Running the program MOHRCIRCL for the first time produced a couple of new
variables, PPAR and EQ. These are the Plot PARameter and EQuation
variables necessary to plot the circle. It is suggest that we re-order the
variables in the sub-directory, so that the programs @MOHRC and @PRNST are the
two first variables in the soft-menu key labels. This can be accomplished by
creating the list { MOHRCIRCL PRNST } using: J„ä@MOHRC @PRNST `
And then, ordering the list by using: „°@)@MEM@@ @)@DIR@@ @ORDER.
After this call to the function ORDER is performed, press J. You will now
see that we have the programs MOHRCIRCL and PRNST being the first two
variables in the menu, as we expected.
A second example of Mohr’s circle calculations
Determine the principal stresses for the stress state defined by σ
xx
= 12.5 kPa,
σ
yy
= -6.25 kPa, and τ
xy
= - 5.0 kPa. Draw Mohr’s circle, and determine
from the figure the values of σ
xx
, σ
yy
, and τ
xy
if the angle φ = 35
o
.
To determine the principal stresses use the program @PRNST, as follows:
J@PRNST Start program PRNST
12.5˜ Enter σx = 12.5
6.25\˜ Enter σy = -6.25
5\` Enter τxy = -5, and finish data entry.
The result is:
To draw Mohr’s circle, use the program @MOHRC, as follows:
Page 22-40
J@MOHRC Start program PRNST
12.5˜ Enter σx = 12.5
6.25\˜ Enter σy = -6.25
5\` Enter τxy = -5, and finish data entry.
The result is:
To find the values of the stresses corresponding to a rotation of 35
o
in the
angle of the stressed particle, we use:
Clear screen, show PICT in graphics screen
@TRACE @(x,y)@. To move cursor over the circle showing φ and (x,y)
Next, press until you read φ = 35. The corresponding coordinates are
(1.63E0, -1.05E1), i.e., at φ = 35
o
, σ
xx
= 1.63 kPa, and σ
yy
= -10.5kPa.
An input form for the Mohr’s circle program
For a fancier way to input data, we can replace sub-program INDAT, with the
following program that activates an input form:
« “MOHR’S CIRCLE” { { “σx:” “Normal stress in x” 0 }
{ “σy:” “Normal stress in y” 0 } { “τxy:” “Shear stress”
0} } { } { 1 1 1 } { 1 1 1 } INFORM DROP »
With this program substitution, running @MOHRC will produce an input form as
shown next:
Page 22-41
Press @@@OK@@@ to continue program execution. The result is the following figure:
Since program INDAT is used also for program @PRNST (PRiNcipal STresses),
running that particular program will now use an input form, for example,
The result, after pressing @@@OK@@@, is the following:
Page 23-1
Chapter 23
Character strings
Character strings are calculator objects enclosed between double quotes.
They are treated as text by the calculator. For example, the string “SINE
FUNCTION”, can be transformed into a GROB (Graphics Object), to label a
graph, or can be used as output in a program. Sets of characters typed by
the user as input to a program are treated as strings. Also, many objects in
program output are also strings.
String-related functions in the TYPE sub-menu
The TYPE sub-menu is accessible through the PRG (programming) menu, i.e.,
„°. The functions provided in the TYPE sub-menu are also shown below.
Among the functions in the TYPE menu that are useful for manipulating strings
we have:
OBJ: Converts string to the object it represents
STR: Converts an object to its string representation
TAG: Tags a quantity
DTAG: Removes the tag from a tagged quantity (de-tags)
CHR: Creates a one-character string corresponding to the number used as
argument
NUM: Returns the code for first character in a string
Page 23-2
Examples of application of these functions to strings are shown next:
String concatenation
Strings can be concatenated (joined together) by using the plus sign +, for
example:
Concatenating strings is a practical way to create output in programs. For
example, concatenating "YOU ARE " AGE + " YEAR OLD" creates the string
"YOU ARE 25 YEAR OLD", where 25 is stored in the variable called AGE.
The CHARS menu
The CHARS sub-menu is accessible through the PRG (programming) menu, i.e.,
„°.
The functions provided by the CHARS sub-menu are the following:
Page 23-3
The operation of NUM, CHR, OBJ, and STR was presented earlier in this
Chapter. We have also seen the functions SUB and REPL in relation to
graphics earlier in this chapter. Functions SUB, REPL, POS, SIZE, HEAD, and
TAIL have similar effects as in lists, namely:
SIZE: number of a sub-string in a string (including spaces)
POS: position of first occurrence of a character in a string
HEAD: extracts first character in a string
TAIL: removes first character in a string
SUB: extract sub-string given starting and ending position
REPL: replace characters in a string with a sub-string starting at given position
SREPL: replaces a sub-string by another sub-string in a string
To see those effects on action try the following exercises: Store the string “
MY
NAME IS CYRILLE
” into variable S1. We’ll use this string to show examples of
the functions in the CHARS menu:
The characters list
The entire collection of characters available in the calculator is accessible
through the keystroke sequence ‚± When you highlight any character,
Page 23-4
say they line feed character , you will see at the left side of the bottom of
the screen the keystroke sequence to get such character (. for this case) and
the numerical code corresponding to the character (10 in this case).
Characters that are not defined appear as a dark square in the characters list
(
) and show (None) at the bottom of the display, even though a numerical
code exists for all of them. Numerical characters show the corresponding
number at the bottom of the display.
Letters show the code α (i.e., ~) followed by the corresponding letter, for
example, when you highlight M, you will see αM displayed at the lower left
side of the screen, indicating the use of ~m. On the other hand, m shows
the keystroke combination αM, or ~„m.
Greek characters, such as σ, will show the code α
S, or ~‚s. Some
characters, like ρ, do not have a keystroke sequence associated with them.
Therefore, the only way to obtain such characters is through the character list
by highlighting the desired character and pressing @ECHO1@ or @ECHO@.
Use @ECHO1@ to copy one character to the stack and return immediately to
normal calculator display. Use @ECHO@ to copy a series of characters to the
stack. To return to normal calculator display use $.
See Appendix D for more details on the use of special characters. Also,
Appendix G shows shortcuts for producing special characters.
Page 24-1
Chapter 24
Calculator objects and flags
Numbers, lists, vectors, matrices, algebraics, etc., are calculator objects.
They are classified according to its nature into 30 different types, which are
described below. Flags are variables that can be used to control the
calculator properties. Flags were introduced in Chapter 2.
Description of calculator objects
The calculator recognizes the following object types:
_________________________________________________________________
Number Type Example
_________________________________________________________________
0 Real Number -1.23E-5
1 Complex Number (-1.2,2.3)
2 String "Hello, world "
3 Real Array [[1 2][3 4]]
4 Complex Array [[(1 2) (3 4)]
[(5 6) (7 8)]
5 List {3 1 'PI'}
6 Global Name X
7 Local Name y
8 Program << a 'a^2' >>
9 Algebraic object 'a^2+b^2'
10 Binary Integer # A2F1E h
11 Graphic Object Graphic 131×64
12 Tagged Object R: 43.5
13 Unit Object 3_m^2/s
14 XLIB Name XLIB 342 8
15 Directory DIR … END
16 Library Library 1230"...
17 Backup Object Backup MYDIR
18 Built-in Function COS
19 Built-in Command CLEAR
Page 24-2
Number Type Example
____________________________________________________________________
21 Extended Real Number Long Real
22 Extended Complex Number Long Complex
23 Linked Array Linked Array
24 Character Object Character
25 Code Object Code
26 Library Data Library Data
27 External Object External
28 Integer 3423142
29 External Object External
30 External Object External
____________________________________________________________________
Function TYPE
This function, available in the PRG/TYPE () sub-menu, or through the command
catalog, is used to determine the type of an object. The function argument is
the object of interest. The function returns the object type as indicated by the
numbers specified above
.
Function VTYPE
This function operates similar to function TYPE, but it applies to a variable
name, returning the type of object stored in the variable.
Page 24-3
Calculator flags
A flag is a variable that can either be set or unset. The status of a flag affects
the behavior of the calculator, if the flag is a system flag, or of a program, if it
is a user flag. They are described in more detail next.
System flags
System flags can be accessed by using H @)FLAGS!. Press the down arrow
key to see a listing of all the system flags with their number and brief
description. The first two screens with system flags are shown below:
You will recognize many of these flags because they are set or unset in the
MODES menu (e.g., flag 95 for Algebraic mode, 103 for Complex mode,
etc.). Throughout this user’s manual we have emphasized the differences
between CHOOSE boxes and SOFT menus, which are selected by setting or
un-setting system flag 117. Another example of system flag setting is that of
system flags 60 and 61 that relate to the constant library (CONLIB, see
Chapter 3). These flags operate in the following manner:
user flag 60: clear (default):SI units, set: ENGL units
user flag 61: clear (default):use units, set: value only
Functions for setting and changing flags
These functions can be used to set, un-set, or check on the status of user flags
or system flags. When used with these functions system flags are referred to
with negative integer numbers. Thus, system flag 117 will be referred to as
flag -117. On the other hand, user flags will be referred to as positive integer
numbers when applying these functions. It is important to understand that user
flags have applications only in programming to help control the program flow.
Page 24-4
Functions for manipulating calculator flags are available in the
PRG/MODES/FLAG menu. The PRG menu is activated with „°. The
following screens (with system flag 117 set to CHOOSE boxes) show the
sequence of screens to get to the FLAG menu:
The functions contained within the FLAG menu are the following:
The operation of these functions is as follows:
SF Set a flag
CF Clear a flag
FS? Returns 1 if flag is set, 0 if not set
FC? Returns 1 if flag is clear (not set), 0 if flag is set
FS?C Tests flag as FS does, then clears it
FC?C Tests flag as FC does, then clears it
STOF Stores new system flag settings
RCLF Recalls existing flag settings
RESET Resets current field values (could be used to reset a flag)
User flags
For programming purposes, flags 1 through 256 are available to the user.
They have no meaning to the calculator operation.
Page 25-1
Chapter 25
Date and Time Functions
In this Chapter we demonstrate some of the functions and calculations using
times and dates.
The TIME menu
The TIME menu, available through the keystroke sequence ‚Ó (the 9 key)
provides the following functions, which are described next:
Setting an alarm
Option 2. Set alarm.. provides an input form to let the user set an alarm. The
input form looks like in the following figure:
The Message: input field allows you to enter a character string identifying the
alarm. The Time: field lets you enter the time for activating the alarm. The
Date: field is used to set the date for the alarm (or for the first time of
activation, if repetition is required). For example, you could set the following
alarm. The left-hand side figure shows the alarm with no repetition. The right-
hand figure shows the options for repetition after pressing @CHOOS. After
pressing @@@OK@@@ the alarm will be set.
Page 25-2
Browsing alarms
Option 1. Browse alarms... in the TIME menu lets you review your current
alarms. For example, after entering the alarm used in the example above, this
option will show the following screen:
This screen provides four soft menu key labels:
EDIT: For editing the selected alarm, providing an alarm set input form
NEW: For programming a new alarm
PURG: For deleting an alarm
OK : Returns to normal display
Setting time and date
Option 3. Set time, date… provides the following input form that let’s the user
set the current time and date. Details were provided in Chapter 1.
TIME Tools
Option 4. Tools… provides a number of functions useful for clock operation,
and calculations with times and dates. The following figure shows the
functions available under TIME Tools:
Page 25-3
The application of these functions is demonstrated below.
DATE: Places current date in the stack
DATE: Set system date to specified value
TIME: Places current time in 24-hr HH.MMSS format
TIME: Set system time to specified value in 24-hr HH.MM.SS format
TICKS: Provides system time as binary integer in units of clock ticks with 1
tick = 1/8192 sec
ALRM..:Sub-menu with alarm manipulation functions (described later)
DATE+: Adds or subtract a number of days to a date
DDAYS(x,y): Returns number of days between dates x and y
HMS: Converts time from decimal to HH.MMSS
HMS: Converts time from HH.MMSS to decimal
HMS+: Add two times in HH.MMSS format
HMS-: Subtract two times in HH.MMSS format
TSTR(time, date): converts time, date to string format
CLKADJ(x): Adds x ticks to system time (1 tick = 1/8192 sec )
Functions DATE, TIME, CLKADJ are used to adjust date and time. There
are no examples provided here for these functions.
Here are examples of functions DATE, TIME, and TSTR:
Calculations with dates
For calculations with dates, use functions DATE+, DDAYS. Here is an
example of application of these functions, together with an example of
function TICKS:
Page C-6
It is recommended that you select EXACT mode as default CAS mode, and
change to APPROX mode if requested by the calculator in the performance of
an operation.
For additional information on real and integer numbers, as well as other
calculator’s objects, refer to Chapter 2.
Complex vs. Real CAS mode
A complex number is a number of the form a+bi, where i, defined by
1
2
=i is the unit imaginary number (electrical engineers prefer to use the
symbol j), and a and b are real numbers. For example, the number 2 + 3i is
a complex number. Additional information on operations with complex
numbers are presented in Chapter 4 of this guide.
When the _Complex CAS option is selected, if an operation results in a
complex number, then the result will be shown in the form a+bi or in the form
of an ordered pair (a,b). On the other hand, if the _Complex CAS option is
unset (i.e., the Real CAS option is active), and an operation results in a
complex number, you will be asked to switch to Complex mode. If you
decline, the calculator will report an error.
Please notice that, in COMPLEX mode the CAS is able to perform a wider
range of operations than in REAL mode, but it will also be considerably slower.
Thus, it is recommended that you use the REAL mode as default mode and
switch to COMPLEX if requested by the calculator in the performance of an
operation.
The following example shows the calculation of the quantity
22
85 using
the Algebraic operating mode, first with the Real CAS option selected. In this
case, you are asked if you want to change the mode to Complex:
Page C-7
If you press the OK soft menu key (), then the _Complex option is forced, and
the result is the following:
The keystrokes used above are the following:
R„Ü5„Q2+ 8„Q2`
When asked to change to COMPLEX mode, use:F. If you decide not to
accept the change to COMPLEX mode, you get the following error message:
Verbose vs. non-verbose CAS mode
When the _Verbose CAS option is selected, certain calculus applications are
provided with comment lines in the main display. If the _Verbose CAS option
is not selected, then those calculus applications will show no comment lines.
The comment lines will appear momentarily in the top lines of the display
while the operation is being calculated.
Step-by-step CAS mode
When the _Step/step CAS option is selected, certain operations will be
shown step at a time in the display. If the _Step/step CAS option is not
selected, then intermediate steps will not be shown.
Page C-8
For example, having selected the Step/step option, the following screens
show the step-by-step division of two polynomials, namely, (X
3
-5X
2
+3X-2)/(X-
2). This is accomplished by using function DIV2 as shown below. Press `
to show the first step:
The screen inform us that the calculator is operating a division of polynomials
A/B, so that A = BQ + R, where Q = quotient, and R = remainder. For the
case under consideration, A = X
3
-5X
2
+3X-2, and B = X-2. These polynomials
are represented in the screen by lists of their coefficients. For example, the
expression A: {1,-5,3,-2} represents the polynomial A = X
3
-5X
2
+3X-2, B:{1,-2}
represents the polynomial B = X-2, Q: {1} represents the polynomial Q = X,
and R:{-3,3,-2} represents the polynomial R = -3X
2
+3X-2.
At this point, press, for example, the ` key. Continue pressing ` the key
to produce additional steps:
Thus, the intermediate steps shown represent the coefficients of the quotient
and residual of the step-by-step synthetic division as would have been
performed by hand, i.e.,
=
+
+=
+
2
233
2
235
2
2
23
X
XX
X
X
XXX
Page C-9
2
8
33
2
23
3
22
=
+
X
XXX
X
X
XX
.
Increasing-power CAS mode
When the _Incr pow CAS option is selected, polynomials will be listed so that
the terms will have increasing powers of the independent variable. If the _Incr
pow CAS option is not selected (default value) then polynomials will be listed
so that the terms will have decreasing powers of the independent variable.
An example is shown next in Algebraic mode:
In the first case, the polynomial (X+3)
5
is expanded in increasing order of the
powers of X, while in the second case, the polynomial shows decreasing
order of the powers of X. The keystrokes in both cases are the following:
„Üx+3™Q5`
In the first case the _Incr pow option was selected, while in the second it was
not selected. The same example, in RPN notation, is shown below:
The same keystroke sequence was used to produce each of these results:
³„Üx+3™Q5`µ
Rigorous CAS setting
Page C-10
When the _Rigorous CAS option is selected, the algebraic expression |X|,
i.e., the absolute value, is not simplified to X. If the _Rigorous CAS option is
not selected, the algebraic expression |X| is simplified to X.
The CAS can solve a larger variety of problems if the rigorous mode is not set.
However, the result, or the domain in which the result are applicable, might
be more limited.
Simplify non-rational CAS setting
When the _Simp Non-Rational CAS option is selected, non-rational
expressions will be automatically simplified. On the other hand, if the _Simp
Non-Rational CAS option is not selected, non-rational expressions will not be
automatically simplified.
Using the CAS HELP facility
Turn on the calculator, and press the I key to activate the TOOL menu.
Next, press the Bsoft menu key, followed by the ` key (the key in the
lowest right corner of the keyboard), to activate the HELP facility. The display
will look as follows:
At this point you will be provided with a list of all CAS commands in
alphabetical order. You can use the down arrow key, ˜, to navigate
through the list. To move upwards in the list use the up arrow key, . The
arrow keys are located on the right-hand side of the keyboard between the
first and fourth rows of keys.
Suppose that you want to find information on the command ATAN2S
(ArcTANgent-to-Sine function). Press the down arrow key, ˜, until the
command ATAN2S is highlighted in the list:
Page C-11
Notice that, in this instance, soft menu keys E and F are the only one
with associated commands, namely:
!!CANCL E CANCeL the help facility
!!@@OK#@ F OK to activate help facility for the selected command
If you press the !!CANCL E key, the HELP facility is skipped, and the calculator
returns to normal display.
To see the effect of using !!@@OK#@ in the HELP facility, let’s repeat the steps used
above from to the selection of the command ATAN2S in the list of CAS
commands: @HELP B` ˜ ˜ …(10 times)
Then, press the !!@@OK#@ F key to obtain information about the command
ATAN2S.
The help facility indicates that the command, or function, ATAN2S replaces
the value of atan(x), the arc tangent of a value x, by its equivalent in terms of
the function asin (arcsine), i.e.,
The fourth and fifth lines in the display provide an example of application of
the function ATAN2S. Line four, namely, ATAN2S(ATAN(X)), is the statement
of the operation to be performed, while line five, namely, ASIN(X/(X^2+1)),
is the result.
The bottom line in the display, starting with the particle See:, is a reference
line listing other CAS commands related to the command ATAN2S.
Notice that there are six commands associated with the soft menu keys in this
case (you can check that there are only six commands because pressing the
Page C-12
L produces no additional menu items). The soft menu key commands are
the following:
@EXIT A EXIT the help facility
@ECHO B Copy the example command to the stack and exit
@@ SEE1@@ C See the first link (if any) in the list of references
@@SEE2@ D See the second link (if any) of the list of references
!@@SEE3@ E See the third link (if any) of the list of references
@!MAIN F Return to the MAIN command list in the help facility
In this case we want to ECHO the example into the stack by pressing
@ECHO B. The resulting display is the following:
There are now four lines of the display occupied with output. The first two
lines from the top correspond to the first exercise with the HELP facility in
which we cancel the request for help. The third line from the top shows the
most recent call to the HELP facility, while the last line shows the ECHO of the
example command. To activate the command press the ` key. The result
is:
Notice that, as new lines of output are produced, the display (or stack) pushes
the existing lines upwards and fills the bottom of the screen with more output.
The HELP facility, described in this section, will be very useful to refer to the
definition of the many CAS commands available in the calculator. Each entry
in the CAS help facility, whenever appropriate, will have an example of
application of the command, as well as references as shown in this example.
Page C-13
To navigate quickly to a particular command in the help facility list without
having to use the arrow keys all the time, we can use a shortcut consisting of
typing the first letter in the command’s name. Suppose that we want to find
information on the command IBP (Integration By Parts), once the help facility
list is available, use the ~ key (first key in the fourth row from the bottom of
the keyboard) followed by the key for the letter i (the same as the key I) ,
i.e., ~i. This will take you automatically to the first command that starts
with an i, namely, IBASIS. Then, you can use the down arrow key ˜ ,
twice, to find the command IBP. Pressing the !!@@OK#@ F key, we activate the
help facility for this command. Press @!MAIN F to recover the main list of
commands, or @EXIT A to exit the facility.
References for non-CAS commands
The help facility contains entries for all the commands developed for the CAS
(Computer Algebraic System). There is a large number of other functions and
commands that were originally developed for the HP 48G series calculators
that are not included in the help facility. Good references for those
commands are the HP 48G Series user’s guide (HP Part No. 00048-90126)
and the HP 48G Series Advanced User’s Reference Manual (HP Part No.
00048-90136) both published by Hewlett-Packard Company, Corvallis,
Oregon, in 1993.
CAS End User Term and Conditions
Use of the CAS Software requires from the user an appropriate mathematical
knowledge. There is no warranty for the CAS Software, to the extent permitted
by applicable law. Except when otherwise stated in writing the copyright
holder provides the CAS Software "As Is" without warranty of any kind, either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose. The entire risk as to the
quality and performance of the CAS Software is with you. Should the CAS
Software prove defective, you assume the cost of all necessary servicing,
repair or correction.
Page C-14
In no event unless required by applicable law will any copyright holder be
liable to you for damages, including any general, special, incidental or
consequential damages arising out of the use or inability to use the
CAS Software (including but not limited to loss of data or data being rendered
inaccurate or losses sustained by you or third parties or a failure of the CAS
Software to operate with any other programs), even if such holder or other
party has been advised of the possibility of such damages. If required by
applicable law the maximum amount payable for damages by the copyright
holder shall not exceed the royalty amount paid by Hewlett-Packard to the
copyright holder for the CAS Software.
Page D-1
Appendix D
Additional character set
While you can use any of the upper-case and lower-case English letter from
the keyboard, there are 255 characters usable in the calculator. Including
special characters like θ, λ, etc., that that can be used in algebraic
expressions. To access these characters we use the keystroke
combination …± (associated with the EVAL key). The result is the
following screen:
By using the arrow keys, š™˜—, we can navigate through the
collection of characters. For example, moving downwards in the screen
produces more characters in the display:
Moving farther down, we see these characters:
There will be one character highlighted at all times. The lower line in the
display will show the short cut for the highlighted character, as well as the
ASCII character code (e.g., see the screen above: the short cut is αDα9,
Page D-2
i.e., ~„d~…9, and the code is 240). The display also shows
three functions associated with the soft menu keys, f4, f5, and f6. These
functions are:
@MODIF: Opens a graphics screen where the user can modify highlighted
character. Use this option carefully, since it will alter the modified character
up to the next reset of the calculator. (Imagine the effect of changing the
graphic of the character 1 to look like a 2!).
@ECHO1: Copies the highlighted character to the command line or equation
writer (EQW) and exits the character set screen (i.e., echoes a single
character to the stack).
@ECHO: Copies the highlighted character to the command line or equation writer
(EQW), but the cursor remains in the character set screen to allow the user to
select additional characters (i.e., echoes a string of characters to the stack).
To exit the character set screen press `.
For example, suppose you have to type the expression: λ
2
+ 2µ + 5
Here is a suggested approach, using the stack in either Algebraic or RPN
mode:
Use the keystrokes: ³…±to get to the characters screen. Next, use the
arrow keys to highlight the character λ. Press @ECHO1 (i.e., the E key), and
continue with the keystrokes: + 2 *…±. Next, use the arrow
keys to highlight the character µ. Press @ECHO1 (i.e., the E key), and finish
the expression with the keystrokes: +5`. Here is the result of this
exercise in Algebraic and RPN modes, respectively:
Following, we list some of the most common ~‚keystroke combinations:
Page D-3
Greek letters
α (alpha) ~‚a
β (beta) ~‚b
δ (delta) ~‚d
ε (epsilon) ~‚e
θ (theta) ~‚t
λ (lambda) ~‚n
µ (mu) ~‚m
ρ (rho) ~‚f
σ (sigma) ~‚s
τ (tau) ~‚u
ω (omega) ~‚v
(upper-case delta) ~‚c
Π (upper-case pi) ~‚p
Other characters
~ (tilde) ~‚1
! (factorial) ~‚2
? (question mark) ) ~‚3
\ (backward slash) ~‚5
(angle symbol) ~‚6
@ (at) ~‚`
Some characters commonly used that do not have simple keystroke shortcuts
are: x (x bar), γ (gamma), η (eta),(upper-case omega). These characters
can be “echoed” from the CHARS screen: …±.
Page E-1
Appendix E
The Selection Tree in the Equation Writer
The expression tree is a diagram showing how the Equation Writer interprets
an expression. The form of the expression tree is determined by a number of
rules known as the hierarchy of operation. The rules are as follows:
1. Operations in parentheses are executed first, from the innermost to
the outermost parentheses, and from left to right in the expression.
2. Arguments of functions are executed next, from left to right.
3. Functions are executed next, from left to right.
4. Powers of numbers are executed next, from left to right.
5. Multiplications and divisions are executed next, from left to right.
6. Additions and subtraction are executed last, from left to right.
Execution from left to right means that, if two operations of the same hierarchy,
say two multiplications, exist in an expression, the first multiplication to the left
will be executed before the second, and so on.
Consider, for example, the expression shown below in the equation writer:
The insertion cursor () at this point is located to the right of the 2 in the
argument of the SIN function in the denominator. Press the down arrow key
˜to trigger the clear, editing cursor () around the 2 in the denominator.
Next, press the left arrow key š, continuously, until the clear, editing cursor
is around the y in the first factor in the denominator. Then, press the upper-
arrow key to activate the selection cursor () around the y. By pressing the
upper arrow key , continuously, we can follow the expression tree that will
take use from the y to the completion of the expression. Here is the sequence
of operations highlighted by the upper arrow key:
Page G-2
Set/clear system flag 117 (CHOOSE boxes vs. SOFT menus):
H @)FLAGS —„ —˜
In ALG mode,
SF(-117) selects SOFT menus
CF(-117) selects CHOOSE BOXES.
In RPN mode,
117 \` SF selects SOFT menus
117 \` CF selects SOFT menus
Change angular measure:
o To degrees: ~~deg`
o To radian: ~~rad`
Special characters:
o Angle symbol (): ~‚6
o Factorial symbol (!): ~‚2
o Degree symbol (
o
): ~‚(hold)6
Lock/unlock alpha keyboard:
o Lock alpha keyboard (upper case): ~~
o Unlock alpha keyboard (upper case): ~
o Lock alpha keyboard (lower case): ~~„~
o Unlock alpha keyboard (lower case): „~~
Greek letters:
Alpha (α): ~‚a Beta (β): ~‚b
DELTA (): ~‚c Delta (d): ~‚d
Epsilon (ε): ~‚e Rho (ρ): ~‚f
Mu (µ): ~‚m Lambda (λ): ~‚n
PI (Π): ~‚p Sigma (σ): ~‚s
Theta (θ): ~‚t Tau (t): ~‚u
Omega (ω): ~‚v
@CHK@
Page G-3
System-level operation (Hold $, release it after entering second or
third key):
o $ (hold) AF: “Cold” restart - all memory erased
o $ (hold) B: Cancels keystroke
o $ (hold) C: “Warm” restart - memory preserved
o $ (hold) D: Starts interactive self-test
o $ (hold) E: Starts continuous self-test
o $ (hold) #: Deep-sleep shutdown - timer off
o $ (hold) A: Performs display screen dump
o $ (hold) D: Cancels next repeating alarm
Menus not accessible through keyboard: In RPN, enter menu_number,
type MENU. In ALG mode, type MENU(menu_number).
Menu_number is one of the following:
o STAT soft menu: 96
o PLOT soft menu: 81
o SOLVE soft menu: 74, or use (hold) 7
o UTILITY soft menu: 113
Other menus:
o MATHS menu: ~~maths`
o MAIN menu: ~~main`
Other keyboard short cuts:
o (hold) 7 : SOLVE menu (menu 74)
o (hold) H : PRG/MODES menu (Chapter 21)
o (hold) ˜ : Starts text editor (Appendix L)
o (hold) § : HOME(), go to HOME directory
o (hold) « : Recover last active menu
o (hold) ˜ : List contents of variables or menu entries
o (hold) ± : PRG/CHAR menu (Chapter 21)
Page H-1
Appendix H
The CAS help facility
The CAS help facility is available through the keystroke sequence I
L@HELP `. The following screen shots show the first menu page in the
listing of the CAS help facility.
The commands are listed in alphabetical order. Using the vertical arrow
keys —˜ one can navigate through the help facility list. Some useful
hints on navigating through this facility are shown next:
You can hold down the down arrow key ˜ and watch the screen
until the command you’re looking for shows up in the screen. At this
point, you can release the down arrow key. Most likely the command
of interest will not be selected at this point (you may overshoot or
undershoot it). However, you can use the vertical keys —˜, one
stroke at a time, to locate the command you want, and then press
@@OK@@.
If, while holding down the down arrow key ˜ you overshoot the
command of interest, you can hold down the up arrow key to
move back towards that command. Refine the selection with the
vertical keys —˜, one stroke at a time.
You can type the first letter of the command of interest, and then use
the down arrow key ˜ to locate that particular command. For
example, if you’re looking for the command DERIV. After activating
the help facility (I L@HELP `), type ~d. This will select
the first of the commands that start with D, i.e., DEGREE. To find
DERIV, press ˜, twice. To activate the command, press @@OK@@.
Page H-2
You can type two or more letters of the command of interest, by
locking the alphabetic keyboard. This will take you to the command
of interest, or to its neighborhood. Afterwards, you need to unlock
the alpha keyboard, and use the vertical arrow keys —˜ to
locate the command, if needed. Press @@OK@@ to locate the to activate
the command. For example, to locate the command PROPFRAC,
you can use, one of the following keystroke sequences:
I L@HELP ` ~~pr ~ ˜˜@@OK@@
I L@HELP ` ~~pro ~ ˜@@OK@@
I L@HELP ` ~~prop ~ @@OK@@
See Appendix C for more information on the CAS (Computer Algebraic
System). Appendix C includes other examples of application of the CAS help
facility.
Page I-1
Appendix I
Command catalog list
This is a list of all commands in the command catalog (‚N). Those
commands that belong to the CAS (Computer Algebraic System) are listed
also in Appendix H. CAS help facility entries are available for a given
command if the soft menu key @HELP shows up when you highlight that
particular command. Press this soft menu key to get the CAS help facility
entry for the command. The first few screens of the catalog are shown below:
User-installed library commands would also appear on the command
catalog list, using italic font. If the library includes a help item, then the soft
menu key @HELP shows up when you highlight those user-created commands.
Page J-1
Appendix J
The MATHS menu
The MATHS menu, accessible through the command MATHS (available in the
catalog N), contains the following sub-menus:
The CMPLX sub-menu
The CMPLX sub-menu contains functions pertinent to operations with complex
numbers:
These functions are described in Chapter 4.
The CONSTANTS sub-menu
The CONSTANTS sub-menu provides access to the calculator mathematical
constants. These are described in Chapter 3:
Page J-2
The HYPERBOLIC sub-menu
The HYPERBOLIC sub-menu contains the hyperbolic functions and their
inverses. These functions are described in Chapter 3.
The INTEGER sub-menu
The INTEGER sub-menu provides functions for manipulating integer numbers
and some polynomials. These functions are presented in Chapter 5:
The MODULAR sub-menu
The MODULAR sub-menu provides functions for modular arithmetic with
numbers and polynomials. These functions are presented in Chapter 5:
Page J-3
The POLYNOMIAL sub-menu
The POLYNOMIAL sub-menu includes functions for generating and
manipulating polynomials. These functions are presented in Chapter 5:
The TESTS sub-menu
The TESTS sub-menu includes relational operators (e.g., ==, <, etc.), logical
operators (e.g., AND, OR, etc.), the IFTE function, and the ASSUME and
UNASSUME commands.
Relational and logical operators are presented in Chapter 21 in the context of
programming the calculator in User RPL language. The IFTE function is
introduced in Chapter 3. Functions ASSUME and UNASSUME are presented
next, using their CAS help facility entries (see Appendix C).
ASSUME UNASSUME
Page K-1
Appendix K
The MAIN menu
The MAIN menu is available in the command catalog. This menu include the
following sub-menus:
The CASCFG command
This is the first entry in the MAIN menu. This command configures the CAS.
For CAS configuration information see Appendix C.
The ALGB sub-menu
The ALGB sub-menu includes the following commands:
These functions, except for 0.MAIN MENU and 11.UNASSIGN are available
in the ALG keyboard menu (‚×). Detailed explanation of these
functions can be found in Chapter 5. Function UNASSIGN is described in
the following entry from the CAS menu:
Page K-2
The DIFF sub-menu
The DIFF sub-menu contains the following functions:
These functions are also available through the CALC/DIFF sub-menu (start with
„Ö). These functions are described in Chapters 13, 14, and 15, except
for function TRUNC, which is described next using its CAS help facility entry:
The MATHS sub-menu
The MATHS menu is described in detail in Appendix J.
The TRIGO sub-menu
The TRIGO menu contains the following functions:
These functions are also available in the TRIG menu (‚Ñ). Description of
these functions is included in Chapter 5.
Page K-3
The SOLVER sub-menu
The SOLVER menu includes the following functions:
These functions are available in the CALC/SOLVE menu (start with „Ö).
The functions are described in Chapters 6, 11, and 16.
The CMPLX sub-menu
The CMPLX menu includes the following functions:
The CMPLX menu is also available in the keyboard (‚ß). Some of the
functions in CMPLX are also available in the MTH/COMPLEX menu (start with
„´). Complex number functions are presented in Chapter 4.
The ARIT sub-menu
The ARIT menu includes the following sub-menus:
The sub-menus INTEGER, MODULAR, and POLYNOMIAL are presented in
detail in Appendix J.
Page K-4
The EXP&LN sub-menu
The EXP&LN menu contains the following functions:
This menu is also accessible through the keyboard by using „Ð. The
functions in this menu are presented in Chapter 5.
The MATR sub-menu
The MATR menu contains the following functions:
These functions are also available through the MATRICES menu in the
keyboard („Ø). The functions are described in Chapters 10 and 11.
The REWRITE sub-menu
The REWRITE menu contains the following functions:
Page K-5
These functions are available through the CONVERT/REWRITE menu (start
with „Ú). The functions are presented in Chapter 5, except for
functions XNUM and XQ, which are described next using the corresponding
entries in the CAS help facility (IL@HELP ):
XNUM XQ
Page L-1
Appendix L
Line editor commands
When you trigger the line editor by using „˜ in the RPN stack or in ALG
mode, the following soft menu functions are provided (press L to see the
remaining functions):
The functions are briefly described as follows:
SKIP: Skips characters to beginning of word.
SKIP: Skips characters to end of word.
DEL: Delete characters to beginning of word.
DEL: Delete characters to end of word.
DEL L: Delete characters in line.
INS: When selected inserts characters at cursor location. If not selected,
the cursor replaces characters (overwrites) instead of inserting
characters.
EDIT: Edits selection.
BEG: Move to beginning of word.
END: Mark end of selection.
INFO: Provides information on Command Line editor, e.g.,
Page L-2
The items show in this screen are self-explanatory. For example, X and Y
positions mean the position on a line (X) and the line number (Y). Stk Size
means the number of objects in the ALG mode history or in the RPN stack.
Mem(KB) means the amount of free memory. Clip Size is the number of
characters in the clipboard. Sel Size is the number of characters in the current
selection.
EXEC: Execute command selected.
HALT: Stop command execution.
The line editor also provide the following sub-menus:
SEARCH: Search characters or words in the command line. It includes the
following functions:
GOTO: Move to a desired location in the command line. It includes the
following functions:
Style: Text styles that can be used in the command line:
Page M-5
DIV2MOD, 5-12
DIV2MOD, 5-15
Divergence, 15-4
DIVIS, 5-10
DIVMOD, 5-12
DIVMOD, 5-15
DO construct, 21-61
DOERR, 21-64
DOLIST, 8-12
DOMAIN, 13-9
DOSUBS, 8-11
DOT, 9-11
Dot product, 9-11
DOT+ DOT-, 12-45
Double integrals, 14-6
DRAW, 12-21, 22-4
DRAW3DMATRIX, 12-54
Drawing functions programs, 22-22
DRAX, 22-4
DROITE, 4-9
DROP, 9-21
DTAG, 23-1
E
e, 3-16,
EDIT, 2-33
EDIT, L-1
Editor commands, L-1
EGCD, 5-19
EGDC, 5-11
EGV, 11-46
EGVL, 11-45
Eigenvalues, 11-9, 11-44
Eigenvectors, 11-9, 11-44
Electric units, 3-20
END, 2-26
ENDSUB, 8-11
Energy units, 3-19
Engineering format, 1-20
ENGL, 3-29
Entering vectors, 9-2
EPS, 2-35
EPSX0, 5-23
EQ, 6-28
Equation Writer (EQW), 2-10
Equation writer properties, 1-28
Equation Writer, Selection Tree,
E-1
Equations, linear systems, 11-16
EQW: BIG, 2-11
EQW: CMDS, 2-11
EQW: CURS, 2-11,
EQW: Derivatives, 2-30
EQW: EDIT, 2-11
EQW: EVAL, 2-11
EQW: FACTOR, 2-11
EQW: HELP, 2-11
EQW: Integrals, 2-31
EQW: SIMPLIFY, 2-11
EQW: Summations, 2-28
ERASE, 12-21, 12-58, 22-4
ERR0, 21-65
ERRM, 21-65
ERRN, 21-64
Error trapping in programming,
21-64
Errors in hypothesis testing, 18-35
Errors in programming, 21-64
EULER, 5-10
Euler constant, 16-56
Euler equation, 16-53
Euler formula, 4-1
Page M-6
EVAL, 2-5
Exact CAS mode, C-4
EXEC, L-2
EXP, 3-6
EXP2POW, 5-29
EXPAND, 5-5
EXPANDMOD, 5-12
EXPLN, 5-8
EXPLN, 5-29
EXPM, 3-9
Exponential distribution, 17-7
Extrema, 13-12
Extreme points, 13-12
EYEPT, 22-10
F
F distribution, 17-12
FACTOR, 2-10
Factorial, 3-14
Factorial symbol(!), G-2
Factoring an expression, 2-24
FACTORMOD, 5-12
FACTORS, 5-10
FANNING, 3-31
Fast 3D plots, 12-35
Fast Fourier transform, 16-49
Fast Replace All, L-3
FCOEF, 5-11
FDISTRIB, 5-29
FFT, 16-49
Fields, 15-1
File manager.. menu.., F-4
FILES, 2-32
Financial calculations, 6-9
Find next.., L-3
Finite arithmetic ring, 5-14
Finite population, 18-3
Fitting data, 18-10
Fixed format, 1-18
Flags, 24-1
FLOOR, 3-14
FOR construct, 21-59
Force units, 3-19
FOURIER, 16-27
Fourier series, 16-27
Fourier series and ODEs, 16-42
Fourier series for square wave, 16-40
Fourier series for triangular wave,
16-35
Fourier series, complex, 16-27
Fourier transforms, 16-43
Fourier transforms, convolution,
16-49
Fourier transforms, definitions,
16-46
FP, 3-14
Fractions, 5-24
Frequency distribution, 18-5
Frobenius norm, 11-17
FROOTS, 5-11
FROOTS, 5-26
Full pivoting, 11-34, 11-39
Function definition, 3-36
Function plot, 12-2
FUNCTION plot operation, 12-13
FUNCTION plots, 12-6
Function, table of values, 12-17,
12-26
Functions, multi-variate, 14-1
Fundamental theorem of algebra,
6-7
Page M-7
G
GAMMA, 3-15
Gamma distribution, 17-6
GAUSS, 11-53
Gaussian elimination, 11-28
Gauss-Jordan elimination, 11-28
11-37 11-39
GCD, 5-11, 5-19
GCDMOD, 5-12
Geometric mean, 18-3
Geometric mean, 8-16
GET, 10-6
GETI, 8-11
Global variable scope, 21-4
Global variable, 21-2
GOR, 22-32
Goto Line, L-4
GOTO menu, L-2 L-3
Goto Position, L-4
Grades, 1-22
Gradient, 15-1
Graphic objects, 22-30
Graphical solution of ODEs, 16-60
Graphics animation, 22-26
Graphics options, 12-1
Graphics programming, 22-1
Graphs, 12-1
Graphs polar, 12-19
Graphs conic curves, 12-21
Graphs parametric, 12-23
Graphs differential equations, 12-26
Graphs truth plots, 12-29
Graphs bar plots, 12-30
Graphs histograms, 12-30
Graphs scatterplots, 12-30
Graphs slope fields, 12-34
Graphs Fast 3D plots, 12-35
Graphs wireframe plots, 12-34
Graphs Ps-Contour plots, 12-39
Graphs Y-Slice plots, 12-41
Graphs Gridmap plots, 12-42
Graphs Pr-Surface plots, 12-43
Graphs Zooming, 12-49
Graphs SYMBOLIC menu, 12-51
Graphs saving, 12-7
GRD, 3-1
Greek letters, D-3, G-2
Gridmap plots, 12-42
GROB, 22-30
GROB programming, 22-33
GROB menu, 22-31
GROBADD, 12-52
Grouped data, 8-18
Grouped data statistics, 8-18
Grouped data variance, 8-18
GXOR, 22-32
H
HADAMARD, 11-5
HALT, L-2
Harmonic mean, 8-15
HEAD, 8-11
Header size, 1-29
Heaviside's step function, 16-15
HELP, 2-26
HERMITE, 5-11, 5-20
Hermite polynomials, 16-60
HESS, 15-2
Hessian matrix, 15-2
HEX, 19-2
HEX, 3-1
Hexadecimal numbers, 19-7
Page M-8
Higher-order derivatives, 13-13
Higher-order partial derivatives,
14-3
HILBERT, 10-14
Histograms, 12-30
HMS-, 25-3
HMS+, 25-3
HMS-->, 25-3
HORNER, 5-11, 5-20
H-VIEW, 12-20
Hyperbolic functions graphs, 12-
16
Hypothesis testing, 18-34
Hypothesis testing errors, 18-35
Hypothesis testing in linear
regression, 18-52
Hypothesis testing in the calculator,
18-42
Hypothesis testing on variances,
18-46
HZIN, 12-50
HZOUT, 12-50
I
i, 3-16
I/O functions menu, F-2
IR, 5-28
IABCUV, 5-11
IBERNOULLI, 5-11
ICHINREM, 5-11
Identity matrix, 10-1
Identity matrix, 11-6
IDIV2, 5-11
IDN, 10-9
IEGCD, 5-11
IF...THEN..ELSE...END, 21-48
IF...THEN..END, 21-47
IFERR sub-menu, 21-65
IFTE, 3-35
ILAP, 16-11
Illumination units, 3-20
IM, 4-6
IMAGE, 11-54
Imaginary part, 4-1
Implicit derivatives, 13-7
Improper integrals, 13-21
Increasing-power CAS mode, C-9
INDEP, 22-6,
Independent variable in CAS, C-2,
Infinite series, 13-21, 13-23
INFO, 22-4
INPUT, 21-22 ,
Input forms programming, 21-21
Input forms use of A-1
Input string prompt programming,
21-21
Input-output functions menu, F-2
INS , L-1
INT, 13-14
Integer numbers, C-5
Integers, 2-1
Integrals, 13-14
Integrals definite, 13-15
Integrals step-by-step, 13-17
Integrals improper, 13-21
Integrals double, 14-6
Integrals multiple, 14-6
Integration change of variable, 13-19
Integration substitution, 13-18
Integration techniques, 13-18
Integration by partial fractions, 13-20
Integration by parts, 13-19
Page M-9
Interactive drawing, 12-43
Interactive input programming, 21-19
Interactive plots with PLOT menu,
22-15
Interactive self-test, G-3
INTVX, 13-14
INV, 4-4
INV, L-4
Inverse cdf’s, 17-14
Inverse cumulative distribution
functions, 17-13
Inverse function graph, 12-12
Inverse Laplace transforms, 16-10
Inverse matrix, 11-6
INVMOD, 5-12
IP, 3-14
IQUOT, 5-11
IREMAINDER, 5-11
Irrotational fields, 15-5
ISECT in plots, 12-7
ISOL, 6-1
ISOM, 11-54
ISPRIME? , 5-11
ITALI, L-4
J
Jacobian, 14-7
JORDAN, 11-47
K
KER, 11-55
Key Click, 1-23
Keyboard, 1-10, B-1
Keyboard main key functions B-2
Keyboard alternate key functions
B-4
Keyboard left-shift functions B-5
Keyboard right-shift functions B-8
Keyboard ALPHA characters B-9
Keyboard ALPHA-left-shift
characters B-10
Keyboard ALPHA-right-shift
characters, B-12
Keyboard ALPHA function, 1-12
Keyboard left-shift function, 1-12
Keyboard main function, 1-12
Keyboard right-shift function, 1-12
Kronecker's delta, 10-1
L
LABEL, 12-47
Labels, L-4
LAGRANGE, 5-11, 5-21
Laguerre's equation, 16-60
LAP, 16-11
LAPL, 15-4
Laplace transforms, 16-10
Laplace transforms inverse, 16-10
Laplace transforms and ODEs, 16-17
Laplace transforms theorems, 16-12
Laplace's equation, 15-4
Laplacian, 15-4
Last Stack, 1-24
LCM, 5-11
LCM, 5-21,
LCXM, 11-1
LDEC, 16-4
Least-square function, 11-23
Least-square method, 18-49
Left-shift functions, B-5
Page M-10
LEGENDRE, 5-11, 5-22
Legendre's equation, 16-54
Length units, 3-18
LGCD, 5-10
lim, 13-2
Limits, 13-1
LIN, 5-5
LINE, 12-46
Line editor commands, L-1
Line editor properties, 1-26
Linear algebra, 11-1
Linear applications, 11-54
Linear differential equations, 16-4
Linear regression confidence
intervals, 18-52
Linear regression hypothesis
testing, 18-52
Linear regression additional notes,
18-49
Linear regression prediction error,
18-51
Linear system of equations, 11-16
Linearized relationships, 18-11
LINSOLVE, 11-40
LIST, 2-33
LIST menu, 8-8
List of CAS help facility, H-1
List of command catalog, I-1
Lists, 8-1
LN, 3-5
Ln(X) graph, 12-9
LNCOLLECT, 5-5
LNP1, 3-9,
Local variables, 21-2
LOG, 3-5
LOGIC menu, 19-5
Logical operators, 21-43
Lower-triangular matrix, 11-49
LQ, 11-51
LQ decomposition, 11-51
LSQ, 11-23
LU, 11-49
LU decomposition, 11-49
LVARI, 7-12
M
Maclaurin series, 13-21
MAD, 11-47
Main diagonal, 10-1
MAIN menu, G-3 K-1
MAIN/ALGB menu, K-1
MAIN/ARIT menu, K-3
MAIN/CASCFG command, K-1
MAIN/CMPLX menu, K-3
MAIN/DIFF menu, K-2
MAIN/EXP&LN menu, K-4
MAIN/MATHS menu (MATHS
menu), J-1
MAIN/MATR menu, K-4
MAIN/REWRITE menu, K-4
MAIN/SOLVER menu, K-3
MAIN/TRIGO menu, K-2
Manning's equation, 21-19
MANT, 3-14
MAP, 8-12
MARK, 12-46
Mass units, 3-19
Math menu .., F-5
MATHS menu, G-3 J-1
MATHS/CMPLX menu, J-1
MATHS/CONSTANTS menu, J-1
MATHS/HYPERBOLIC menu, J-2
Page M-11
MATHS/INTEGER menu, J-2
MATHS/MODULAR menu, J-2
MATHS/POLYNOMIAL menu, J-3
MATHS/TESTS menu, J-3
Matrices, 10-1
Matrix, 10-1
Matrix augmented, 11-30
Matrix Jordan-circle decomposition
11-54
Matrix "division", 11-26
Matrix Writer, 10-2
Matrix factorization, 11-49
MATRIX menu, 10-3
Matrix multiplication, 11-2
Matrix operations, 11-1
Matrix quadratic forms, 11-51
Matrix term-by-term multiplication,
11-5,
Matrix transpose, 10-1,
Matrix writer, 9-3 ,
MATRIX/MAKE menu, 10-3,
Matrix-vector multiplication, 11-3,
MAX, 3-13,
Maximum, 13-13,
Maximum, 14-5,
MAXR, 3-16,
Mean, 18-3,
Measures of central tendency,
18-3
Measures of spreading, 18-3
Median, 18-3
MENU, 12-47
Menu numbers, 20-2
Menus, 1-3
Menus not accessible through
keyboard, G-3
MES, 7-10
Message box programming,
21-37
Method of least squares, 18-50
MIN, 3-13
Minimum, 13-12
Minimum, 14-5
MINIT, 7-13
MINR, 3-16
MITM, 7-12
MKSISOM, 11-55
MOD, 3-13
Mode, 18-4
MODL, 22-13
MODSTO, 5-12
Modular arithmetic, 5-12
Modular inverse, 5-17
Modular programming, 22-36
MODULO, 2-35
Modulus in CAS, C-3
Moment of a force, 9-17
MSGBOX, 21-31
MSLV, 7-4
MSOLV, 7-13
MTH menu, 3-7
MTH/LIST menu, 8-8
MTH/PROBABILITY menu, 17-1
MTH/VECTOR menu, 9-10
MTRW, 9-3
Multiple integrals, 14-6
Multiple linear fitting, 18-56
Multi-variate calculus, 14-1
MULTMOD, 5-12
N
NDIST, 17-10
Page M-12
NEG, 4-6
Nested IF...THEN..ELSE..END,
21-49
NEW, 2-33
NEXt eQuation, 12-6
NEXTPRIME, 5-11
Non-CAS commands, C-13
Non-linear differential equations,
16-4
Non-verbose CAS mode, C-7
NORM menu, 11-6
Normal distribution, 17-10
Normal distribution standard,
17-17
Normal distribution cdf, 17-10
NOT, 19-6
NSUB, 8-12
NUM, 23-1
NUM.SLV, 6-14
NUM.SLV input forms, A-1
Number in bases, 19-1
Number format, 1-17
Numeric CAS mode, C-3
Numeric solver menu, F-3
Numeric vs. symbolic CAS mode,
C-3
Numerical solution of ODEs,
16-60
Numerical solution to stiff ODEs,
16-68
Numerical solver, 6-5
NUMX, 22-10
NUMY, 22-10
O
OBJ-->, 9-19
Objects, 2-1
objects, 24-1
OCT, 19-2
Octal numbers, 3-2
ODEs Laplace transform
applications, 16-17
ODEs Fourier series, 16-46
ODEs Graphical solution, 16-60
ODEs Numerical solution, 16-60
ODEs (ordinary differential
equations), 16-1
ODETYPE, 16-8
OFF, 1-2
ON, 1-2
OPER menu, 11-14
Operating mode, 1-13
Operations with units, 3-25
Operators, 3-7
OR, 19-5
ORDER, 2-33
Organizing data, 2-32
Orthogonal matrices, 11-49
Other characters, D-3
Output tagging, 21-33
P
PA2B2, 5-11
Paired sample tests, 18-40
Parametric plots, 12-23
PARTFRAC, 5-5
Partial derivatives, 14-1
Partial derivatives higher-order 14-3
Partial derivatives chain rule 14-4
Partial fractions integration, 13-20
Partial pivoting, 11-33
PASTE, 2-26
Page M-13
PCAR, 11-44
PCOEF, 5-11, 5-22
PDIM, 22-20
Percentiles, 18-14,
PERIOD, 2-35 16-35
PERM, 17-2
Permutation matrix, 11-34
Permutations, 17-1
PEVAL, 5-23
PGDIR, 2-43
Physical constants, 3-28
PICT, 12-8
Pivoting, 11-33
PIX?, 22-22
Pixel coordinates, 22-25
Pixel references, 19-7
PIXOFF, 22-22
PIXON, 22-22
Plane in space, 9-18
PLOT, 12-52
PLOT environment, 12-3
Plot functions menu, F-1
PLOT menu, 22-1
PLOT menu interactive plots, 22-17
PLOT menu (menu 81), G-3
PLOT operations, 12-5
Plot setup, 12-52
PLOT SETUP environment, 12-3
PLOT WINDOW environment, 12-4
PLOT/FLAG menu, 22-14
PLOT/STAT menu, 22-11
PLOT/STAT/DATA menu, 22-12
PLOTADD, 12-52
Plots program-generated, 22-17
Poisson distribution, 17-5
Polar coordinate plot, 12-19
Polar coordinates double integrals,
14-9
Polar plot, 12-19
Polar representation, 4-1
POLY sub-menu, 6-30
Polynomial equations, 6-6
Polynomial fitting, 18-56
Polynomials, 5-18
Population, 18-3
POS, 8-11
POTENTIAL, 15-3
Potential function, 15-3 15-6
Potential of a gradient, 15-3
Power units, 3-20
POWEREXPAND, 5-29
POWMOD, 5-12
PPAR, 12-2, 12-11
Prediction error linear regression,
18-51
Pressure units, 3-20
PREVAL, 13-15
PREVPRIME, 5-11
PRG menu, 21-5
PRG menu shortcuts, 21-10
PRG/MODES/KEYS menu, 20-5
PRG/MODES/MENU menu, 20-1
PRIMIT, 2-35
Probability, 17-1
Probability density function, 17-6
Probability distributions discrete
17-4
Probability distributions continuous,
17-6
Probability distributions for
statistical inference, 17-9
Probability mass function, 17-4
Page M-14
Program branching, 21-46
Program loops, 21-53
Program-generated plots, 22-17
Programming, 21-1
Programming sequential 21-19
Programming interactive input, 21-19
Programming input string prompt,
21-21
Programming debugging, 21-22
Programming choose box, 21-31
Programming output, 21-33
Programming tagged output, 21-34
Programming message box, 21-37
Programming using units, 21-37
Programming error trapping, 21-64
Programming graphics 22-1
Programming drawing functions,
22-24,
Programming modular, 22-36
Programming drawing commands,
22-19
Programming input forms, 21-27
Programming plots, 22-14
Programming with GROBs, 22-33
Programs with drawing functions,
22-24
PROOT, 5-22
PROPFRAC, 5-10, 5-25
Pr-Surface plots, 12-43
Ps-Contour plots, 12-39
PSI, 3-15
Psi, 3-15
PTAYL, 5-11, 5-22
PTYPE, 22-4
PUT, 8-10
PUTI, 10-6
PVIEW, 22-22
PX-->C, 19-7
Q
QR, 11-51
QR decomposition, 11-51
QUADF, 11-52
Quadratic form diagonal
representation, 11-53
QUIT, 3-30
QUOT, 5-11
QUOTIENT, 5-23
QXA, 11-53
R
RB, 19-3
RC, 4-6
RD, 3-14
RI, 5-28
RAD, 3-1
Radians, 1-22
Radiation units, 3-20
RAND, 17-2
Random numbers, 17-2
RANK, 11-10
Rank of a matrix, 11-10
RANM, 10-11
RCI, 10-25
RCIJ, 10-26
RCLKEYS, 20-6
RCLMENU, 20-1
RCWS, 19-4
RDM, 10-10
RDZ, 17-3
RE, 4-6
Page M-15
Real CAS mode, C-6
Real numbers, C-6
Real numbers vs. Integer numbers,
C-6
Real objects, 2-1
Real part, 4-1
REALASSUME, 2-35
RECT, 4-3
RECV, 2-34,
Relational operators, 21-43
REMAINDER, 5-11, 5-23
RENAM, 2-34
REPL, 10-12
Replace, L-3
Replace All, L-3
Replace Selection, L-3
Replace/Find Next, L-3
RES, 22-6
RESET, 22-8
Restart calculator, G-3
RESULTANT, 5-11
Resultant of forces, 9-16
REVLIST, 8-9
REWRITE menu, 5-29
Right-shift functions, B-8 ,
Rigorous CAS mode, C-9
RISCH, 13-14
RKF, 16-71
RKFERR, 16-74
RKFSTEP, 16-72
RL, 19-6
RLB, 19-7
RND, 3-14
RNRM, 11-8
ROOT, 6-27
ROOT in plots, 12-6
ROOT sub-menu, 6-27
ROW-, 10-24
Row norm, 11-8
Row vectors, 9-19
ROW+, 10-24
ROW, 10-23
RPN mode, 1-13
RR, 19-6
RRB, 19-7
REF. RREF, rref, 11-47
RRK, 16-71
RSBERR, 16-74
RSD, 11-43
RSWP, 10-25
RZ, 3-1
S
Saddle point, 14-5,
Sample correlation coefficient,
18-11
Sample covariance, 18-11
Sample vs. population, 18-5
Saving a graph, 12-7
Scalar field, 15-1
SCALE, 22-7
SCALEH, 22-7
SCALEW, 22-7
Scatterplots, 12-32
Scientific format, 1-20
Scope global variable 21-4
SEARCH menu, L-2 L-3
Selection tree in Equation Writer,
E-1
SEND, 2-34
SEQ, 8-11
Sequential programming, 21-15
Page M-16
Series, 13-23
Series Maclaurin, 13-23
Series Taylor, 13-23
SERIES, 13-23
Series Fourier, 16-27
Setting time and date, 25-2
SHADE in plots, 12-6
Shortcuts, G-1
SI, 3-29
SIGMA, 13-14
SIGMAVX, 13-14
SIGN, 3-14
SIGN, 4-6
SIGNTAB, 12-52 13-10
SIMP2, 5-10, 5-24
SIMPLIFY, 5-29
Simplify non-rational CAS setting,
C10
Simplifying an expression, 2-23
SIN, 3-7
Single-variable statistics, 18-2
Singular value decomposition, 11-8
SINH, 3-9
SIZE, 8-10
SIZE, 10-7
SKIP, L-1
SL, 19-6 ,
SLB, 19-7
Slope fields, 12-34
Slope fields for differential
equations, 16-3
SLOPE in plots, 12-7
SNRM, 11-7
SOFT menus, 1-3
SOLVE, 5-5
SOLVE, 6-2, 7-1,
SOLVE menu, 6-27
SOLVE menu (menu 74), G-3
SOLVE/DIFF menu, 16-69
SOLVEVX, 6-4
SOLVR menu, 6-28
SORT, 2-34
Special characters, G-2
Speed units, 3-19
SPHERE, 9-15
SQ, 3-5
Square root, 3-5
Square wave Fourier series 16-39
SR, 19-6
SRAD, 11-9
SRB, 19-7
SREPL, 23-3
SST, 21-35
Stack properties, 1-27
Standard deviation, 18-4
Standard format, 1-17
Standard normal distribution, 17-
17,
START ..STEP construct, 21-58
START...NEXT construct, 21-54
STAT menu, 18-15
STAT menu (menu 96), G-3
Statistical inference probability
distributions, 17-9
Statistics, 18-1
Step function (Heaviside's ), 16-15
Step-by-step CAS mode, C-7
Step-by-step derivatives, 13-16
Step-by-step integrals, 13-16
STEQ, 6-14
Stiff differential equations, 16-71
Stiff ODE, 16-68
Page M-17
Stiff ODEs numerical solution, 16-69
Strings, 23-1
STO, 2-46
STOALARM, 25-4
STOKEYS, 20-6
STREAM, 8-12
String concatenation, 23-2
Student t distribution, 17-11
STURM, 5-11
STURMAB, 5-11
STWS, 19-4
Style menu, L-4
SUB, 10-11
Sub-directories creating, 2-38
Sub-directories deleting, 2-42
Sub-expressions, 2-17
SUBST, 5-5
SUBTMOD, 5-12
SUBTMOD, 5-16
Sum of squared errors (SSE),
18-62
Sum of squared totals (SST), 18-62,
Summary statistics, 18-13
SVD, 11-50
SVL, 11-50
SYLVESTER, 11-53
SYMB/GRAPH menu, 12-52
Symbolic CAS mode, C-3
SYMBOLIC menu, 12-51
Synthetic division, 5-26,
SYST2MAT, 11-42,
System flag
(EXACT/APPROX), G-1,
System flag 117 (CHOOSE/SOFT),
1-4, G-2,
System flag 95 (ALG/RPN), G-1
system flags, 24-3
System level operation, G-3
System of equations, 11-16
System tests, G-3
T
Table, 12-17, 12-26
TABVAL, 12-52, 13-9
TABVAR, 12-52, 13-11
Tagged output programming,
21-34
TAIL, 8-11
TAN, 3-7
TANH, 3-9
Taylor polynomial, 13-23
Taylor series, 13-24
TAYLR, 13-25
TAYLR0, 13-24
TCHEBYCHEFF, 5-24
Tchebycheff polynomials, 16-58
TDELTA, 3-31
Techniques of integration, 13-18
Temperature units, 3-20
TEXPAND, 5-5
Text editor.. menu, F-5
Three-dimensional plot programs,
22-15
Three-dimensional vector, 9-13
TICKS, 25-3
Time setting 25-2
TIME, 25-3
Time & date... menu, F-3
Time functions, 25-1
TIME menu, 25-1
Time setting, 1-7
TIME tools, 25-2
Page M-18
Time units, 3-19
Times calculations 25-4
TINC, 3-32
TITLE, 7-15
TLINE, 12-46
TLINE, 22-20
TMENU, 20-1
TOOL menu, 1-6
TOOL menu: CASCMD, 1-7
TOOL menu: CLEAR, 1-7
TOOL menu: EDIT, 1-6
TOOL menu: HELP, 1-7
TOOL menu: PURGE, 1-7
TOOL menu: RCL, 1-7
TOOL menu: VIEW, 1-7
Total differential, 14-5
TPAR, 12-18
TRACE, 11-13
TRAN, 11-14
Transforms Laplace, 16-10
Transpose, 10-1,
Triangle solution, 7-10,
Triangular wave Fourier series 16-35,
TRIG menu, 5-8,
Trigonometric functions graphs,
12-16,
TRN, 10-8,
TRNC, 3-14
Truth plots, 12-29
TSTR, 25-3
TVM menu, 6-32
TVMROOT, 6-32
Two-dimensional plot programs,
22-14
Two-dimensional vector, 9-12
TYPE, 24-2
U
UBASE, 3-21
UFACT, 3-27
UNASSIGN, K-1
UNASUMME, J-3
UNDE, L-4
UNDO, 2-61
UNIT, 3-29
Unit prefixes, 3-24
Units, 3-17
Units in programming, 21-37
Upper-triangular matrix, 11-41,
User RPL language, 21-1
User-defined keys, 20-1
Using input forms, A-1,
UTILITY menu (menu 113), G-3
UTPC, 17-12
UTPF, 17-13
UTPN, 17-10
UTPT, 17-11
UVAL, 3-27
V
V, 9-12
VALUE, 3-30
VANDERMONDE, 10-14
VANDERMONDE, 18-59
Variable scope, 21-4
Variables, 26-1
Variance confidence intervals, 18-33
Variance, 18-4
Variance inferences, 18-47
Vector building, 9-12
Vector analysis, 15-1
Page M-19
Vector elements, 9-7
Vector fields, 15-1
Vector fields curl, 15-5
Vector fields divergence 15-4
VECTOR menu, 9-10
Vector potential, 15-6
Vectors, 9-1
Verbose CAS mode, C-6
Verbose vs. non-verbose CAS
mode, C-7
VIEW in plots, 12-6
Viscosity, 3-20
Volume units, 3-19
VPAR, 12-44
VPAR, 22-10
VPOTENTIAL, 15-6
VTYPE, 24-2
V-VIEW, 12-20
VX, 2-35
VX, 5-20
VZIN, 12-50
W
"Warm" calculator restart, G-3
Weber's equation, 16-59
Weibull distribution, 17-7
Weighted average, 8-17
WHILE construct, 21-62
Wireframe plots, 12-37
Wordsize, 19-4
X
XCOL, 22-13
XNUM, K-5
XOR, 19-5
XPON, 3-14
XQ, K-5
XRNG, 22-6
XROOT, 3-5
XSEND, 2-34
XVOL, 22-10
XXRNG, 22-10
XYZ, 3-1
Y
YCOL, 22-13
YRNG, 22-6
Y-Slice plots, 12-41
YVOL, 22-10
YYRNG, 22-10
Z
ZAUTO, 12-50
ZDECI, 12-50
ZDFLT, 12-50
ZEROS, 6-4
ZFACT, 12-49
ZFACTOR, 3-31
ZIN, 12-49
ZINTG, 12-51
ZLAST, 12-49
ZOOM, 12-19
Zooming, 12-49
ZOUT, 12-49
ZSQR, 12-51
ZTRIG, 12-51
ZVOL, 22-10
Other characters
!, 17-2
Page M-20
%, 3-12
%CH, 3-12
%T, 3-12
Σ, 2-28
ΣDAT, 18-5,
LIST, 8-9
ΣLIST, 8-9
ΠLIST, 8-9
ΣPAR, 22-13
ARRY, 9-21
ARRY, 9-6
BEG, L-1
COL, 10-18
DATE, 25-3
DEL, L-1
DIAG, 10-13
END, L-1
GROB, 22-31
HMS, 25-3
LCD, 22-32
LIST, 9-23
ROW, 10-22
SKIP, L-1
STK, 3-30
STR, 23-1
TAG, 21-33
TAG, 23-1
TIME, 25-3
UNIT, 3-27
V2, 9-12
V3, 9-13
Page W-1
Limited Warranty
hp 48gII 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. Replacement products may be either new or like-new.
2. HP warrants to you that HP software will not fail to execute its
programming instructions after the date of purchase, for the period
specified above, due to defects in material and workmanship when
properly installed and used. If HP receives notice of such defects
during the warranty period, HP will replace software media which
does not execute its programming instructions due to such defects.
3. HP does not warrant that the operation of HP products will be
uninterrupted or error free. If HP is unable, within a reasonable time, to
repair or replace any product to a condition as warranted, you will be
entitled to a refund of the purchase price upon prompt return of the
product with proof of purchase.
4. HP products may contain remanufactured parts equivalent to new in
performance or may have been subject to incidental use.
5. Warranty does not apply to defects resulting from (a) improper or
inadequate maintenance or calibration, (b) software, interfacing, parts
or supplies not supplied by HP, (c) unauthorized modification or misuse,
(d) operation outside of the published environmental specifications for
the product, or (e) improper site preparation or maintenance.
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.
This warranty gives you specific legal rights and you might also have
other rights that vary from country to country, state to state, or province
to province.
Page W-2
7. TO THE EXTENT ALLOWED BY LOCAL LAW, THE REMEDIES IN THIS
WARRANTY STATEMENT ARE YOUR SOLE AND EXCLUSIVE
REMEDIES. EXCEPT AS INDICATED ABOVE, IN NO EVENT WILL HP
OR ITS SUPPLIERS BE LIABLE FOR LOSS OF DATA OR FOR DIRECT,
SPECIAL, INCIDENTAL, CONSEQUENTIAL (INCLUDING LOST PROFIT
OR DATA), OR OTHER DAMAGE, WHETHER BASED IN CONTRACT,
TORT, OR OTHERWISE. Some countries, States or provinces do not
allow the exclusion or limitation of incidental or consequential damages,
so the above limitation or exclusion may not apply to you.
8. The only warranties for HP products and services are set forth in the
express warranty statements accompanying such products and services.
HP shall not be liable for technical or editorial errors or omissions
contained herein.
FOR CONSUMER TRANSACTIONS IN AUSTRALIA AND NEW ZEALAND: THE
WARRANTY TERMS CONTAINED IN THIS STATEMENT, EXCEPT TO THE EXTENT
LAWFULLY PERMITTED, DO NOT EXCLUDE, RESTRICT OR MODIFY AND ARE IN
ADDITION TO THE MANDATORY STATUTORY RIGHTS APPLICABLE TO THE
SALE OF THIS PRODUCT TO YOU.
Service
Europe Country : Telephone numbers
Austria +43-1-3602771203
Belgium +32-2-7126219
Denmark +45-8-2332844
Eastern Europe
countries +420-5-41422523
Finland +358-9-640009
France +33-1-49939006
Germany +49-69-95307103
Greece +420-5-41422523
Holland +31-2-06545301
Italy +39-02-75419782
Norway +47-63849309
Portugal +351-229570200
Spain +34-915-642095
Sweden +46-851992065
Switzerland +41-1-4395358 (German)
Page W-3
+41-22-8278780 (French)
+39-02-75419782 (Italian)
Turkey +420-5-41422523
UK +44-207-4580161
Czech Republic +420-5-41422523
South Africa +27-11-2376200
Luxembourg +32-2-7126219
Other European
countries +420-5-41422523
Asia Pacific Country : Telephone numbers
Australia +61-3-9841-5211
Singapore +61-3-9841-5211
L.America Country : Telephone numbers
Argentina 0-810-555-5520
Brazil Sao Paulo 3747-7799; ROTC
0-800-157751
Mexico Mx City 5258-9922; 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. 1800-HP INVENT
Canada (905) 206-4663 or 800- HP
INVENT
ROTC = Rest of the country
Please logon to http://www.hp.com for the latest service and support
information.
Page W-4
Regulatory information
This section contains information that shows how the hp 48gII graphing calculator complies with
regulations in certain regions. Any modifications to the calculator not expressly approved by
Hewlett-Packard could void the authority to operate the 48gII in these regions.
USA
This calculator generates, uses, and can radiate radio frequency energy and may interfere with
radio and television reception. The calculator complies 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.
However, there is no guarantee that interference will not occur in a particular installation. In the
unlikely event that there is interference to radio or television reception(which can be determined
by turning the calculator off and on), the user is encouraged to try to correct the interference by
one or more of the following measures:
Reorient or relocate the receiving antenna.
Relocate the calculator, with respect to the receiver.
Connections to Peripheral Devices
To maintain compliance with FCC rules and regulations, use only the cable accessories provided.
Canada
This Class B digital apparatus complies with Canadian ICES-003. Cet appareil numerique de la
classe B est conforme a la norme NMB-003 du Canada.
Japan
この装置は、情報処理装置等電波障害自主規制協議会
(VCCI)
の基準
に基づく第二情報技術装置です。この装置は、家庭環境で使用することを目的としていますが、この装
置がラジオやテレビジョン受信機に近接して使用されると、受信障害を引き起こすことがあります。
取扱説明書に従って正しい取り扱いをしてください。
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. Instead, it is your
responsibility to dispose of your waste equipment by handing it over to a
designated collection point for the recycling of waste electrical and electronic
equipment. The separate collection and recycling of your waste equipment at the
time of disposal will help to conserve natural resources and ensure that it is
recycled in a manner that protects human health and the environment. For more
information about where you can drop off your waste equipment for recycling, please contact
your local city office, your household waste disposal service or the shop where you purchased the
product.
861

Brauchen Sie Hilfe? Stellen Sie Ihre Frage.

Forenregeln

Missbrauch melden von Frage und/oder Antwort

Libble nimmt den Missbrauch seiner Dienste sehr ernst. Wir setzen uns dafür ein, derartige Missbrauchsfälle gemäß den Gesetzen Ihres Heimatlandes zu behandeln. Wenn Sie eine Meldung übermitteln, überprüfen wir Ihre Informationen und ergreifen entsprechende Maßnahmen. Wir melden uns nur dann wieder bei Ihnen, wenn wir weitere Einzelheiten wissen müssen oder weitere Informationen für Sie haben.

Art des Missbrauchs:

Zum Beispiel antisemitische Inhalte, rassistische Inhalte oder Material, das zu einer Gewalttat führen könnte.

Beispielsweise eine Kreditkartennummer, persönliche Identifikationsnummer oder unveröffentlichte Privatadresse. Beachten Sie, dass E-Mail-Adressen und der vollständige Name nicht als private Informationen angesehen werden.

Forenregeln

Um zu sinnvolle Fragen zu kommen halten Sie sich bitte an folgende Spielregeln:

Neu registrieren

Registrieren auf E - Mails für HP 48gII wenn:


Sie erhalten eine E-Mail, um sich für eine oder beide Optionen anzumelden.


Andere Handbücher von HP 48gII

HP 48gII Bedienungsanleitung - Spanisch - 892 seiten


Das Handbuch wird per E-Mail gesendet. Überprüfen Sie ihre E-Mail.

Wenn Sie innerhalb von 15 Minuten keine E-Mail mit dem Handbuch erhalten haben, kann es sein, dass Sie eine falsche E-Mail-Adresse eingegeben haben oder dass Ihr ISP eine maximale Größe eingestellt hat, um E-Mails zu erhalten, die kleiner als die Größe des Handbuchs sind.

Ihre Frage wurde zu diesem Forum hinzugefügt

Möchten Sie eine E-Mail erhalten, wenn neue Antworten und Fragen veröffentlicht werden? Geben Sie bitte Ihre Email-Adresse ein.



Info