help-octave
[Top][All Lists]

## Re: Help with ODE solver

 From: Jon Davis Subject: Re: Help with ODE solver Date: Fri, 13 Sep 2002 11:19:00 -0400 (EDT)

```        I hate to throw spanners into projects, but there are
serious technical issues with "solving" differential equations
with discontinuous  right hand sides. In particular, the standard
existence and uniqueness theorems are inoperable, and even the
definition of "solution" is subtle.

The classical reference is a paper by Fillipov that
appears in the AMS Translations Series, Volume ?? Solutions need
not be unique in the usually understood sense, and even if an
algorithm computes a trajectory that is a Fillipov solution, you
need not see that in a physical apparatus. Generally such problems
raise modelling issues, and questions about whether the physical model
is really discontinuous, or exquisitely sensitive to structure
assumptions.

--Jon

On Thu, 12 Sep 2002, John W. Eaton wrote:

> On 12-Sep-2002, Marco Antoniotti <address@hidden> wrote:
>
> | Pardon my obtuseness.  Do you mean that I will have to have a big 'if'
> | in the RHS function like
> |
> |    if (t < t_crit_1)
> |       ...
> |    elseif (t_crit_1 <= t && t < t_crit_2)
> |       ...
> |    elseif (t > t_crit_k)
> |       ...
> |    end
> |
> | and call
> |
> |     result = lsdot('RHS', intial_conditions, timesteps, [t_crit_1; t_crit_2
> ... t_crit_k]);
> |
> | ?
>
> Yes, that would be one way, but then you would need to make all those
> t_crit_N values global.  It might make more sense to use a vector of
> values and a loop in your RHS function.  Or, you could vectorize it
> depending on how your time-dependent parameter values are stored.
> Perhaps someone else on the list can help you with the programming
> details.
>
> My reason for responding in this thread was to point out that using
> tcrit with lsode is important if you have a discontinuity in the
> derivative due to changing parameter values.  Simply breaking up the
> integration into intervals may not be sufficient because if you don't
> specify tcrit, lsode may integrate past your final time point and
> interpolate backward to find the final state values.  If you have a
> discontinuity there, then the integrator may still have trouble,
> respond by reducing the step size to zero, and eventually fail.
>
> BTW, does anyone know if Matlab's ODE solvers have a similar
> capability?
>
> jwe
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
>

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```