Newton’s method – Sharp EL-9900 User Manual
Page 146
13
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 perform Newton’s method to find the root of
a function.
2.
Create a new program with the name NEWTONS. Enter the following
program and remember to press
ENTER at the end of each line. If you
make a mistake, use the calculator’s editing features to correct the error.
3.
Enter the following program:
Input A
PRGM
A 3 ALPHA A ENTER
Input X
PRGM
A 3 X/
θ/T/n ENTER
If d/dx(Y1,X)=0
PRGM
B 0 3
MATH A 0 5
Goto B
2ndF VARS A ENTER A 1 , X/
θ/T/n )
ALPHA = 0 PRGM B 0 2
ALPHA B ENTER
Label A
PRGM B 0 1 ALPHA A ENTER
X–Y1/d/dx(Y1,X)
X/
θ/T/n – 2ndF VARS A ENTER A 1 ÷
⇒N
MATH
A 0 5 2ndF VARS A ENTER A
1 ,
X/
θ/T/n )
STO ALPHA N ENTER
If abs(X–N)>5
PRGM B 0 3 MATH B 1
Goto B
X/
θ/T/n – ALPHA N )
MATH F 3
5 PRGM
B 0 2 ALPHA B ENTER
Print N
PRGM A 1 ALPHA N ENTER
Wait
PRGM
A 4
ENTER
If abs(X–N)
≤A
PRGM B 0 3 MATH B 1
Goto C
X/
θ/T/n – ALPHA N )
MATH F 6
ALPHA
A PRGM B 0 2 ALPHA C ENTER
N
⇒X
ALPHA N STO X/
θ/T/n ENTER
Goto A
PRGM B 0 2 ALPHA A ENTER
Label B
PRGM B 0 1 ALPHA B ENTER
Print “GUESS
PRGM A 1 PRGM A 2
BETTER
2ndF A-LOCK G U
E S
S SPACE
B E T T E R ENTER
Label C
PRGM B 0 1 ALPHA C ENTER
End
PRGM A 6 ENTER
NEWTON’S METHOD