0
$\begingroup$

I'm trying to solve a system of differential equations with Runge-Kutta method. When I use the step size $h=1$ my problem has true answer but when I use the smaller $h$ (for example $h = 0.1$) my answer is very bad. So I think I have a stiff problem. My question is how can I prove my problem is stiff? I want to know the methods that used for proving stiff problems. Thanks a lot

$\endgroup$
  • $\begingroup$ Could you please perform some additional numerical experiments? Do the integration with step sizes $h=10^{-k}$ for $k=0,1,2,3$ and compute the distances of the end points. If that distance does not go down like $h^p$, $p$ being the order of the method, this indicates a stiff system. $\endgroup$ – Dr. Lutz Lehmann May 27 '14 at 11:33
  • $\begingroup$ Also, please write more details on the method used and perhaps on the type of problem. And how were you able to determine that $h=1$ gives you the "true" solution? $\endgroup$ – Dr. Lutz Lehmann May 27 '14 at 11:35
  • $\begingroup$ Of course, the zeroth source of this behavior is a programming error. In that there is in the code either a factor $h$ missing or too much at one place. This would have no consequence for $h=1$, but would give ridiculous results for $h\ne 1$. So if it is your own code and it is generically formulated, you could post it for discussion here or in the scientific computation forum. $\endgroup$ – Dr. Lutz Lehmann May 27 '14 at 11:51
0
$\begingroup$

Compute the condition number of the Jacobian of the right side of the ODE at interesting points. If this number is very large, you have a stiff system. Edit: Since that tells you about the direction dependence of the Lipschitz constant. Non-stiff systems have a very low direction dependence.


Direct methods: Step size variation: Try a variety of step sizes $h$, for each $h$ compute the solution for $h$ and $h/2$, the difference between these two is an approximation of the error of the $h$ solution. This should be proportional to $h^p$ where $p$ is the global convergence order of the method. If the system is stiff, this becomes true only for very small step sizes $h$ or never, because then it becomes over-shadowed by rising numerical noise accumulation from the increasing number of steps.

Order variation: Use an adaptive method that has three embedded methods. If I remember correctly, there is a popular RK method that has embedded orders 1-5-6. See if the local errors conform to the theory for moderate Lipschitz constants.

$\endgroup$
  • $\begingroup$ Thanks.Can you tell me your reference of this method,please? Because I use this for proof of theorem and I should know it. $\endgroup$ – user151566 May 27 '14 at 10:34
  • $\begingroup$ Then you should enlarge your question with this extended information. To get proof-level information out of numerical methods you will need exact or at least safe error estimates. For instance by combining Taylor series methods and interval arithmetic. See for instance papers by Pryce/Nedyalkov. $\endgroup$ – Dr. Lutz Lehmann May 27 '14 at 11:26
  • $\begingroup$ Thanks a lot.I have some data to check my solution and my program is my own code and my system is nonlinear too.But I have a new problem I run it with $h=1$ and $t=12$ and have true answer and when I use $h=.1$ my answer is false and the interest thing is when I use $t=12*7$ with $h=1/7$ my answer is true. Do you think my program is wrong? so why it's answer sometimes is true? Do you think my problem is stiff? best regards $\endgroup$ – user151566 May 27 '14 at 12:59
  • $\begingroup$ so I will try to write adaptive method and check it again.thanks $\endgroup$ – user151566 May 27 '14 at 13:04
  • $\begingroup$ My main problem is PDE. and I change it by method of line to ODE. So should I check Lipschitz constants for it? Because it's very large and depends the number that I use for method of line. Thanks $\endgroup$ – user151566 May 27 '14 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.