Quadratic Equation - HP -32S Owner's Manual

Rpn scientific calculator
Table of Contents

Advertisement

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
introduced if 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. Any computer that uses a finite number of 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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents