Memory Required:
127.5
bytes:
79.5
for
program,
48 for
variables.
Remarks: Expanding this
program
to handle
cubic
equations
would
be quite
easy.
Since a cubic equation always has at least one real root,
the
SOLVE
function
could
be used to find the
root.
Then synthetic
division could reduce the cubic equation to a quadratic equation
which would be solved by this program.
Program
Instructions:
1. Key in the program routines; press
[c]
when
done.
2. Press
IXEQI
Q to start the quadratic equation routine.
3. Key in A
and
press IR/SI.
4. Key in B
and
press IR/s I.
5. Key in C
and
press IR/SI.
6. Seethe first
value
of
X,
if the rootsare
real,
or see the real part,
R, if the roots are imaginary.
7.
Press
IR/sIto see the second
value
of
X,
or to see the imaginary
part, J, if the roots are imaginary.
8. For a new
case,
press I
R/S
Iand go back to step 3.
Variables
Used:
A
Coefficient
of
x2.
B
Coefficient
of
x.
C
Constant.
X
The
first
or
second
real
value
of
x.
R The real portion of the complex root.
I The positive, imaginary part of the complex root.
Example
1. Find the roots of 3x2 + 5x — 3 = 0.
194
12:
Mathematics
Programs