Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Problem with discontinuity in NDSolve[]
Replies: 1   Last Post: Jul 11, 1996 12:49 AM

 Messages: [ Previous | Next ]
 Axel Kowald Posts: 4 Registered: 12/7/04
Problem with discontinuity in NDSolve[]
Posted: Jun 26, 1996 3:09 AM

Hi everybody,

I have a problem with NDSolve if my equation contains a discontinuity.
If I try

NDSolve[{y'[t] == 10 - y[t] * If[y[t]-15 <= 0, 0, 1],
y[0] == 0}, y, {t,0,20}]

I always get the error: Maximum number of steps reached.
The solution should be a linear increase until y = 15 followed by an
exponential decay until a steady state is reached by y = 10

Funny enough if I try

NDSolve[{y'[t] == 10 - y[t] * If[t-15 <= 0, 0, 1],
y[0] == 0}, y, {t,0,20}]

causing the discontinuity to be at t = 15 instead of y = 15 NDSolve has no
problems at all. (But of course this is not what I want.)

ANY SOLUTIONS ??? ANY IDEAS ???

Many thanks

Axel Kowald

P.S. I'm using Mma 2.2 on a Mac with 7.5.3 and 24 MB RAM

Date Subject Author
6/26/96 Axel Kowald
7/11/96 Paul A. Rubin