# My mistake or error in NDSolve?

I try to solve the following equation $$y'=y-2ye^{-0.8y}, \quad y(0)=0.7.$$ By some aruments I expect to have a positive solution $y(t)\geq0$, for all $t>0$, however, NDSolve shows that starting from $t\approx 25$ there are some oscilations arround $0$. Their amplitude is quite small, less than $10^{-7}$. A similar result I can obtain using Maple. Is it surely means that my theoretical arguments are wrong or it may be an error in NDSolve algorithm due to some bad properties of this equation?

-

Your theoretical arguments are correct. The reason for this spurious oscillations is the numerical error. If you increase error tolerance in NDSolve (note that default tolerance is $\sim 10^{-7}$) you will obtain smoother solution. There is the code:

eq = {y'[t] == y[t] - 2 y[t] Exp[-8/10 y[t]], y[0] == 7/10};

With[{Y1 = y /. First@NDSolve[eq, y, {t, 0, 35}],
Y2 = y /. First@NDSolve[eq, y, {t, 0, 35}, AccuracyGoal -> 10,
PrecisionGoal -> 10]},
Plot[{Y1[t], Y2[t]}, {t, 22, 35}]
]


together with the plot:

Of course, for fixed error tolerance, this problem will appear for $t\geq t_{\star}$ where $y(t_{\star})\approx\text{tolerance}$.

-
Thanks a lot!!! – Dmitri Jun 23 '13 at 11:11