Menu

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

None
closed
dynamics (1)
5
2013-07-30
2013-07-30
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

  • Jaime E. Villate

    • status: open --> closed
     
  • Jaime E. Villate

    Fixed with commit [9c8785].

     

    Related

    Commit: [9c8785]


Log in to post a comment.