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 » Software » comp.soft-sys.matlab

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

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 ]

Posts: 1,717
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$>...
> "Torsten" wrote in message <kul93r$t5q$>...
> > "Sanaa" wrote in message <kul7kv$a10$>...
> > >
> > > > > 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') ~
Thus your recursion reads
Inserting n*dt=r gives
or as discrete recursion
for k=0,1,2,...
The values x(-(n-1)),x(-(n-2)),...,x(0) are given by the initial condition on the interval
Does this help ?

Best wishes

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.