Roots of a real or complex number – Sharp EL-9900 User Manual

Page 138

Advertising
background image

5

Advanced Keyboard/PROGRAMMING USING THE SHARP EL-9900

Copyright © 2002, Sharp Electronics Corporation. Permission is granted to photocopy for educational use only.

1.

Program the calculator to find all the roots of a real or complex number by

solving the equation z

n

= a + bi using DeMoivre’s theorem.

2.

Create a new program with the name ROOTS. Enter the following program

and remember to press ENTER at the end of each line. If you make a mis

take, use the calculator's editing features to correct the error.

3.

Enter the following program:

Input N

PRGM A 3 ALPHA N ENTER

Input A

PRGM A 3 ALPHA A ENTER

Input B

PRGM A 3 ALPHA B ENTER

xy->r(A,B)

⇒R MATH D 3 ALPHA A , ALPHA B

)

STO ALPHA R ENTER

xy->

θ(A,B)⇒θ MATH D 4 ALPHA A , ALPHA B

)

STO ALPHA

θ

ENTER

0

⇒K

0

STO ALPHA

K ENTER

Label A

PRGM B 0 1 ALPHA

A ENTER

Print r

θ->x

PRGM

A 1 MATH D 5

(R^(1

÷N),(θ+

ALPHA R a

b

( 1

÷

ALPHA N )

2

πK)÷N)

, ( ALPHA

θ

+ 2 2ndF

π

ALPHA

K )

÷

ALPHA N ) ENTER

Print r

θ->y

PRGM A 1 MATH D 6

(R^(1

÷N),

ALPHA R a

b

( 1

÷

ALPHA N )

(

θ+2πK)÷N)

, ( ALPHA

θ

+

2 2ndF

π

ALPHA

K )

÷

ALPHA N ) ENTER

Print “

PRGM A 1 PRGM A 2 ENTER

Wait

PRGM A 4 ENTER

K+1

⇒K

ALPHA K + 1 STO

ALPHA

K ENTER

If K<N

PRGM B 0 3 ALPHA K

MATH F

Goto A

5 ALPHA N PRGM B 0 2 ALPHA A ENTER

End

PRGM A 6 ENTER

Press 2ndF QUIT to exit the editor.

ROOTS OF
A REAL OR COMPLEX NUMBER

Advertising