beautypg.com

Ya j, 2 ( 2 a a a x – HP 32SII User Manual

Page 247

background image

Mathematics

Programs

15–21

File name 32sii-Manual-E-0424
Printed Date : 2003/4/24 Size : 17.7 x 25.2 cm

b

0

= a

0

(4a

2

a

32

) – a

12

.

Let y

0

be the largest real root of the above cubic. Then the fourth–order

polynomial is reduced to two quadratic polynomials:

x

2

+ (J + L)

×

+ (K + M) = 0

x

2

+ (JL)x + (KM) = 0

where J = a

3

/2

K = y

0

/2

L =

0

2

2

y

a

J

+

×

(the sign of JK – a

1

/2)

M =

2

2

a

K

Roots of the fourth degree polynomial are found by solving these two
quadratic polynomials.

A quadratic equation x

2

+ a

1

x + a

0

= 0 is solved by the formula

0

2

1

1

2

,

1

)

2

(

2

a

a

a

x

±

=

If the discriminant d = (a

1

/2)

2

a

o

0, the roots are real; if d

<

0, the roots

are complex, being

d

i

a

iv

u

±

=

±

)

2

(

1

.

Program Listing:

Program Lines:

Description

Defines the beginning of the polynomial root finder
routine.

"!

Prompts for and stores the order of the polynomial.

!

L

Uses order as loop counter.

Checksum and length: 699F 004.5

Starts prompting routine.

"!1L2

Prompts for a coefficient.

L

Counts down the input loop.

!

Repeats until done.

!

L

Uses order to select root finding routine.