EasyManua.ls Logo

HP HP-32S - Quadratic Equation

HP HP-32S
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Quadratic
Equation
This program uses the quadratic formula to solve for the real and
complex roots of a second-degree polynomial.
A polynomial of degree two
ax2 + bx + c = 0
can be solved for x using the quadratic formula
-b
+ \lb2 -
lac
x =
=-*-
,
2a
where
b2
lac is the discriminant. In the case of complex roots
(where the discriminant is negative), the real part is
R=
~b
2a'
while
the
imaginary
part
is
= + i
V"fr2
~
4gcl
2a
For real roots, the program always calculates the root of the greatest
absolute
value
first.
It
does
this
to
rninimize
inaccuracies
that
can
be
introducedif the square root of the discriminant is nearly equal to
b.
Once the first root, xlf is found, the second root,
x2,
is computed using
the relationship
x _ c
ax1'
Numerical errors, like
the
one
avoided by this program, are
common
in computer software. Anycomputer that usesa
finite
numberof dig
its for computation will fail numerically unless care is taken in
selection and implementation of the method of solution. Inaccurate
12:
Mathematics
Programs
191

Table of Contents

Related product manuals