HP Mathematics II User Manual

USER
MANUAL
Mathematics
II
CALCULUS
MATHEMATICS
VER1.0
A
mathematical
program
for
calculators
Odd
Bringslid
tsv
Postbox
1014 3601 Kongsberg
NORWAY
.
Copyright©
1991
Odd
Bringslid
ISV
All
rights
reserved
The
author should
not be
liable
for any
errors
or
conse-
quential
or
incidential damages connecting with
the
furnis-
hing
performance
or use of the
application card.
JS5
First
edition August 1992
Contents
Generaly
6
Hardware
requirements
6
Starting
up 7
User
interface
7
The
input
editor
9
Echoing from
the
stack
10
Calculation
finished
10
Moving
in
the
menu
10
STAT
and
MATR
menu
11
Leaving CALCULUS
11
Intermediate results
12
Flag status
and CST
menu
12
Linear
algebra
13
Linear
equations (Gauss algo-
rithm)
13
Matrix
calculations
16
Addition
16
Multiplication
16
Inverting
16
Determinant
16
Rank
17
Trace
17
Orthogonal
matrix
17
Transposed matrix
17
Symmetric
17
Linear
transformations
18
2 D
transformations
(two
dimen-
sions)
18
Rotation
18
Translation
19
Scaling
20
Concatinating
21
3 D
transformations
(3
dimen-
sions)
23
Translation
23
Scaling
23
Rotation
23
Concatinating
24
Eigenvalueproblems
25
Eigenvalues
25
Eigenvectors
26
Diagonalization
27
Diffequations
28
Vector spaces
30
Basis?
30
Norm
31
Norming
31
Scalar
product
31
Orthogonalization
31
Orthogonal?
32
Orthonorming
32
Vector
in new
basis
32
Transformation matrix
in new
basis
34
rr
-~
L
Laplace transforms
36
Laplace
transform
37
Invers
Laplace transform
38
Inverse L Partial fractions
39
Diffequations
41
Probability
42
Without replacement
43
Combinations unordered
43
Combinations ordered
44
Hypergeometric
distribution
44
Hypergeometric
distr. function
44
With replacement
46
Combinations unordered
46
Combinations ordered
47
Binomial
distribution
48
Binomial
dsitr.
function
49
Negative
binomial
distribution
49
Negative binomial
distribution
func-
tion
50
Pascal
distribution
51
Pascal distribution
function
52
Normal
distribution
53
Poisson
distribution
54
Poisson
distribution function
55
Info
55
Binomial coefficients
55
Statistics
57
Distributions
58
Normal
distribution
58
Inverse
normal distribution
58
Kjisquare
distribution
59
Inverse
Kjisquare
60
Studen-t
distribution
60
Inversestudent-t
61
Confidence
intervals
62
Mean,
known
o-
62
Mean,
uknown
a
Variance
uknown ^ 63
Sample mean,
stdev,
median
65
Fitting
66
Normal
ditsribution,
"best
fit"
66
Hypothesis
normal distribution
67
Hypothesis
binomial distribution
68
Hypothesis
Poisson
distribution
69
L_
Class
table
69
^^T
Mean,
stdev
70
Discrete
table
70
it
Description
of
samples
71
Diskrete
table
£DAT
71
Classes
KSDAT
71
Cummulativ
table
72
72
^
2DAT
mean
and
st.deviation
72
[gr-
Histogram
KXDAT
73
Frequency
polygon
KXDAT
74
§2*j
Linear
regression
and
correlation
74
j
Fourier series
75
Fourier
series,
symbolic
form
76
Fourier
series
numeric form
78
Half
range expansions
79
Linear programming
81
1
Generaly
This
is
part
II of
CALCULUS mathematics. Together with
part
HI
this will represent a complete math
pac for
higher
technical education.
As
in
part
I a
pedagogical interface
is
stressed. CALCULUS
mathematics
is a
pedagogical tool
in
addition
to a
package
for
getting things calculated.
Hardware
requirements
CALCULUS Math
II
runs under
the
calculator
HP
48SX.
The
program card
may be
inserted
into
either
of
the two
ports
and
Math I could
be in the
other port.
1.
Generaly
Starting
up
The
LIBRARY menu will
show
up
MAIL Pushing
the
MAJI
key
will lead
you
into
the
main,
menu
and
then
you
simply
push
the
START key.
User
interface
The
CALCULUS
meny
system
is
easy
to
use. Using
the ar-
row
keys
allows
you to
move
the
dark
bar and
select
by
pus-
hing
ENTER.
In the
following
example
you
will enter
the
submenu
for
LINEAR ALGEBRA
and
select Matrices/Multiply.
RAD {HOME
}
PRG
LAPLACE TRANSFORMS FOURIER
SERIES
LINEAR PROGRAMMING
\r^
-
1.
Generaly
RAD {HOME
}
PRG
Linear equations
+
J&~
-k
t
Transformations Eigenvalueproblems
*m*r-
Under Matrices
you
will choose Multiply
and you may
mul-
tiply
two
symbolic matrices.
The
matrices
are put
into
the
SYMBOLIC MATRIX
WRITER.
RAD {HOME}
PRG
Sum
Powers Inverting
»*-<-»—»>«^
p«-v~«
1-
2*-
In the
Matrix Writer
you may
delete, add,
and
echo
from
the
stack
(see manual
for
48SX).
1.
Generaly
The
input Editor
If
you
select Linear equations under LINEAR ALGEBRA
you
will enter
the
editor
for
input (input screen).
RAD {HOME
}
:PartAns
w
-"'•
sp"*r
, , ,JV.
»
PRG
Y/N:J
.}:
{123}
}:
{xyz}
Here
the
input data
can
be
modified
and
deleted
and
you can
move
around
by
using
the
arrow keys.
The
cursor
is
placed right behind
:PartAns
Y/N:
and
here
you
enter
Y if you
want intermediate results.
The
arrow
keys
are
used
to get
right behind
:B
{Bl...}:
and
here
you
enter
the
right
side vector
of the
system.
If
you
have done a mistake
you may
alter
your input
by
using
the
delete
keys
on the
calculator keyboard.
You
will
not be
able
to
continue before
the
data
are
correctly
put in.
1.
Generaly
In the
input screen there
is
often
information about
the
pro-
blem
you are
going
to
solve
(formulaes
etc).
Remember
the
' ' in
algebraics
and
separation
of
several data
on the
same
input
line
by
using blanks
(space).
Echoing
from the
stack
If
an
expression
or a
value laying
on the
stack
is
going
to be
used, then
the
EDrT/tSTK/ECHO/ENTER
sequence will
load
data into
the
input screen.
Be
sure
to
place
the
cursor
correctly
Calculation
finished
When a calculation
is finished
CALCULUS will
either
show
up
intermediate results
by
using
the
VIEW
routine (intrinsic
MAII)
or
return directly
to the
menu.
In the
last case
you
will
need
to use
the
->STKkey
to see the
result laying
on the
stack.
Moving
up and
down
in the
menu
You
can
move downwards
in the
menu system
by
scrolling
the
dark
bar and
pressing
ENTER.
If you
need
to
move
up-
wards
the
UPDIR
key
will
help.
At any
time
you may
HALT
CALCULUS
and use the
calculator independent
of
CAL-
CULUS
by
pressing
the
-^STK
key.
CONT
will
get you
back
to
the
menu system.
1.
Generaly
10
STAT
and
MATR
menues
On
the
menu
line
at
the
bottom
the
choices
STAT
and
MATR
are
possible.
Here
you
will have access
to
some routines
re-
gardless
of
your current menu position.
STAT:
MATR:
NORM Normal distribution
INVN
Inverse normal distribution
USD
AT
Sample mean,
st.
dev.,
median
KSDAT
Class table
SDAT
Discrete table,
two
columns
• ADD Add
symbolic matrices
MULT Multiply
INV
Invert
TRN
Transpose
• DET
Determinant
Leaving
CALCULUS
Pushing
the
EXIT
key
will leave
CALCULUS.
1.
Generaly
11
Intermediate
results
In the
input screen
you may
choose
PartAns
Y/N.
Choosing
N
the
result
will
be
laying
on the
stack
and you
have
to use
-^STK
to see the
answer. Choosing
Y,
different
pages
of in-
termediate results will
show
up or
more than
one
result
is
lay-
ing
on the
stack.
The
degree
of
details
in the
partial answers
is
somewhat dif-
ferent,
but
some
of the
results covers "the whole answer".
In
E:'"^
"~
~-~""
every
case this will give
the
user a good help.
Different
parts
of an
answer
may be
found
on
different
pages
and
the
page number
can bee
seen (use arrow up/down).
When PartAns Y(es)
is
chosen
all
numbers will show
up
with
two
figures
behind comma.
If a
more accurate answer
is ne-
cessary,
you
will have
to
look
on the
stack
and
perhaps
use
the N FIX
option.
s=^-r
Flag
status
and CST
menu
The flag
status
and CST
menu
you
have before going into
CALCULUS will
be
restored when
you
leave
by
pushing
EXIT.
3
5
s=*
1.
Generaly
12
Linear algebra
The
subject linear algebra covers
linear
eqautions
with solu-
tion also
for
singular systems, matrix manipulation (symbo-
lic), eigenvalue problems included systems
of
linear
differential
equations,
linear
transformations
in two and
three dimensions
and
vector spaces.
Linear equations (Gauss method)
Linear equations with symbolic parameters
are
handled.
The
equations have
to be
ordered
to
reckognize
the
coefficient
matrix
and the
right
side.
The
equations
are
given
in the
form:
E^-sr
r~
Br-g
A is the
coefficient
matrix
, X a
column vector
for the un-
I
j
knowns
and
B the
right
side column vector. Symbolic
coeffi-
|
cients
are
possible.
2.
Linear algebra _ 13
If
Det(A) = 0
(determinant)
the
system will
be
singular (self
contradictory
or
indefinite).
This
is
stated
as
"Self
contradic-
tory"
or the
solution will given
in
terms
of one ore
more
of
the
unknowns (indefinite). Example:
{x,y,z} = {x,2*x-l,x-4}
The
value
of x is
arbitrary
so
there
is an
infinite number
of
solutions.
If
the
system
is
underdetermined
(too
few
equations),
the so-
JS^g
lution
will b e
given
in the
idefinite
form.
If the
system
is
over-
[__
determined (too many equations)
the
solution will
be
given
in the
indefinite
form
if the
equations
are
lineary dependent
or as
"Self
contradictory"
if
they
are
lineary independent.
L
The
solution algorithm
is the
Gauss elimination.
If
PartAns
Y(es)
is
selected,
the
different stages
in the
process will
be
given
as
matrices
on the
stack which
may be
viewed
by
using
the
MATW
option (LIBRARY).
The
coefficient
matrix
and
the right
side vector
are
assembled
in one
matrix
(B is the
^;_^
rightmost
column).
^-
L
2.
Linear algebra
14
Interface:
RAD
{HOME}
PRG
A*X
= B
:
PartAns
Y/N:
Y
:
B{B1...}:
{7
6 0}
...}:
{xlx2x3x4x5}
V,
f,
m
j,,.>™»
„,,«
'
.-
H
tt
The
symbolic matrix writer will
now
appear.
The
following
matrix
is put
into
it:
'
2
i
i
1
1
5
-1
2
-4
3
1
-1
2
-1 3
-1 1
-1
The
example solves
the
system:
2xi-X2
+ 3x3 + 2x4-xs = 7
xi + 2x2+X3-X4+xs
= 6
xi
- 4x2
-xs + 3x4-xs
= 0
The
system
is
indefinite (too
few
eqautions))
and the
solu-
tion
is
given
in
terms
of
xs
and
X4.
2.
Linear algebra
15
Matrix
calculations
Some
operations
on
symbolic matrices
are
done (not cove-
gjr
red
by the
48SX intrinsic
functions).
The
matrices
are
put
into
the
SYMBOLIC MATRIX
WRITER
and the
matrix
is put
*"**
on
the
stack
by
pushing
ENTER.
Addition
Both
matices
are put
into
the
matrix writer
and
added.
An er-
ror
message
is
given
for
wrong dimension.
Multiplication
Both
matrices
are put
into
the
matrix writer
and
multiplied.
An
error message
is
given
for
wrong dimensions.
The
first
matrix
has to
have
the
same number
of
columns
as the
sec-
ond
has
rows.
Be
aware
of the
order
of the
matrices.
Inverting
The
mark
is put
into
the
matrix writer
and
inverted.
An er-
^
ror
message
is
given
if its not
quadratic.
Determinant
^T
The
determinant
of a
symbolic matrix
is
calculated.
The ma-
~~
trix
is put
into
the
matrix writer.
An
error message
is
given
if
its
not
quadratic.
2.
Linear algebra
16
Rank
of a
matrix
The
rank
of a
mark
is
calculated. This
routine
may be
used
for
testing
linear
independency
of
rowvectors.
The
routine
makes
the
matrix upper
traingular
and
PartAns Y gives
the
different
stages
of the
process.
Trace
The
trace
of a
square matrix
is
calculated.
An
error message
is
given
if the
matrix
is not
quadratic.
Orthogonal matrix
This routine
is
testing whether
the
matrix
is
orthogonal i.e.
the
inverse
is
equal
to the
transpose.
An
error message
is gi-
ven for
wrong dimension (must
be
quadratic).
The
answer
is
logic
0 or 1. May be
used
to
investigate
if
rowvectors
are
ort-
hogonal
i.e.
is an
orthogonal basis
of a
vector space.
Transpose
matrix
The
transpose
of a
symbolic matrix
is
calculated.
Symmetric
Investigates
whether a matrix
is
symmetric
or
not. Logic
0 or
1.
2.
Linear algebra
17
Linear transformations
Linear transformations include coordinate transformations
in
the
plane
and in the
three dimensional space.
The
trans-
formations
are
rotation, translation
and
scaling.
The
point
to
be
transformed
is
given relative a rectangular coordinate sys-
tem.
Mixed
transformations
(concatinating)
is
possible.
The
order
of
the
transformations
is
important
if
rotation
is one of the
them.
2
gir-TC
2 D
transformations (two
dimensions)
Rotation
The
rotation angle must
be
given
in
degrees'
and the
transfor-
med
point
is
given
as
components
of a
list
(to
allow symbols).
The
rotation
is
counterclockwise
for
positive angles about
an
arbitrary
point.
Bf
3
a
2.
Linear algebra
18
50
0
2'Q
4-0
2.1
Rotation
of a
triangle
about
origo
Interface:
RAD
{HOME
}
PRG
Rotation
about
(xO,yO)
X
Y: 2 5
XO
YO: 2 2
$:
45
T5^ra.*\
]£KO*.
•* « -^
±
*
>
*.
*
J
*^ ^ > A
*
The
point
(2,5)
is
rotated about
(2,2)
an
angle
45°.
To
rotate
a
triangle
all
three points have
to be
transformed.
Translation
*E15?
This
is a
pure translation
of a
point,
the
coordinates
are
given
r?
an
addition.
2.
Linear algebra
19
50"
60 -•
10 •
0
20 40
80
100
120
fi£
2.2
Translation
of a
triangle
Interface:
RAD {HOME}
Xt
=
:XY: :Tx Ty:
rrnrr
PRG
X+Tx
Yt = Y + Ty
2
5
3 6
inrir^cTi;—
i
The
example moves
the
point (2,5)
to
(2,5) + (3,6) = (5,11)
Scaling
The
coordinates
are
multiplied
by a
factor.
For a
geometric
figure
where
the
points
are
scaled, this will give a smaller
or
bigger
figure.
If the X and Y
coordinates
are
scaled different-
ly
this
will
alter
the
shape
of the
geometric
figure.
3 ff
»
2.
Linear algebra
20
r
F
50
A
100
-^
0
40
120
2.3
Enlarging
of a
triangle
Interface:
RAD {HOME
}
PRO
:XY: :Sx Sy:
; = X*Sx
Yt =
'
2
5
3 6
,_,^
,1*
--
The
example multiplies 2 with
3 and 5
with
6 and the
point
(2,5)
is
moved.
Concatinating (mixed transformations)
Concatinating means a mixture
of
several transformations.
2.
Linear algebra
21
The
order
of the
transformations
is
important, given
in a
list
as
{R S T}
(rotation,
scaling
and
translation).
Interface:
RAD {HOME
}
PRG
:
XY:25
: Sx
Sy:l
1
:
TxTy:2
6
:0XOYO{STR}:
4522{RTS}
In the
example
the
point
(2,5)
is
rotated
clockwise
45°
about
the
point (2,2)
first,
then a translation
of 2 in the
x-direction
and
6 in the
y-direction.
There
is no
scaling, indicated
by
11
for
the
scaling
factors.
Rent.
No
translation gives
Tx =
Ty = 0 and no
rotation
gives
0 = 0.
Sa-
2.
Linear algebra
22
3 D
transformations
(three
dimensions)
Translation
The
interface
is the
same
as 2D
translation, with
one
extra
coordinate
and one
extra translation.
Scaling
The
interface
is the
same
as 2D
scaling, with
one
extra coor-
dinate
and one
extra scaling.
Rotation
3D
rotation
is
somewhat more complicated than
in two di-
mensions.
The
rotation axes
has to be
specified,
i.e
angles
re-
lative
the
coordinate
axes
and a
point.
Interface:
RAD {HOME
}
:
XYZ:
:XO
YO ZO:
:
ap-y:
: 0:
"
-v-^w**-*™
-
•••
*§•
PRG
2 54 221
45 45 60
45:
i
S
2.
Linear
algebra
23
The
example rotates
the
point (2,5,4) about
an
axes through
the
point
(2,2,1)
and
with angles
relative
the x-, y-, and
z-axes
equal
to
45°,
45° and
60°.
Concatinating
(mixed)
The
same interface
as in the 2D
case,
but the
rotation axes
now
has to be
specified.
Interface:
e:
s
gr
fe
RAD
{HOME
}
:
XYZ:
:XO YO ZO: :Sx Sy Sz: :TxTyTz:
PRG
2
54
221
346
252
RAD {HOME
}
a p
7:
45 45 60
0{STR}:
45{RTS}
PRG
3
rt
2.
Linear algebra
24
Loading...
+ 60 hidden pages