Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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:

enter image description here

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

share|improve this answer
    
Thanks a lot!!! –  Dmitri Jun 23 '13 at 11:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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