# Stiff differential equation

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

• 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. – Dr. Lutz Lehmann May 27 '14 at 11:33
• 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? – Dr. Lutz Lehmann May 27 '14 at 11:35
• 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. – Dr. Lutz Lehmann May 27 '14 at 11:51

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.
• 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 – user151566 May 27 '14 at 12:59