Search All of the Math Forum:

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

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

 Messages: [ Previous | Next ]
 Torsten Posts: 1,717 Registered: 11/8/10
Re: Integration with variable limits
Posted: Aug 16, 2013 10:26 AM

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

Date Subject Author
7/25/13 Sanaa
7/25/13 Torsten
7/25/13 Sanaa
7/26/13 Torsten
7/30/13 Sanaa
7/31/13 Torsten
7/31/13 Torsten
7/31/13 Steven Lord
8/15/13 Sanaa
8/15/13 Torsten
8/15/13 Sanaa
8/15/13 Torsten
8/16/13 Sanaa
8/16/13 Torsten
8/16/13 Sanaa
8/16/13 Torsten
8/16/13 Sanaa
8/20/13 Torsten