Keystrokes display – HP 15c User Manual
Page 70
70
Section 3: Calculating in Complex Mode
70
negative values of Re(z). This would slow convergence considerably unless the first guess z
0
were extremely close to a root. In addition, this f(z) vanishes infinitely often, so it's difficult
to determine when all desired roots have been calculated. But by rewriting this equation as
e
z
= −8/(z + 9)
and taking logarithms, you obtain an equivalent equation
z = ln(−8/(z + 9)) ± i2nπ
for n = 0, 1, 2, ….
This equation has only two complex conjugate roots z for each integer n. Therefore use the
equivalent function
f(z) = z − ln(−8/(z + 9)) ± i2nπ
for n = 0, 1, 2, ….
and apply Newton’s iteration
z
k + 1
= z
k
− (z
k
− ln(−8/(z
k
+ 9)) ± i2nπ) / (1 + 1/(z
k
+ 9)).
As a first guess, choose z
0
as A(n), the approximation given earlier. A bit of algebraic
rearrangement using the fact that ln(±i) = ±i π/2 leads to this formula:
z
k + 1
= A(n) + ((z
k
− A(n)) + (z
k
+ 9)ln(iIm(A(n)) / (z
k
+ 9))) / (z
k
+ 10).
In the program below, Re(A(n)) is stored in R
0
and Im(A(n)) is stored in R
1
. Note that only
one of each conjugate pair of roots is calculated for each n.
Keystrokes
Display
|¥
Program mode
´ CLEARM
000-
´bA
001-42,21,11
Program for A(n).
|"8
002-43, 5, 8
Specifies real arithmetic.
v
003- 36
+
004- 40
.
005- 48
5
006- 5
+
007- 40
|$
008- 43 26
*
009- 20
Calculates (2n + ½)π.
v
010- 36
O1
011- 44 1
8
012- 8
÷
013- 10
|N
014- 43 12
”
015- 16
Calculates –ln((2n + ½)π/8).