The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Axel Kowald

Posts: 4
Registered: 12/7/04
Problem with discontinuity in NDSolve[]
Posted: Jun 26, 1996 3:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.)


Many thanks

Axel Kowald

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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.