Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Integration with variable limits
Replies: 17   Last Post: Aug 20, 2013 10:20 AM

Advanced Search

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

Posts: 1,472
Registered: 11/8/10
Re: Integration with variable limits
Posted: Aug 16, 2013 10:26 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Sanaa" wrote in message <kulb7b$qrm$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kul93r$t5q$1@newscl01ah.mathworks.com>...
> > "Sanaa" wrote in message <kul7kv$a10$1@newscl01ah.mathworks.com>...
> > >
> > > > > y_(n+1)=x_n;
> > > > > x_(n+1)= x_n + integration (f(y_(n+1)(s))) ds.

> > > >
> > > > So your final aim is to solve the delay differential equation
> > > > dx(t)/dt = rho*x(t-r)*(1-x(t-r))
> > > > with x given on an interval of length r at the beginning, r and rho constant over time ?
> > > >
> > > > Best wishes
> > > > Torsten.

> > >
> > > No. I don't want to solve the original delay differential equations, I wish to solve the discrete system after a certain discretization method applied to it.
> > > Thanks a lot in advance.

> >
> > But if the discretrization method is given, you are also given how the above integral is approximated.
> > Or are you _searching_ for an adequate discretization method for the delay differential equation ?
> >
> > Best wishes
> > Torsten.

>
> Thanks once again for your kind reply. The discretization method here is very simple, the step methods, I am not searching for the method, i just don't know how to approximate the integral. I have read about trapz and cumtrapz but my only problem now is the variable limits of integration. Using trapz or cumptrapz don't allow me to specify the variable limits; I am really confused.


First take care that your step length divides r - otherwise you will have trouble.
Say you have the delay differential equation from above
dx/dt = rho*x(t-r)*(1-x(t-r))
with x given on the interval [-r,0].
Now take a step dt such that dt divides r (say n*dt=r)
x(t+dt)-x(t) = integral_{t'=t}^{t'=t+dt} (rho*x(t'-r)*(1-x(t'-r)) dt')
The integral can be approximated by the trapezoidal rule:
integral_{t'=t}^{t'=t+dt} (rho*x(t'-r)*(1-x(t'-r)) dt') ~
dt*(rho*x(t+dt-r)*(1-x(t+dt-r))+rho*x(t-r)*(1-x(t-r)))/2.
Thus your recursion reads
x(t+dt)=x(t)+dt/2*rho*(x(t+dt-r)*(1-x(t+dt-r))+x(t-r)*(1-x(t-r)))
Inserting n*dt=r gives
x(t+dt)=x(t)+dt/2*rho*(x(t-(n-1)*dt)*(1-x(t-(n-1)*dt))+x(t-n*dt)*(1-x(t-n*dt)))
or as discrete recursion
x_(k+1)=x_k+dt/2*rho*(x_(k-(n-1))*(1-x_(k-(n-1)))+x_(k-n)*(1-x_(k-n)))
for k=0,1,2,...
The values x(-(n-1)),x(-(n-2)),...,x(0) are given by the initial condition on the interval
[-r,0].
Does this help ?

Best wishes
Torsten.



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.