New algorithms for numerical integration and ODE solutions

03142014, 10:40 PM
Post: #2




RE: New algorithms for numerical integration and ODE solutions
Hi Namir
Your SONI algorithm uses this: h = 2 * YMaxDelta / f’(X1) When I used the function EXP(X)*(SIN(X))^2, this function evaluates to zero at x=0, and also the derivative is zero at x=0. This should cause the equation for h to blow up. It doesn't in your example because your MyDx function is an approximation. However if an improved MyDx function is used that generates a number much closer to zero, h ends up being very large. In this case the next DO loop evaluates the function at a large X2, which coincidentally is also close to zero causing it to exit the DO. I think some protection on h near zero slope and when the slope is rapidly changing would be a valuable improvement. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)