Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2618 rk does not compute the last point in the domain

None
closed
dynamics (1)
5
2013-07-30
2013-07-30
Jaime E. Villate
No

The command:
rk(-n,n,1,[t,0,0.3,0.1]);
produces
[[0.0, 1.0], [0.1, 0.9048375], [0.2, .8187309014062499]]
namely, the last point in the domain (t=0.3) is not reached because numerically 3*0.1 is a bit bigger than 0.3.

However, makelist does reach the last point in the same domain:
makelist(t,t,0,0.3,0.1);
[0, 0.1, 0.2, 0.3]
In order to make the two programs consistent, rk should always try to reach the last point in the domain.

Discussion

    • status: open --> closed