From: Monia on
Hello
I'm interested in solving a differential equation of this form
d y/dt = F(t,y)
y(0)=y0
In particular I wonder if ode45 can solve this ode with the following constraint:
y(t)<M
where M is a positive constant.

From: Torsten Hennig on
> Hello
> I'm interested in solving a differential equation of
> this form
> d y/dt = F(t,y)
> y(0)=y0
> In particular I wonder if ode45 can solve this ode
> with the following constraint:
> y(t)<M
> where M is a positive constant.
>

The solution y(t) is uniquely determined by
the ODE and the initial condition ; so you should
not constrain the solution.
If the ODE is defined correctly, the constraint
should automatically be satisfied.

Best wishes
Torsten.
From: Steven Lord on

"Torsten Hennig" <Torsten.Hennig(a)umsicht.fhg.de> wrote in message
news:1727001050.186096.1274269883577.JavaMail.root(a)gallium.mathforum.org...
>> Hello
>> I'm interested in solving a differential equation of
>> this form
>> d y/dt = F(t,y)
>> y(0)=y0
>> In particular I wonder if ode45 can solve this ode
>> with the following constraint:
>> y(t)<M
>> where M is a positive constant.
>>
>
> The solution y(t) is uniquely determined by
> the ODE and the initial condition ; so you should
> not constrain the solution.
> If the ODE is defined correctly, the constraint
> should automatically be satisfied.

I'm wondering if the OP is dealing with a physical constraint and wants to
reflect that in the mathematical system. For example, in the BALLODE
example technically according to the numerics the bouncing ball could fall
as far as it wants ... except that the pesky floor is in the way, preventing
it from going any lower than that.

I would consider solving this problem the same way the BALLODE demo does
it -- set an Events function to detect when y(t) reaches M, then stop the
solver, modify the conditions appropriately (say to simulate the ball
bouncing off the floor or ceiling) and restart the solver using the new
initial conditions.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


 | 
Pages: 1
Prev: create a mask
Next: dataset table in GUIDE uitable