efJerryYang/computational-methods

hitsz lab2-romberg: incorrect value at start and several iterations afterwards

Closed this issue · 0 comments

The algorithm given by handout is probably wrong, it is obvious that the initial value of T1 is not correct, and the calculated result is always smaller than the standard result.

I think there must be something wrong with the given procedure. The "gap" between such a result and the correct one appears to be gradually filled through iterations, but shouldn't be half as small from the start. Here are some examples of output:

T:     0.679570457
T:     0.657551253	S:     0.650211518
T:     0.677367637	S:     0.683973099	C:     0.686223871
T:     0.695174509	S:     0.701110133	C:     0.702252602	R:     0.702507026
T:     0.706064798	S:     0.709694894	C:     0.710267211	R:     0.710394427
...
T:     2.560913210
T:     7.161129435	S:     8.694534844
T:     9.162331043	S:     9.829398246	C:     9.905055806
T:    10.083237677	S:    10.390206556	C:    10.427593776	R:    10.435888030
T:    10.523470315	S:    10.670214528	C:    10.688881726	R:    10.693029154
...
T:     1.500000000
T:     2.331176471	S:     2.608235294
T:     2.738988494	S:     2.874925836	C:     2.892705205
T:     2.940941612	S:     3.008259318	C:     3.017148217	R:     3.019123503
T:     3.041429893	S:     3.074925987	C:     3.079370431	R:     3.080358086
T:     3.091551963	S:     3.108259320	C:     3.110481542	R:     3.110975370
...
T:     0.375000000
T:     0.530357143	S:     0.582142857
T:     0.610788517	S:     0.637598975	C:     0.641296050
T:     0.651724536	S:     0.665369875	C:     0.667221268	R:     0.667632780
T:     0.672374875	S:     0.679258321	C:     0.680184218	R:     0.680389979
...