i= 1i; y=8+3i;
for l=1:35
y=sqrt(i*y);
fprintf('%4d, %10.8f+%10.8fi\n',l,real(y),imag(y))
end
y
shows that even when the "rightmost" (starting) value is a complex number 8+3*i, the iteration converges to i.
iteration # value
1, 1.66493299+2.40249909i
2, 0.51015375+1.63179531i
3, 0.19734077+1.29257057i
4, 0.08653768+1.14020145i
5, 0.04049230+1.06856964i
6, 0.01958227+1.03390188i
7, 0.00962884+1.01685525i
8, 0.00477430+1.00840371i
9, 0.00237717+1.00419588i
10, 0.00118610+1.00209644i
11, 0.00059243+1.00104785i
12, 0.00029606+1.00052383i
13, 0.00014799+1.00026189i
14, 0.00007399+1.00013094i
15, 0.00003699+1.00006547i
16, 0.00001849+1.00003273i
17, 0.00000925+1.00001637i
18, 0.00000462+1.00000818i
19, 0.00000231+1.00000409i
20, 0.00000116+1.00000205i
21, 0.00000058+1.00000102i
22, 0.00000029+1.00000051i
23, 0.00000014+1.00000026i
24, 0.00000007+1.00000013i
25, 0.00000004+1.00000006i
26, 0.00000002+1.00000003i
27, 0.00000001+1.00000002i
28, 0.00000000+1.00000001i
29, 0.00000000+1.00000000i
30, 0.00000000+1.00000000i
31, 0.00000000+1.00000000i
32, 0.00000000+1.00000000i
33, 0.00000000+1.00000000i
34, 0.00000000+1.00000000i
35, 0.00000000+1.00000000i
To be more exact as to the value after 35 iterations, it's
y =
3.52745892188977e-11 + 1.00000000006243i
|
Posted by Charlie
on 2023-04-23 11:09:09 |