Recent content by Itosu

  1. I

    Fourth order Runge–Kutta in C# - two differential equations

    Thank you, I understand. Could you explain more deeply the idea of the error O(h5) or provide a link? Thank you in advance!
  2. I

    Fourth order Runge–Kutta in C# - two differential equations

    So if I get: h AUC(after 2 hours) 0.01 335.40257585727842 0.005 335.87803342989893 Can I presume that 335 is accurate result? (without knowing the part after comma). If h=0.01 does O(h5) mean that up to the 0.015 I get accurate digits? And should I count O(h5) or...
  3. I

    Fourth order Runge–Kutta in C# - two differential equations

    Ok, I understand that if one set of results differs much from another set (with different step) then the step should be decreased until differences won' tbe large. One more question :) Here we are using fixed-step. Is it difficult to implement variable step size? Thank you in advance!
  4. I

    Fourth order Runge–Kutta in C# - two differential equations

    Thank you! And regarding errors - I should run the programm with step = H/2 and compare results, however on what basis? - I don't know the exact result that should be. Should I do it one more time and check if the results vary much?
  5. I

    Fourth order Runge–Kutta in C# - two differential equations

    Thank you :) Everything is working perfectly! But if you had a moment could you explain to me the idea? We use RK to integrate x, and isn't RK designated for differential equations?
  6. I

    Fourth order Runge–Kutta in C# - two differential equations

    Here is my code: public void rungeDX(double x, double y, double t) { double K1x = H * dx(x, y, t); double K1y = H * dy(x, y); double K2x = H * dx((x + 0.5 * K1x), (y + 0.5 * K1y), t + 0.5 * H); double K2y = H * dy((x + 0.5 *...
  7. I

    Fourth order Runge–Kutta in C# - two differential equations

    Thank you for your answer! :) In each step, which is equal to time interval (0.01) I calculate the value of x, so as a result I have a List<Double> of 500 x values (5 hours). But how to use them to get AUC? :)
  8. I

    Fourth order Runge–Kutta in C# - two differential equations

    I am full of admiration that you find a time to support us on the forum :) x - glucose level y - insuline level Y - AUC of the glucose level function I need AUC to calculate http://en.wikipedia.org/wiki/Glycemic_index" So, as I need AUC under x (as in previous image), on vertical axis...
  9. I

    Fourth order Runge–Kutta in C# - two differential equations

    Thank you. I understand everything (are you a teacher? :) but one thing: How do we know that? Why with respect to x, not to t? And as far as error is concerned - I start with half smaller step size, and then substract results? Thank you again!
  10. I

    Fourth order Runge–Kutta in C# - two differential equations

    Thank you for your answers! Could you explain in more details where dY/dt = y fdx(x, y, t) came from? And to calculate error do I understand it correctly that I have to run the same programme with H=0.01/2 and compare results? Thank you one more time!
  11. I

    Fourth order Runge–Kutta in C# - two differential equations

    Yes. Sample graph is like the one in the attachment. So, as you see x increases, however after some time it dramatically increases, because what I am (We are) creating is glucose-insuline model, and when glucose level increases more insuline is produced and it makes glucose level decrease...
  12. I

    Fourth order Runge–Kutta in C# - two differential equations

    My results are for calculations - I need to know the exact value od AUC (not for printing, just for forward calculations). Do you mean that if I use the same (4th order) RK solver I will get AUC? Could you provide more details? Thank you very much!
  13. I

    Fourth order Runge–Kutta in C# - two differential equations

    What do you mean? Can you explain?
  14. I

    Fourth order Runge–Kutta in C# - two differential equations

    Hi :) Thank you again! And one more question... I would like to calculate Area Under the Curve that I printed after having resolved the equations. I know I can do this with rectangle method, adding the areas of each rectangle, however I have a premonition that it has huge error then. What do...
  15. I

    Fourth order Runge–Kutta in C# - two differential equations

    You are totally correct. Thank you! Do you know of any possibilities to calculate an error of such solution?
Back
Top